News:

Don't forget to visit the main site! There's lots of helpful docs, patches, and more!

Main Menu

[SM] So, I broke the rom editing the Tourian palettes... [SOLVED]

Started by The Monster of Surrealton, December 11, 2014, 12:01:07 AM

Previous topic - Next topic

The Monster of Surrealton

In the graphic editor thingy, it warned me about pointers overwriting palettes or something.

Out of curiosity, I made a copy (that's also mysteriously broken) and messed with it.

All was fine, but, when I went to Mother Brain's room, SMILE crashed, saying something about "superscript error" or something.

Is it possible to salvage the rom by changing the pointers of the graphics or whatever it is?

Mettyk25jigsaw

You may have overwritten motherbrain's room pallettes, with the palette that comes before it.

All you would have to do is open your rom in a hex editor + a copy of a clean rom and paste data from the clean rom to your rom of the palette data from both the motherbrain's room and the palette that comes before it, eg. (I can't remember gfx set that motherbrain's uses off top of head) but let's just say it is gfx set '15' as an example, well you would have to copy palette for gfx set 15 (mother brain's room) + Pallette for gfx set '14' from clean rom to your rom for both.

If you don't know how to find where the data is located, in the gfx editor, click up the top a tab called pointers and then click on 'show scenery pointers', but you may have to do this on a clean rom.

JAM

There is your error:
Quote from: The Monster of Surrealton on December 11, 2014, 12:01:07 AM
Out of curiosity, I made a copy (that's also mysteriously broken) and messed with it.
Correct is copies. A lot of them. Sorry, no easy fix for you.

Best way you can do is repointing the corrupted palette. Because returning original palette to this room will corrupt the paette of another Tourian Graphic Set (because now it's bigger).

Open Mother Brain's room in original ROM, go to Graphic Editor and click "Pointers". You need palette one's address (something like $7E523). Write it somewhere. Now search for a free space in your hack in hex editor. Max you'll need is $103 bytes. Find a space. Write there 4 bytes:

E4 FF 00 FF

Now go to your address you saved before and write a pointer to where you've placed 4 bytes. Write a backward pointer in Lunar Format (if you choose to use space at $2FDE00, for example, you'll need to write these 3 bytes: 00 DE DF).

Corrupted palette is not linked anymore. Now the link leads to empty palette. Congratulations.

The Monster of Surrealton

Quote from: JAM on December 12, 2014, 08:20:52 PM
There is your error:
Quote from: The Monster of Surrealton on December 11, 2014, 12:01:07 AM
Out of curiosity, I made a copy (that's also mysteriously broken) and messed with it.
Correct is copies. A lot of them. Sorry, no easy fix for you.

Best way you can do is repointing the corrupted palette. Because returning original palette to this room will corrupt the paette of another Tourian Graphic Set (because now it's bigger).

Open Mother Brain's room in original ROM, go to Graphic Editor and click "Pointers". You need palette one's address (something like $7E523). Write it somewhere. Now search for a free space in your hack in hex editor. Max you'll need is $103 bytes. Find a space. Write there 4 bytes:

E4 FF 00 FF

Now go to your address you saved before and write a pointer to where you've placed 4 bytes. Write a backward pointer in Lunar Format (if you choose to use space at $2FDE00, for example, you'll need to write these 3 bytes: 00 DE DF).

Corrupted palette is not linked anymore. Now the link leads to empty palette. Congratulations.

I put the bytes in 2F5200.

So, in Lunar, that would be 00 52 DF? (I suck at coding.)

Mettyk25jigsaw

#4
No, It should actually be in lunar === 00 D2 DE.

First of all, pointers always start with a number of 8 or above, with the exception of '0000' which will tell the game to load nothing...so in this case '00 52' is wrong, it should be '00 D2' (5200 + 8000)

Secondly it is DE NOT DF as bank, DE is 2F0000 to 2F7FFF, and DF is 2F8000 to 2FFFFF...Hope this helps...

EDIT = Actually I should add, sometimes a pointer with '0000' cannot be used for certain things, it depends on if it is a valid option for a certain pointer...

The Monster of Surrealton

Quote from: Mettyk25jigsaw on December 18, 2014, 12:16:36 AM
No, It should actually be in lunar === 00 D2 DE.

First of all, pointers always start with a number of 8 or above, with the exception of '0000' which will tell the game to load nothing...so in this case '00 52' is wrong, it should be '00 D2' (5200 + 8000)

Secondly it is DE NOT DF as bank, DE is 2F0000 to 2F7FFF, and DF is 2F8000 to 2FFFFF...Hope this helps...

EDIT = Actually I should add, sometimes a pointer with '0000' cannot be used for certain things, it depends on if it is a valid option for a certain pointer...

It looks like I fixed it. Thanks!