Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec improvements / cleanup #3

Open
rb6502 opened this issue Feb 5, 2019 · 3 comments
Open

Spec improvements / cleanup #3

rb6502 opened this issue Feb 5, 2019 · 3 comments

Comments

@rb6502
Copy link

rb6502 commented Feb 5, 2019

Hi Kelvin! I'm implementing your WDM protocol in MAME's IIgs driver right now, starting with the conceptually simpler MLI intercept version for ProDOS 8. I've completed the first half of the functionality where we can boot with ATINIT in place and the WDM hooks operating and ProDOS works normally with the emulated disk drives even though all the MLI calls are trapping up into the emulator. Next up is actually adding the functionality for accessing the host.

Currently you put the necessary patch code in slot 7's register area at $C0F0. I feel your pain in finding 11 free bytes anywhere in an Apple II that aren't on the language card, but $C0F0 is a non-starter, as you probably already know. MAME emulates the CFFA2, the Apple II Rev. C SCSI Card, and the AE Vulcan IDE and all 3 are commonly parked in slot 7.

For this, I'd suggest defining a spec for a slot card to emulate where the CnXX space has a 4-byte ID and maybe 192 bytes of RAM. Then ATINIT simply needs to scan for the ID and place any patches there.

We have an implementation in MAME for host file access on NuBus Macs involving an emulated NuBus card that accepts open/read/write/seek/close/change directory/delete commands and a matching classic MacOS driver. I prefer the cleanliness of that approach since it keeps OS internals from leaking out wholesale into the emulator code, but that may be unavoidable with ProDOS 8 regardless.

Cheers!
-RB

@ksherlock
Copy link
Owner

Thanks for the thoughts. I originally stuffed everything in SLOT 7 DEVSEL since it was the quickest option. Would slot 0 work for you? I actually prefer slot 0 but didn't think of it at the time (in the ProDOS UNITS call it claims to be slot 0 drive 2, which is not entirely legal but therefore guaranteed to be available).

The slot card is probably needed at some point. It would also allow booting into GS/OS with the Host FST.

@rb6502
Copy link
Author

rb6502 commented Feb 5, 2019

Isn't slot 0's space taken by the language card registers? Or is there someplace in the soft switches page you can fit it? Unfortunately Apple used $C07X for IRQ code for pretty much the same reason or else that would've been a good place.

@ksherlock
Copy link
Owner

Ahh, yes, you are correct about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants