mirror of
https://github.com/lesserkuma/GBA_MultiMenu.git
synced 2026-08-23 17:14:10 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8dc1d10a95 |
@@ -5,7 +5,7 @@
|
|||||||
import sys, os, glob, json, math, re, struct, hashlib, argparse, datetime
|
import sys, os, glob, json, math, re, struct, hashlib, argparse, datetime
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
app_version = "0.4"
|
app_version = "0.5"
|
||||||
default_file = "LK_MULTIMENU_<CODE>.gba"
|
default_file = "LK_MULTIMENU_<CODE>.gba"
|
||||||
|
|
||||||
################################
|
################################
|
||||||
@@ -316,7 +316,7 @@ logp("Menu ROM: 0x{:07X}–0x{:07X}".format(0, len(menu_rom)))
|
|||||||
logp("Game List: 0x{:07X}–0x{:07X}".format(item_list_offset * sector_size, item_list_offset * sector_size + len(item_list)))
|
logp("Game List: 0x{:07X}–0x{:07X}".format(item_list_offset * sector_size, item_list_offset * sector_size + len(item_list)))
|
||||||
logp("Status Area: 0x{:07X}–0x{:07X}".format(status_offset * sector_size, status_offset * sector_size + 0x1000))
|
logp("Status Area: 0x{:07X}–0x{:07X}".format(status_offset * sector_size, status_offset * sector_size + 0x1000))
|
||||||
logp("")
|
logp("")
|
||||||
logp("Cartridge Type: {:d} ({:s} {:s})".format(cartridge_type, cartridge_types[cartridge_type]["name"], "with battery" if battery_present else "without battery"))
|
logp("Cartridge Type: {:d} ({:s}) {:s}".format(cartridge_type + 1, cartridge_types[cartridge_type]["name"], "with battery" if battery_present else "without battery"))
|
||||||
logp("Output ROM Size: {:.2f} MiB".format(rom_size / 1024 / 1024))
|
logp("Output ROM Size: {:.2f} MiB".format(rom_size / 1024 / 1024))
|
||||||
logp("Output ROM Code: {:s}".format(rom_code))
|
logp("Output ROM Code: {:s}".format(rom_code))
|
||||||
output_file = output_file.replace("<CODE>", rom_code)
|
output_file = output_file.replace("<CODE>", rom_code)
|
||||||
@@ -326,7 +326,7 @@ if args.split:
|
|||||||
size = 0x2000000
|
size = 0x2000000
|
||||||
if pos > len(compilation[:rom_size]): break
|
if pos > len(compilation[:rom_size]): break
|
||||||
if pos + size > rom_size: size = rom_size - pos
|
if pos + size > rom_size: size = rom_size - pos
|
||||||
output_file_part = "{:s}_part{:d}{:s}".format(os.path.splitext(output_file)[0], i + 1, os.path.splitext(output_file)[1])
|
output_file_part = "{:s}_part{:d}{:s}".format(os.path.splitext(output_file)[0], i, os.path.splitext(output_file)[1])
|
||||||
with open(output_file_part, "wb") as f: f.write(compilation[pos:pos+size])
|
with open(output_file_part, "wb") as f: f.write(compilation[pos:pos+size])
|
||||||
else:
|
else:
|
||||||
with open(output_file, "wb") as f: f.write(compilation[:rom_size])
|
with open(output_file, "wb") as f: f.write(compilation[:rom_size])
|
||||||
|
|||||||
@@ -215,14 +215,11 @@ IWRAM_CODE u8 BootGame(ItemConfig config, FlashStatus status)
|
|||||||
if (_flash_type == 0)
|
if (_flash_type == 0)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Temporarily store SRAM values at mapper registers
|
// Temporarily store SRAM values located at mapper registers
|
||||||
if (status.last_boot_save_type == SRAM_NONE)
|
sram_register_backup[0] = *(vu8 *)MAPPER_CONFIG1;
|
||||||
{
|
sram_register_backup[1] = *(vu8 *)MAPPER_CONFIG2;
|
||||||
sram_register_backup[0] = *(vu8 *)MAPPER_CONFIG1;
|
sram_register_backup[2] = *(vu8 *)MAPPER_CONFIG3;
|
||||||
sram_register_backup[1] = *(vu8 *)MAPPER_CONFIG2;
|
sram_register_backup[3] = *(vu8 *)MAPPER_CONFIG4;
|
||||||
sram_register_backup[2] = *(vu8 *)MAPPER_CONFIG3;
|
|
||||||
sram_register_backup[3] = *(vu8 *)MAPPER_CONFIG4;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Enable SRAM access
|
// Enable SRAM access
|
||||||
*(vu8 *)MAPPER_CONFIG4 = 1;
|
*(vu8 *)MAPPER_CONFIG4 = 1;
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ Author: Lesserkuma (github.com/lesserkuma)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define MAGIC_FLASH_STATUS 0x414D554B
|
#define MAGIC_FLASH_STATUS 0x414D554B
|
||||||
#define FLASH_STATUS_LOCATION 0xA0000
|
|
||||||
|
|
||||||
typedef struct __attribute__((packed)) FlashStatus_
|
typedef struct __attribute__((packed)) FlashStatus_
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user