Thank you! Using BeebEm I have written the start of a drive test suite for me to confirm the operation of my drives with my master.If you want to be the NMI handler, you need to claim the NMI with service call &0C and release it when you've finished with service call &0B. If you're not a filing system use identify &FF, so:
claim: LDA #143:LDX #12:LDY #255:JSR OSBYTE:STY oldNMI
release: LDA #143:LDX #11:LDY oldNMI:JSR OSBYTE
When you are the interupt handler you "own" &A0-&A7 and &D00-&D5F.
The keyboard runs on interupts, so you need to disable interupts while fiddling with it and restore them afterward. NB: *RESTORE*, /not/ enable. ie: PHP:SEI .... PLP. When you have interupts disabled you "own" the interupt workspace at &00FA/&00FB as long as you don't call somebody else.
I'll be running the tests on the master itself soon but so far I've found two things I didn't expect when running under BeebEm:
- if I do a 'restore' command followed by a 'step out' it seems to do some kind of long seek but I'd expect the real wd to either do nothing as it's already at track 0, or potentially the wd will attempt the step and the drive will not do/it hit the end stop at track 0.
- it's unclear whether DRQ and INTRQ from wd1770/wd1772 are both connected to NMI on the Master as it goes into one of the custom ICs which then generates the NMI. I've written some code to 'read sector' but it's not working on BeebEm as I'm polling the status register while the NMI is active collecting the sector contents. I believe in this case the polling status register will clear any INTRQ but not any DRQ and the similar 'read address' works fine under BeebEm.
I should be able to find out what happens when I run it on the real Master soon.
Statistics: Posted by arnoldemu — Tue Aug 20, 2024 5:27 pm