Files
oracle-of-secrets/Docs/General/AsarUsage.md
scawful 6ba634caa4 Add comprehensive documentation for sprites and systems
- Introduced detailed analysis for the Minecart system, highlighting its state machine, track system, and areas for improvement.
- Created an NPCs analysis document, summarizing various NPC sprites and their functionalities.
- Added an Objects analysis document, covering interactive elements like collectibles, ice blocks, and minecarts.
- Documented the Overlord sprite system, detailing its role in spawning other sprites and managing events.
- Compiled a Dungeons & Indoor Areas document, outlining custom room tags, enhanced mechanics, and advanced collision systems.
- Developed an Overworld Systems Analysis, focusing on the ZSCustomOverworld architecture and its core features.
- Added a Time System document, explaining the in-game clock and day/night cycle management.
- Documented the ZScream Custom Overworld, detailing its data-driven approach and key features.
2025-10-02 12:44:30 -04:00

1.7 KiB

Asar Usage and ROM Management

This document outlines the best practices for using Asar and managing ROM files within the Oracle of Secrets project.

Safety First: Preserve the Clean ROM

The most important rule is to never modify the clean ROM directly. The clean ROM for this project is expected to be Roms/oos169.sfc. All patches must be applied to a copy of this file. This ensures that you always have a pristine base to work from and prevents irreversible changes to the original game file.

The Roms/ directory is ignored by git, so you don't have to worry about accidentally committing large ROM files.

The Build Script

A build.sh script is provided to automate the build process and enforce safe ROM management.

Usage

To build the ROM, run the script from the project root. You can optionally provide a version number.

Build with a version number:

./build.sh 1.0

This will create a patched ROM named Roms/oos-v1.0.sfc.

Build without a version number:

./build.sh

This will create a patched ROM named Roms/oos-patched.sfc.

What it Does

  1. Copies the ROM: It creates a copy of Roms/oos169.sfc.
  2. Applies the Patch: It runs asar to apply the main patch file (Oracle_main.asm) to the newly created ROM copy.
  3. Output: The final, patched ROM is placed in the Roms/ directory.

If you need to run the build process manually, follow these steps:

  1. Create a copy of the clean ROM:

    cp Roms/oos169.sfc Roms/my_patched_rom.sfc
    
  2. Run Asar:

    asar Oracle_main.asm Roms/my_patched_rom.sfc
    

Using the build.sh script is highly recommended to avoid mistakes.