Skip to content

Commit

Permalink
Fix VisualBoyAdvance-M save type detection not working
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
jturcotte committed Oct 22, 2024
1 parent acef1b1 commit 2cae45d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions linker_scripts/mono_boot.ld
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@ SECTIONS {
.text : {
/* be sure that the ROM header is the very first */
*(.text.gba_rom_header);

/* Hardcode the string SRAM_Vnnn right after gba_rom_header for faster save game type detection. */
/* https://rust-console.github.io/gbatek-gbaonly/#--gba-cart-backup-ids */
BYTE(0x53); /* 'S' */
BYTE(0x52); /* 'R' */
BYTE(0x41); /* 'A' */
BYTE(0x4D); /* 'M' */
BYTE(0x5F); /* '_' */
BYTE(0x56); /* 'V' */
BYTE(0x6E); /* 'n' */
BYTE(0x6E); /* 'n' */
BYTE(0x6E); /* 'n' */

*(.text .text.*);
. = ALIGN(4);
} >rom = 0x00
Expand Down

0 comments on commit 2cae45d

Please sign in to comment.