Settings - LAMP-Platform/LAMP GitHub Wiki

Program Settings

Program Settings in LAMP are universal and apply to every project loaded within the tool. These settings are typically saved at C:\Users\User\AppData\Local\LAMP.

To access the Program Settings, click on Open the Program Settings on the Recent Files screen or select Options -> Program Settings if a project is already loaded.

Program Settings Window

ROM Path

LAMP compiles all changes from the project files into a new ROM without modifying the original Metroid 2 ROM. Because of this, you are only required to have one copy of a Metroid 2 ROM, rather than making a dedicated copy for each hack. ROM Path is the Path where LAMP will look for the Metroid 2: Return of Samus ROM.

It is recommended to use an unmodified ROM path. If you are starting a project from a ROM hack, initialize it with a vanilla ROM, and set a project-specific ROM in the project settings. The correct checksum for an unmodified Metroid 2: Return of Samus ROM is SHA1: 74A2FAD86B9A4C013149B1E214BC4600EFB1066D.

HEX Indicator

LAMP displays numbers primarily in Hexadecimal (HEX). The HEX Indicator setting allows users to select one of three common HEX indicators or none, which provides more visual space but may lead to confusion between HEX and Decimal (DEC) numbers.

Offset Style

Because of the Game Boy's hardware design, all ROM data must have addresses between 0x0000 and 0x7FFF. To allow for more data being reached, Metroid 2 uses a Memory Bank Controller, which hardcodes bank 0 to the address range of 0x0000 to 0x3FFF (therefore, always being loaded), allowing additional banks to be swapped into the address range of 0x4000 to 0x7FFF.

The Editor can display memory locations in two styles:

  • Split Banks and Offsets: Displays the Bank number followed by the internal Bank offset, e.g., 0x8, 0x69BC.
  • Use direct Offsets: Displays a direct offset as if the banks are laid out sequentially, e.g., 229BC.

Note

The HEX Indicator and Offset Style settings affect only the visual representation in the Editor. All numbers are interpreted as hexadecimal. If two numbers get seperated by a comma, colon or semicolon it will be interpreted as Bank, Offset (Not every input field allows for Banks. Usually this happens when you input something like a damage value and not a memory location!). After applying the change or reloading the window the values will automatically be formatted to the chosen preference.

Compilation

Since LAMP released there has been a full disassembly of Metroid II: Return of Samus. This disassembly made it easier than ever to make direct code changes in the game. A downside of these changes are, that data gets moved around in the ROM and LAMP cannot detect these changes. Since LAMP will always take precedence over the data in the ROM, it will overwrite data at locations where it should not do.

This menu allows you to choose which changes LAMP will compile into the final ROM. However, this obviously means that those changes will not be available in the final hack. If, for example, you already edited a lot of area data and do not want to keep that out of the hack, you should instead change the location it is compiled to.

Project Settings

Unlike the Program Settings, the Project Settings are individual to each project and get saved in the ProjectName.m2 file.

Opening the Project Settings will show this window

Project Specific ROM

LAMP uses a vanilla Metroid II: Return of Samus ROM to compile it's changes onto. However, this comes with a drawback. Every change that is supposed to end up on the final ROM has to be made and exist within LAMP. This is not possible for certain things though. Especially when dealing with custom code, LAMP has no way of adding it to it's project files.
Therefore, under the Project Settings, you can find an input box for a path to a secondary Metroid II: Return of Samus ROM. To select a ROM, either paste the full path to it into the text box or click on the button next to it.

Alternatively, you can also input a relative path to the ROM. The root of the path will be the directory of your project file.
Example: Let this be the file layout of your system:

M2 Hacking
|_ M2RoS.gb
|_ LAMP Projects
   |_ My first M2 Hack
   |_ Another Test Hack

If the current open Project is 'My first M2 Hack' The relative path to the M2RoS.gb ROM would then be: ..\..\M2RoS.gb.

As with everything in the Project Settings, this ROM will only be selected for the current project. If a ROM is selected, it will take precedence over the vanilla ROM defined in the Program Settings when LAMP is reading data or compiling the final ROM.

Disassembly

A different alternative would be to supply the path to an instance of the M2RoS Disassembly. By doing so, LAMP will use the output ROM from the disassembly, which takes precedence over the vanilla ROM defined in the Program Settings reading data or compiling the final ROM. It expects the ROM at the path DISASSEMBLYPATH\out\M2RoS.gb. If LAMP does not find a ROM at that location, it will load the vanilla ROM, defined in the Program Settings.

By checking Build assembly before compiling LAMP will build the current state of the assembly files before using the ROM as a base. IMPORTANT: A build.bat file has to be present in the root of the path for this option to be enabled.
Note: LAMP will just execute the build.bat. The contents can be defined by the user.

Before compiling, LAMP will check if a symbol file exists at the path DISASSEMBLYPATH\out\M2RoS.sym. If it does, LAMP can use the links written in that symbol file as offsets when compiling the ROM. This way adding or removing instructions from the disassembly does not affect LAMP's ability to compile the ROM and the result won't be broken, if data got moved.

Tileset Usage

LAMP allows the user to define Tilesets. If "Use direct graphical Offsets if possible" is checked, the game will ignore the defined Tilesets and use a direct offsets to graphics instead. Given the circumstance you might also need to manually select the correct metatile table, collision table and solidity indices. Checking "Use Tilesets if possible" will make the editor try and replace all these direct offsets with a Tileset reference. Due to the program still being in development some memory offsets may not get replaced with a Tileset selector. Some windows need to be reopened to update the interface.

Default Tile

Whenever LAMP clears a tile based display, like under the Main Window, it will use the tile ID set by this box.

Compiling

Metroid 2 stores objects in sets per screen. Due to the way it loads objects the game expects each empty screen to point to a unique empty set. Checking Optimise Object Data optimises the used memory space by only storing one empty set and pointing to that set for each empty screen. Overall this allows for a lot more objects than in the original game and better memory usage. Unfortunately, the game will not load the objects correctly unless the object loading code is slightly modified, this can be done manually or by checking Fix vertical Object loading.

If a path is given to a M2RoS Disassembly at the Disassembly Path and a build.bat file exists at the given path the option to build that M2RoS Disassembly before compiling the ROM will be given. LAMP will execute the build.bat file, which can be modified to have the contents that the user desires.