Data Chunks - LAMP-Platform/LAMP GitHub Wiki

Data Chunks

LAMP utilizes a unique system to manage modifications made to the ROM without altering the original ROM file. This system revolves around the use of "Data Chunks."

Overview

Instead of directly modifying the ROM, LAMP stores all changes made by the user in multiple project files. In certain situations, binary changes required by LAMP cannot be saved within these project files using conventional data structures. In these cases, LAMP employs Data ChunksLAMP employs Data Chunks..

What are Data Chunks?

Data Chunks are small segments of raw binary data that store changes made to the ROM. They are designed to override the corresponding original data in the ROM when LAMP reads data for processing.

Priority and Functionality

Data Chunks always have reading priority over the base ROM. This means that whenever LAMP accesses data that has been altered (such as tile graphics), it will retrieve the modified data from the Data Chunks rather than the original unmodified data from the ROM.

Use Case Example: Graphics Editing

A practical example of where Data Chunks are essential is in graphic modifications. When changes to graphics are made using LAMP's built-in Graphics Editor:

  1. Modification: The user edits the tile graphics.
  2. Storage: These changes are saved as a Data Chunk.
  3. Priority: The Data Chunk then takes precedence over the original graphics in the ROM.
  4. Access: Upon subsequent access, LAMP reads the modified graphics from the Data Chunk instead of the ROM, ensuring that the latest changes are always displayed and used.

Note: This section will be expanded to include more detailed technical specifications in the future.