all repos — mgba @ 1fcca799eb50b76d0baacafcbb32dd54438f1047

mGBA Game Boy Advance Emulator

Add GBAGetGameTitle
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Oct 2014 01:06:17 -0700
commit

1fcca799eb50b76d0baacafcbb32dd54438f1047

parent

830e6dbda6391681f4079a0f6494550bf1052d4b

2 files changed, 5 insertions(+), 0 deletions(-)

jump to
M src/gba/gba.csrc/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.hsrc/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, ...);