This page contains the more random and uncategorisable hacking tools I've made over time.
Important Note: The tools on this page were made in Game Maker, and as such are Windows only.
hexdc Hex to ASM Converter
Download! (1.6 mb)
Any file can be opened and viewed in a hex editor and it will look something like this:
00 00 FF FF 0E EE 0C 8C 00 00 4E 71 ...
This tool will convert any file into a text file that declares those bytes in ASM format, like so:
dc.b $00, $00, $FF, $FF, $0E, $EE, $0C, $8C, $00, $00, $4E, $71, ...
It has a bunch of options, too.
gmv2bin Demo Movie Converter
Download! (1.7 mb) contains exe and source
Want to add new demos to your Sonic ROM hack? In my experience, the best way is to record an input movie using Gens Rerecording and then convert it to a binary file that can be included in your hack.
This utility, as its name suggests, will do just that - convert a GMV file to a BIN file in the Sonic demo format. You can do either player, as well: just check the "Player 2" box to export player 2's demo data instead.
There are two things you must know about, though, in order to make sure it all goes smoothly:
Making Sure The GMV Begins Recording At The Right Time
Because certain objects such as moving platforms follow a fixed schedule, it is important to make sure that your demo is synchronised properly. If it's even a few frames off, bad things will happen.
The game will start reading the demo data immediately when the "game mode" (the byte in RAM at $00FFF600) changes from $8C to $0C - this signifies that the level proper has begun. Thus, you'll want to start recording any demos from that frame.
Lucky for you, Gens Rerecording has frame advance and RAM watching features. Add a RAM watcher for $00FFF600, choose the level you want to record a demo for, and immediately pause emulation. Keeping an eye on the RAM watcher, frame advance until the value becomes $0C. Then, begin recording an input movie. After you've played for about 30 seconds or so (it doesn't matter if the demo runs a little overtime), stop the recording. The resulting GMV can then be converted with gmv2bin to make your demo!
Fixing The Demo Playback Bug In Sonic 1 & 2
At this point, you've done everything right. However, in Sonic 1 (rev01) or Sonic 2, a tiny bug in the demo playback routine will give you grief unless you fix it.
The routine incorrectly interprets a button being held down as a button being repeatedly pressed. This can cause all sorts of problems; most commonly, it will cause the spindash to rev up too quickly, making it launch at a faster speed and desynchronising your demo. Fortunately the fix is easy if you're using a disassembly. (I'll be giving instructions for the current Sonic Retro SVN disassemblies, which are the recommended ones.)
For Sonic 1, open "_inc\MoveSonicInDemo.asm" and find the label "MDemo_On". Replace these lines:
if Revision=0 move.b (a0),d2 else moveq #0,d2 endc
with this one:
move.b -2(a0),d2
And that's it! For Sonic 2, open "s2.asm" and find the label "MoveDemo_On_P1". Replace this line:
moveq #0,d2
with this one:
move.b Ctrl_1_Held_Logical-Ctrl_1_Held(a0),d2
Now find the "MoveDemo_On_P2" label and replace this line:
moveq #0,d2
with this one:
move.b Ctrl_2_Held_Logical-Ctrl_2_Held(a0),d2
And that should do it!
Special thanks to FraGag, who came up with this fix.
gmv2bin was made in Game Maker 8 using Hobbel's Max Win Api 2 DLL.
Sonic 1 Special Stage Editor
Download! (1.7 mb)
Sonic 1 Special Stage Editor is an uncomplicated programme with an uncomplicated purpose: to edit the Special Stage layouts in Sonic the Hedgehog for Sega Genesis / Mega Drive. It is meant to be used complementarily with a split disassembly of the game, rather than directly editing the ROM itself. Multiple split disassemblies of Sonic the Hedgehog can be found at Sonic Retro.
Colour Getter
Download! (2.6 mb)
A very simple tool for getting the RGB value of any pixel on the display. The value can be copied to the clipboard in the decimal Game Maker format, or hexidecimal string format for image editors like GIMP. Furthermore, colours can be stored in palettes, which can be both imported from and exported to Tile Layer Pro .tpl format files.
No comments:
Post a Comment