jombo23 / N64-Tools

N64 Tools
The Unlicense
239 stars 113 forks source link

Earthworm Jim 3D support in N64MidiTool #60

Closed theballaam96 closed 11 months ago

theballaam96 commented 12 months ago

More of a feature request than a bug. I've located down the music files in the EJ3D (US) ROM


class SongInfo:
    def __init__(self, name: str, start: int, size: int):
        self.name = name
        self.start = start + 0xCACCF0
        self.size = size

SONGS = [
    SongInfo("Muted Main", 0x1BE792, 0x1C4B),
    SongInfo("Twister", 0x24D1F6, 0x19B7F),
    SongInfo("Spooky", 0x148588, 0x8BF5),
    SongInfo("Boogie", 0x55113, 0x2106),
    SongInfo("Barn", 0x6188E, 0x43CF),
    SongInfo("Western", 0xCD6A8, 0x2F11),
    SongInfo("Western 0", 0xDE7FC, 0x718F),
    SongInfo("Menu", 0x226281, 0x718B),
    SongInfo("Lord of the Fries", 0x2C7F31, 0xDA23),
]

All songs are uncompressed in ROM. Not sure what format it's using as it's certainly not the GE format. Figured I'd post here as a GH Issue just in case anyone working for N64Tools might recognize it and be able to build support for it into N64MidiTool

SubDrag commented 12 months ago

So those offsets are + 0xCACCF0? They're already supported, just in N64 Sound Tool, as 8BitPCM. Are you sure about the addresses? Some are slightly off from below.

CACD00,CAEEA3 CAEEA3,CB3101 CB3101,CB9355 CB9355,CBD5EA CBD5EA,CBF81A CBF81A,CC5B43 CC5B43,CCE000 CCE000,CD867E CD867E,CE8FEF CE8FEF,CF9994 CF9994,D01E13 D01E13,D03F19 D03F19,D06094 D06094,D08212 D08212,D0A318 D0A318,D0C424 D0C424,D0E58E D0E58E,D1295D D1295D,D16D0E D16D0E,D1B158 D1B158,D23976 D23976,D2C094 D2C094,D3ADB2 D3ADB2,D3D07C D3D07C,D45765 D45765,D4DEB9 D4DEB9,D5653C D5653C,D587D7 D587D7,D696B9 D696B9,D7A3A8 D7A3A8,D7D2B9 D7D2B9,D8B4FC D8B4FC,D9268B D9268B,D99755 D99755,DA083B DA083B,DA795C DA795C,DB5B8B DB5B8B,DBCDAC DBCDAC,DC3E03 DC3E03,DCAE8C DCAE8C,DD1CDD DD1CDD,DDFF30 DDFF30,DE706A DE706A,DEE14D DEE14D,DF5288 DF5288,DFDE7D DFDE7D,E0691B E0691B,E0F317 E0F317,E1C2DF E1C2DF,E22B6D E22B6D,E24D6C E24D6C,E27172 E27172,E384DF E384DF,E3ED9F E3ED9F,E4103D E4103D,E4327A E4327A,E546FC E546FC,E57A49 E57A49,E5D206 E5D206,E65DB4 E65DB4,E6B492 E6B492,E6D0DD E6D0DD,E6ED0A E6ED0A,E75EB2 E75EB2,E77AEE E77AEE,E79783 E79783,E7FAA2 E7FAA2,E8252B E8252B,E84FB3 E84FB3,E86BFE E86BFE,E888A4 E888A4,E8A4F3 E8A4F3,E8C117 E8C117,E93232 E93232,E9A412 E9A412,EA15B8 EA15B8,EA8639 EA8639,EAF85B EAF85B,EB69E0 EB69E0,EBDB48 EBDB48,EC4C56 EC4C56,ECBE49 ECBE49,ED2F81 ED2F81,EDA10C EDA10C,EE1282 EE1282,EE83DA EE83DA,EEF470 EEF470,EF66D5 EF66D5,EF9EF6 EF9EF6,F13A75 F13A75,F2D73C F2D73C,F4726C F4726C,F4BF80 F4BF80,F50833 F50833,F55166 F55166,F5E250 F5E250,F74C31 F74C31,F82660

theballaam96 commented 11 months ago

My bad, didn't realize that they were stored as PCM rather than MIDI.

In terms of the addresses, that's the list of addresses I could find in memory by analyzing the code through Ghidra. Changing the relevant spots in memory to other song addresses yields the expected results.

Since this is already supported as part of the sound tool, feel free to close it. My apologies