Add GBAGetGameTitle
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Oct 2014 01:06:17 -0700
2 files changed,
5 insertions(+),
0 deletions(-)
M
src/gba/gba.c
→
src/gba/gba.c
@@ -626,6 +626,10 @@ void GBAGetGameCode(struct GBA* gba, char* out) {
memcpy(out, &((struct GBACartridge*) gba->memory.rom)->id, 4); } +void GBAGetGameTitle(struct GBA* gba, char* out) { + memcpy(out, &((struct GBACartridge*) gba->memory.rom)->title, 12); +} + void GBAHitStub(struct ARMCore* cpu, uint32_t opcode) { struct GBA* gba = (struct GBA*) cpu->master; enum GBALogLevel level = GBA_LOG_FATAL;
M
src/gba/gba.h
→
src/gba/gba.h
@@ -151,6 +151,7 @@ void GBAApplyPatch(struct GBA* gba, struct Patch* patch);
bool GBAIsROM(struct VFile* vf); void GBAGetGameCode(struct GBA* gba, char* out); +void GBAGetGameTitle(struct GBA* gba, char* out); __attribute__((format (printf, 3, 4))) void GBALog(struct GBA* gba, enum GBALogLevel level, const char* format, ...);