Jump to content
IGNORED

Bankswitched bankswitch games? Yes!


CPUWIZ

Recommended Posts

RevEng and me have done it, it was pretty tricky and I'll let Rev chime in on some of the work he had to go through. But the result is that there is a new bankswitching scheme on this planet. I think we'll call it SC1024, it works by banking in and out entire 128K bankswitched games (bank 0-5 @ $8000, bank 6 @ $4000 and bank 7 @ $C000). :cool:

Anniversary2.JPG

  • Like 12
Link to comment
Share on other sites

RevEng and me have done it, it was pretty tricky and I'll let Rev chime in on some of the work he had to go through

Tech details... the games each of the games needed to be patched so the bankswitching scheme used not only 3 bits for 0-7 banks, but also another 3 bits to identify which 128k bank needed to be active during any bank switch.

 

This was easier said than done, since some of the games used their bank value variables for other purposes. And in some cases the value was loaded out of a location in the current bank, rather than a "lda #value" "sta $8000" pair. The MESS debugger was invaluable for this tracking down all of the bank switch hits.

 

The biggest challenge of them all was Ninja Golf. Even when it was seemingly fully patched, it was still hitting the $8003 hotspot with a weird value during it's startup routine.

 

Thanks to the debugger, I found an off-by-1 bug in its initialization code, which caused an indirect address write to try and write to this odd location.

 

Since the original game code uses $9000 as a hotspot, instead of the usual $8000, it looks like they never tracked down the source of this bug, but instead tweaked the hardware to ignore it!

 

anyway, I'm hoping you guys enjoy this collection. We hand-picked the games to try and included some of the rarer 128k games, based on the feedback from the 1st collection. :)

Edited by RevEng
  • Like 6
Link to comment
Share on other sites

The biggest challenge of them all was Ninja Golf. Even when it was seemingly fully patched, it was still hitting the $8003 hotspot with a weird value during it's startup routine.

 

 

 

 

Was this related to the hidden joystick test in Ninja Golf?

 

I want one when they are ready to go. :thumbsup:

 

Mitch

Link to comment
Share on other sites

Very clever! Congratulations on getting the games to work with your new bankswitching design. I remember going through a similar process with the Aquaricart: the games that I included in that cartridge weren't designed with bankswitching in mind at all, so they were writing into the cartridge ROM all over the place (usually because of missing bounds checks, sloppy memory initialization, and other programming errors). I also relied pretty heavily on MESS's debugger to see what was going on.

  • Like 1
Link to comment
Share on other sites

Was this related to the hidden joystick test in Ninja Golf?

No, the code in question appears to be part of the DLL initialization. It's implemented as a classic count-down loop which should have run from NUMBER_of_ELEMENTS-1 to 0, but instead it runs from NUMBER_of_ELEMENTS to 0.

 

As a result, during the first loop iteration it reaches past the list of RAM locations and grabs some bogus data, which just happens to be within the hotspot range.

 

Easy enough to see now, with the MESS debugger. I imagine back in the day it gave somebody ulcers trying to track it down.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...