mgcaret / rom4x

*Archived because I am not permitted to make/accept changes for the foreseeable future* Improved Apple //c (ROM 4X) and Apple IIc Plus (ROM 5X) firmware.
79 stars 14 forks source link

ROM 5X -- hangs when enabling Mockingboard 4c+ #13

Open munsie opened 2 months ago

munsie commented 2 months ago

ROM 5X will hang when enabling a Mockingboard 4c+ which uses the $C4XX space for access to its hardware. This appears to be because the patch for handling the delete key is installed in the same region in bank 0 (see https://github.com/mgcaret/rom4x/blob/master/rom5x/B0_C4EE_del_key.s).

To test this on a IIc Plus with a Mockingboard 4c+ installed, drop into the monitor and do the following: *C403:FF FF

On ROM 5, this will give you a new monitor prompt with a blinking cursor. On ROM 5x, the * will be printed for the prompt but the cursor will not be visible. Keyboard presses will no longer work. Due to the Mockingboard IO overriding the $C4XX space, the Apple IIc Plus will need to be cold restarted to recover.

mgcaret commented 2 months ago

ROM 4X and 5X do not support any internal expansions/modifications except: memory cards in the memory expansion slot of machines that have it (and anything that can emulate one), and the ROM Exchange products.

It is worth noting that I have never recommended using ROM 4X and 5X if you do not have a standard memory card installed, though it is common for people to do that. I have never personally tested ROM 4X and 5X without such a memory card installed in the system, nor with any other internal expansions/modifications other than those listed above.

Enabling the Mockingboard 4c and 4c+ also disrupts the use of the mouse in machines prior to ROM 3, and the above standard memory cards in ROM 3 or higher.

You are free to build your own ROM 5X that omits the delete key patch by removing/renaming B0_FD75_patch_getln1.s (it is not necessary to remove B0_C4EE_del_key.s, though you can). If you cannot build from source, just use a hex editor to change the 3 bytes at $FD75 to match the original ROM.

Alternatively, the ROMXc+ allows you to select a ROM image at power-on, so you can select a standard ROM image for use with the Mockingboard (or easily use an image without the delete key patch).

munsie commented 2 months ago

I just submitted a PR that I think fixes this issue without introducing any new issues. The new patch uses the NOPs in both NXTCHAR and RDKEY to move the delete key functionality out of the C4xx space. I was able to successfully test this in both MAME and on my IIc Plus using the ROMXc+.