(Experimental) Alternate ROM extension
Users browsing this thread: 1 Guest(s)

12: Question 
The problem with VL-Tone's SM64 rom extender is that the MIO0 files are decompressed and copied without using proper alignment, resulting in poor compatibility with true N64 hardware and some emulators. Another thing I don't like about it is that some of the decompressed files still have MIO0 headers prepended to them (namely the files loaded by the level script 0x1A command, and the file loaded for ram segment 0x02). So I've set out to create a better and faster extender that doesn't have these quirks.

​What it does:
+ Pads with the rom with 0x01's to 24MB.
+ Decompresses all MIO0 files (with proper 16 byte alignment) to 0x800000, with 32KB gaps after each file.
+ Remaps all of the pointers to these files in the level scripts (and one asm inline pointer)
+ Changes all 0x18 commands to 0x17 commands in the level scripts
+ Clears old MIO0 data with 0x01's
+ Modifies the 0x1A command's asm routine to load raw files instead of MIO0 data
+ Replaces the segment 0x02 MIO0 loader with a raw file loader
+ Removes the main CRC check and replaces the CRC string with 0xFF's (optional)
+ Adds 'EXT2' to the image name
+ Resurrects these textures (to segment 0x02):
[Image: 1firmgd.png][Image: zdT4VHZ.png]
(Due to the fact that this texture thing shifts all the ram segments, I'll probably make it optional in my next update)

​+ Right now I've hit a bit of a snag with the replaced 0x1A loader, which seems to break the game for every emulator but Nemu. It's quite odd considering Nemu's general lack of compatibility.
+ Unfortunately, the resulting rom will not work with the level importer, and will not work with TT64 either, due to the fact that a lot of the data is different from VL-Tone's extended rom, and won't be recognized by these tools.

Here's my most recent complete build: binary - source
Like VL-Tone's extender, this version uses BGNG's MIO0 decoder (I just took the exe and linked it in, which is why you'll see mio0dec.exe show up while the rom is being decompressed).

Here's another very lite build I made a few days ago to test my own built in MIO0 decoder: binary & source
[Image: 57857b725390f4378c36ffe917276e31.gif]
(It's fast  Cool )

​ASM code and information:

@ 0x33910 // Raw loader for the 0x1A command:


OR A0 R0 R0
LW A1 0x2C (SP) // source; currently holds rom address
LUI A2 0x801C
ADDIU A2 A2 0x1000 // destination; terrain texture bank const 0x801C1000
LW T0 0x30 (SP)
SUBU A3 T0 A1 // block size; destination end - destination start
JAL 0x803284B0 //(A0 = 0, A1 = src rom address, A2 = dest ram address, A3 = block size); dma func for game sounds and mario's animations

MIO0 header maps for all official SM64 games
My threads are now being maintained here

(Experimental) Alternate ROM extension
Users browsing this thread: 1 Guest(s)

  EN ・日本語