LAMP-Platform / LAMP

Feature-rich editor for the GameBoy game Metroid II: Return of Samus
MIT License
13 stars 2 forks source link

Compiling LAMP project writes excess bank 3 data #37

Closed moehr-moehr closed 1 year ago

moehr-moehr commented 1 year ago

Edit: Version: image

Assuming I've got the gist of how LAMP determines writing data when updating the screen enemy populations, I get the following byte changes in bank 3 when compiling the project to a new ROM.

OG bytes around E200: image

After compiling to new ROM: image

Since I am not actually changing any of the enemies, I can't figure out why it is writing all this data - unless I'm mistaken that saving the project and compiling to a new ROM without making any changes at all should be writing a new ROM that is identical to the old one.

ConConner commented 1 year ago

I could not replicate this doing the following:

  1. Select an unmodified ROM as a base (SHA1: 74A2FAD86B9A4C013149B1E214BC4600EFB1066D)
  2. Create a new project with it
  3. Instantly compile the project again
  4. Use HxD to compare the files

Original:

Compiled:

Its a near identical ROM. The only difference being that the LAMP compiled ROM has all the enemy data moved by one byte (This also means that every pointer in the enemy data is off by one byte), due to LAMP adding an extra 0xFF as the first enemy set.

@moehr-moehr maybe I can replicate the issue if you upload the project files used.