Created
November 27, 2019 04:12
-
-
Save sf2platinum/19adb572afe948c3e51f24727dc44a38 to your computer and use it in GitHub Desktop.
Merge hi/low rom pairs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Merge a pair of hi/low byte roms into a single file | |
# | |
# Usage: merger.pl <low_or_even_byte_rom> <high_or_odd_byte_rom> >outputfile.bin | |
open LO, $ARGV[0] || die $!; | |
open HI, $ARGV[1] || die $!; | |
$i=0; | |
while(!(eof(LO) | eof(HI))) | |
{ | |
$a=getc(LO); | |
print $a; | |
$a=getc(HI); | |
print $a; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this script to merge a pair of even+odd / low+high roms into a single file. You'll need to do this for games which have 16-bit CPUs which use 8-bit ROMs. Then, once you've merged each high/low pair, concatenate all the merged pairs into one single file to use in your disassembler.
To determine the order of ROMs:
src/mame/drivers/cps1.cpp
for CPS1 gamesmame name_of_game -listxml
and examine the offsetExample sf2ua: Street Fighter 2 World Warrior
From the MAME driver source:
From the output of
mame sf2ua -listxml
To merge these together: