From bcb9ae5d657a33b65dd43b1ecfa0963a1b745ef0 Mon Sep 17 00:00:00 2001 From: Lesserkuma Date: Tue, 1 Aug 2023 12:47:35 +0200 Subject: [PATCH] - --- rom_builder/rom_builder.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/rom_builder/rom_builder.py b/rom_builder/rom_builder.py index a259879..551baa8 100644 --- a/rom_builder/rom_builder.py +++ b/rom_builder/rom_builder.py @@ -5,7 +5,7 @@ import sys, os, glob, json, math, re, struct, hashlib, argparse, datetime # Configuration -app_version = "0.3" +app_version = "0.4" default_file = "LK_MULTIMENU_.gba" ################################ @@ -84,13 +84,19 @@ if not os.path.exists(args.config): cartridge_type = 1 battery_present = False for file in files: - games.append({ + d = { "enabled": True, "file": os.path.split(file)[1], "title": os.path.splitext(os.path.split(file)[1])[0], "title_font": 1, "save_slot": save_slot, - }) + } + with open(file, "rb") as f: + f.seek(0xAC) + code = f.read(0x4) + if code[:3] in (b"BPG", b"BPR"): + d["map_256m"] = True + games.append(d) save_slot += 1 obj = { "cartridge": {