Frontend Tech + >> HBMAME / ARCADE64 / MESSUI
View all threads Index   Flat Mode Flat  

krick
Get Fuzzy
Reged: 02/09/04
Posts: 4235
Send PM
Re: Patched Robotron 2084 by Christian Gingras
12/15/14 07:35 AM


This might be useful...

Commented Pac-Man disassembly:
https://web.archive.org/web/200910031710.../PacmanASM.html


I was looking at Don Hodges page and comparing his Pinky fix to the posted Inky fix to see why they're not quite done the same way. It looks like for the Pinky fix, the call to the subroutine takes the same space as three instructions.

So this original code (three lines in the disassembly)...

2795 29 ADD HL, HL ; double Pac-man's direction vector
2796 29 ADD HL, HL ; quadruple Pac-man's direction vector
2797 19 ADD HL, DE ; add result to Pac-Man's position to give target

Is replaced by this one that calls the subroutine (one line in the disassembly)...

2795 CD F0 2F CALL #2FF0 ; add 4x dir. vector to Pac's position

However, in the Inky code, the fix can't be done quite the same way, because there's one less line (instruction) since pac-man's direction vector is only doubled (not quadrupled).

So to fit the call in, the code has to also replace the line that loads the pacman offset (from address 4D1C) so now the subroutine needs to do the load. Additionally, when the Inky subroutine returns, it can't just return to the line after where it left off (as the Pinky code does), so it needs to jump back to a specific address.

Also, I noticed that the posted Inky fix uses the same area for the subroutine that the Pinky fix does, so code for the one of the subroutines will need to be shifted to a different location.

So, it looks like it will work, it's just done a bit differently.

Incidentally, how the heck does one determine what the checksum fixes should be when a ROM is modified?


GroovyMAME support forum on BYOAC







Entire thread
Subject Posted by Posted on
* Patched Robotron 2084 by Christian Gingras McHale 12/12/14 05:50 PM
. * Re: Patched Robotron 2084 by Christian Gingras RobbbertModerator  12/12/14 09:45 PM
. * Re: Patched Robotron 2084 by Christian Gingras krick  12/13/14 06:34 PM
. * Re: Patched Robotron 2084 by Christian Gingras RobbbertModerator  12/13/14 06:52 PM
. * Re: Patched Robotron 2084 by Christian Gingras krick  03/28/15 05:38 PM
. * Re: Patched Robotron 2084 by Christian Gingras Phantom DJ  05/01/15 09:49 AM
. * Re: Patched Robotron 2084 by Christian Gingras RobbbertModerator  04/04/15 12:37 AM
. * Re: Patched Robotron 2084 by Christian Gingras krick  12/14/14 01:15 AM
. * Re: Patched Robotron 2084 by Christian Gingras RobbbertModerator  12/14/14 02:30 AM
. * Re: Patched Robotron 2084 by Christian Gingras krick  12/15/14 07:35 AM
. * Re: Patched Robotron 2084 by Christian Gingras krick  12/17/14 09:29 AM

Extra information Permissions
Moderator:  Robbbert 
0 registered and 20 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 6109