Jump to content

Bryan McPhail MAME Wip


Diso

Recommended Posts

Bryan McPahil, a MAMEdev, has recently updated his wip page.

 

Double Dragon has a crash which sometimes occurs at the very end of the game (right before the final animation sequence). It occurs because of a jump look up table:

 

BAD3: LDY  #$BADD

BAD7: JSR  [A,Y]

 

At the point of the crash A is 0x3e which causes a jump to 0x3401 (background tile ram) which obviously doesn't contain proper code and causes a crash. The jump table has 32 entries, and only the last contains an invalid jump vector. A is set to 0x3e as a result of code at 0x625f - it reads from the shared spriteram (0x2049 in main cpu memory space), copies the value to 0x523 (main ram) where it is later fetched and shifted to make 0x3e.

 

So.. it's not clear where the error is - the 0x1f value is actually written to shared RAM by the main CPU - perhaps the MCU should modify it before the main CPU reads it back? Perhaps 0x1f should never be written at all? If you want to trace this further please submit a proper fix! In the meantime I have patched the error by making sure the invalid jump is never taken - this fixes the crash (see ddragon_spriteram_r).

 

Double Dragon

 

Visit his Homepage to see a screen shot of Double dragon and to download a patch for 103u1.

 

Credits: Mameworld

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...