17 const std::string& output_rom_path) {
43 for (
int i = 0; i < 10; i++) {
52 uint16_t bg_color = 0x0000 + (i * 0x1000);
56 (bg_color >> 8) & 0xFF);
59 uint16_t overlay = 0x0090 + i;
63 (overlay >> 8) & 0xFF);
69 for (
int j = 0; j < 8; j++) {
78 uint16_t message_id = 0x1000 + i;
81 (message_id >> 8) & 0xFF);
84 return absl::OkStatus();
88int main(
int argc,
char* argv[]) {
90 std::cerr <<
"Usage: " << argv[0] <<
" <input_rom> <output_rom>"
95 std::string input_rom = argv[1];
96 std::string output_rom = argv[2];
100 std::cerr <<
"Failed to create patched ROM: " << status.message()
105 std::cout <<
"Successfully created v3 patched ROM: " << output_rom
static absl::Status CreateV3PatchedROM(const std::string &input_rom_path, const std::string &output_rom_path)
static absl::Status ApplyV3Patch(Rom &rom)
The Rom class is used to load, save, and modify Rom data.
absl::Status LoadFromFile(const std::string &filename, bool z3_load=true)
absl::Status WriteByte(int addr, uint8_t value)
absl::Status SaveToFile(const SaveSettings &settings)
#define RETURN_IF_ERROR(expression)
Zelda 3 specific classes and functions.
constexpr int OverworldCustomTileGFXGroupEnabled
constexpr int OverworldCustomAreaSpecificBGEnabled
constexpr int kOverworldScreenSize
constexpr int OverworldCustomMosaicArray
constexpr int OverworldCustomAnimatedGFXEnabled
constexpr int OverworldCustomMainPaletteEnabled
constexpr int OverworldCustomMainPaletteArray
constexpr int OverworldCustomASMHasBeenApplied
constexpr int kOverworldMessagesExpanded
constexpr int OverworldCustomAnimatedGFXArray
constexpr int OverworldCustomMosaicEnabled
constexpr int OverworldCustomTileGFXGroupArray
constexpr int OverworldCustomSubscreenOverlayEnabled
constexpr int OverworldCustomAreaSpecificBGPalette
constexpr int OverworldCustomSubscreenOverlayArray
Main namespace for the application.