Update red music tools

This commit is contained in:
U-Fish-PC\Daniel 2013-11-01 10:25:40 -04:00
parent ed174d2432
commit 71204998ed
2 changed files with 4 additions and 14 deletions

View File

@ -65,10 +65,7 @@ for bank in banks:
while 1:
if address == 0x2062a or address == 0x2063d or address == 0x20930:
output += "\n{}_branch_{:02x}:\n".format(sfxname, address)
if byte < 0x10 and not executemusic:
output += "\tunknownsfx0x{:02x}".format(byte)
command_length = 1
elif byte == 0x10 and not executemusic:
if byte == 0x10 and not executemusic:
output += "\tunknownsfx0x{:02x} {}".format(byte, rom[address + 1])
command_length = 2
elif byte < 0x30 and not executemusic:

View File

@ -1,5 +1,5 @@
import config
config = config.Config()
import configuration
config = configuration.Config()
rom = bytearray(open(config.rom_path, "r").read())
headerlist = (
@ -8,13 +8,6 @@ headerlist = (
["sfxheaders1f.asm", 0x7c003, 0x7c249],
)
numberofchannels = {
0x0: 1,
0x4: 2,
0x8: 3,
0xC: 4,
}
def printsfxheaders(filename, address, end):
file = open(filename, 'w')
bank = address / 0x4000
@ -24,7 +17,7 @@ def printsfxheaders(filename, address, end):
file.write("SFX_Headers_{:02x}:\n".format(bank))
file.write("\tdb $ff, $ff, $ff ; padding\n")
while address != end:
left = numberofchannels[byte >> 4]
left = (byte >> 6) + 1
file.write("\nSFX_{:02x}_{:02x}: ; {:02x} ({:0x}:{:02x})\n".format(bank, sfx, address, bank, address % 0x4000 + 0x4000))
while left != 0:
pointer = rom[address + 2] * 0x100 + rom[address + 1]