Jump to content

R. Belmont system 22 WIP


Robert

Recommended Posts

Source

 

Finally!

 

I found the remaining M377xx core bug that was preventing System 22 games from using the dumped C74 BIOS. It’s actually a difference from the 65C816: for anyone who’s done any SNES hacking, you might find this interesting. Or not.

 

Take this assembly program, which is the same on both processors (except the 7700 doesn’t need the first two instructions - it has no 6502 emulation mode):

CLC

XCE ; make sure we’re in native mode - 65816 only

REP #$30 ; all registers to 16 bits

LDA #$0123

LDX #$4567

LDY #$89AB

SEP #$30 ; all registers to 8 bits

REP #$30 ; back to 16 again

 

Now, what are the 16-bit values of A, X, and Y at that point? On a real 65C816 (tested on an Apple IIgs) A is 0123, X is 0067, and Y is 00AB. On the M377xx (I can’t test on one, but there’s a routine at C881 in the C74 BIOS that makes this behavior extremely clear) A is 0123, X is 4567, and Y is 89AB.

 

The upshot is that with this and some other fixes, the System 22 games (including Ace Driver!) now play music using their own real correct BIOSes. No more BAD DUMP and PR1DATA.8K tomfoolery.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...