Add GBAGetGameTitle

This commit is contained in:
Jeffrey Pfau 2014-10-18 01:06:17 -07:00
parent 830e6dbda6
commit 1fcca799eb
2 changed files with 5 additions and 0 deletions

View File

@ -626,6 +626,10 @@ void GBAGetGameCode(struct GBA* gba, char* out) {
memcpy(out, &((struct GBACartridge*) gba->memory.rom)->id, 4); 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) { void GBAHitStub(struct ARMCore* cpu, uint32_t opcode) {
struct GBA* gba = (struct GBA*) cpu->master; struct GBA* gba = (struct GBA*) cpu->master;
enum GBALogLevel level = GBA_LOG_FATAL; enum GBALogLevel level = GBA_LOG_FATAL;

View File

@ -151,6 +151,7 @@ void GBAApplyPatch(struct GBA* gba, struct Patch* patch);
bool GBAIsROM(struct VFile* vf); bool GBAIsROM(struct VFile* vf);
void GBAGetGameCode(struct GBA* gba, char* out); void GBAGetGameCode(struct GBA* gba, char* out);
void GBAGetGameTitle(struct GBA* gba, char* out);
__attribute__((format (printf, 3, 4))) __attribute__((format (printf, 3, 4)))
void GBALog(struct GBA* gba, enum GBALogLevel level, const char* format, ...); void GBALog(struct GBA* gba, enum GBALogLevel level, const char* format, ...);