schlae / a1000-scsi-sidecar

Amiga 1000 SCSI sidecar adapter
4 stars 0 forks source link

About the $00F0.0000 ROM #2

Open TheBajaGuy opened 5 months ago

TheBajaGuy commented 5 months ago

Pre-OS 1.2, AutoConfig for RAM and I/O cards pretty much didn't exist yet, when he ComSpec was initially made. AddMem was done for RAM. Even in OS 1.2, expansion.library, while it could AutoConfig the cards, it was broken with regards to making available the ability to enable on on-card ROM (driver).

The OS did have an old hook, though, at $00F0.000. If a certain hex value appeared at that address, then early in the OS startup it would begin executing at $00F0.0004. It was the code's job later on to return back to executing Kickstart. I recall this was described as a means to add diagnostic routines, or other code which might not be in the OS at the time. My unofficial opinion is that it was a holdover to the game cartridge era which the machine was originally tied to - a neat place to stuff 512K of ROM code. In any event, later on, after C= went under, this space was used by the 68060 accelerator designers to patch Kickstart. They added some code to tame the FPU exception vectors early on in startup.

This is what I believe ComSpec also did back in the day. I'm not sure that what they coded at $F0.0000 was 100% compatible with OS 1.2 or 1.3, though.

For Ref, I've un-split, and attached, the 00F0.0000 (patched to support boot block filesystems - was handy) boot ROM for the TekMagic A2000-060. The board has an NCR 53C710 SCSI chip on it, with registers for the chip at some offset of that address.

This ROM adds a board into to the OS board configuration list, also adds (self-detected by software) onboard memory to the Fast expansion memory list, and (I assume) later attaches/activates a driver to the SCSI I/O 'board' it made for auto-booting.
TkMg-A2K-060-Patched.zip

I also attached the very short TekMagic A4000T 060 (Ultrasound) patch code ROM, which only has the FPU patch. It should be simple enough to get an understating of the $F0.0000 ROM interaction with the early OS startup. It has no board-related tricks in it.
A4KT-060-F0-DumpFile.zip

This should give you a perspective on what might need to be updated from the ComSpec design to work on at least the more modern OS 3.1 (the 68060 was not compatible with OS 2.0, only the 68040). I think I saw a 1991 date on the Comspec driver ROM, so it may have been made OS 1.3/2.0 safe by then.

schlae commented 5 months ago

Fascinating! The A1000 service manual documents the F00000 space as "CART" so that lends credence to your game cartridge theory.