Finally got the Shadow Squadron 32x problem resolved...
Shadow Squadron / Stellar Assualt 32x
Open up your Shadow Squadron 32x ROM with a hex editor (must be in "bin" format). Hack the following codes into the ROM...
$07CC:6002 32x Master Code
$116572:0009 Blasts from the large ship guns won't hurt you. Works on either "Feather 1" or "Feather 2".
$10D1A2:0009 The "Feather 1" ship won't use up any fuel when you use the special weapon (special weapon is activated by double tapping the "A" button and holding it on the second tap). Doesn't work on "Feather 2" ship.
=========================
In case anyone was wondering, the "0009" 32x instruction in those 2 codes is our good friend Mr. NOP.
Some interesting things I've noticed about the 32x...
It appears that all 32x instructions are only 2 bytes (meaning there are no operands). A little hard to get use to after spending so much time with 6502, 65c816 and 68k.
While trying to figure out why Shadow Squadron wouldn't run, I made an assembly trace and found what appears to be how the 68k goes into "32x mode" (I have no idea what it's really called, but the 68k only does this with 32x games).
00:04BE 4E D0 JMP (A0) A0=00FF0000 A1=00FF0020 A2=00C00011 A3=00000512 A4=FFFFFFC0 A5=00A10000 A6=00000000 A7=00FFEE00 D0=00000000 D1=00000000 D2=0000FFFF D3=00000000 D4=00000000 D5=00000000 D6=00000000 D7=00000100 xnzvc
FF:0000 1B 7C MOVE.b #$01,$5101(A5) A0=00FF0000 A1=00FF0020 A2=00C00011 A3=00000512 A4=FFFFFFC0 A5=00A10000 A6=00000000 A7=00FFEE00 D0=00000000 D1=00000000 D2=0000FFFF D3=00000000 D4=00000000 D5=00000000 D6=00000000 D7=00000100 xnzvc
FF:0006 41 F9 LEA ($000006BC),A0 A0=00FF0000 A1=00FF0020 A2=00C00011 A3=00000512 A4=FFFFFFC0 A5=00A10000 A6=00000000 A7=00FFEE00 D0=00000000 D1=00000000 D2=0000FFFF D3=00000000 D4=00000000 D5=00000000 D6=00000000 D7=00000100 xnzvc
FF:000C D1 FC ADDA.L #$88,A0 A0=000006BC A1=00FF0020 A2=00C00011 A3=00000512 A4=FFFFFFC0 A5=00A10000 A6=00000000 A7=00FFEE00 D0=00000000 D1=00000000 D2=0000FFFF D3=00000000 D4=00000000 D5=00000000 D6=00000000 D7=00000100 xnzvc
FF:0012 4E D0 JMP (A0) A0=008806BC A1=00FF0020 A2=00C00011 A3=00000512 A4=FFFFFFC0 A5=00A10000 A6=00000000 A7=00FFEE00 D0=00000000 D1=00000000 D2=0000FFFF D3=00000000 D4=00000000 D5=00000000 D6=00000000 D7=00000100 xnzvc
88:06BC 41 F9 LEA ($00FF0000),A0 A0=008806BC A1=00FF0020 A2=00C00011 A3=00000512 A4=FFFFFFC0 A5=00A10000 A6=00000000 A7=00FFEE00 D0=00000000 D1=00000000 D2=0000FFFF D3=00000000 D4=00000000 D5=00000000 D6=00000000 D7=00000100 xnzvc
Hopefully, someone will make a 32x assembly tracer someday.
================================
In case anyone wants to know how to make 32x ROM hacks (I'm sure there are thousands of people. lol), here's a quick guide...
Use Gens 9.5b to find the SH2 memory address (32x RAM).
Use regular (non modded) Gens 2.10 (or any version that has the 32x debugger) and open your 32x ROM.
We'll use Shadow Squadron as an example. The SH2 memory address for damage/shield is $061CE19. Remove the "06" from the address to get the actual RAM address used in the debugger: 1CE19.
Once the game is running, wait until your ship is just about to take some damage and press F5 to make a save state. The closer to the exact point when you'll actually take damage the better. Enter the 32x debugger. Look in the SH2 memory section of the debugger and use these keys to find the SH2 memory address that you found earlier:
Memory (RAM) Window Movement Keys: R-Up 1 Line F-Down 1 Line E-Up 12 Lines D-Down 12 Lines W-Up 144 Lines S-Down 144 Lines
Once you can see the value for your RAM address, all you have to do is start tracing through lines of code until your RAM address changes. Find the exact line of code that caused the RAM address to change, and you have your hack (almost).
Here's the keys to use to trace through the code...
Debugger Tracing Keys: T - Trace 1 command Y - Trace 10 commands U - Trace 100 commands I - Trace 1,000 commands O - Trace 10,000 commands P - Trace 100,000 commands
If you go past the line of code that caused the RAM address to change, press F8 to reload the save state.
There is one fairly big problem though... many games will go into an endless loop when you enter the debugger and try tracing. If you're familiar with 32x assembly, this should be no problem, but if you're like me and know very little 32x asm, here's how to get out of those endless loops...
Trace one line of code at a time (the "T" key) and look for something like this: "bf 02xxxxxx" or "bf/s 02xxxxxx". When you get to that line, press the "N" key to step over that instruction. You may have to do this more than once.
One last thing, the ROM/CPU address shown in the 32x debugger isn't the actual ROM address. If it begins with "02xxxxxx", then you can usually just ignore the "02" for the actual ROM address, but if it begins with "06xxxxxx", you'll need to write down a string of numbers (32x opcodes) and search for that string in the ROM.
Since there are no operands, NOP will work in many situations to kill additions, subtractions, etc (0009 = NOP).
Don't forget to hack the 32x master code into your ROM or else you'll get a blank screen.
|