Browse Source

Stub out rom_product(); minor tweak.

master
Ben Kurtovic 9 years ago
parent
commit
d47ce5735b
3 changed files with 17 additions and 3 deletions
  1. +2
    -2
      src/gamegear.c
  2. +14
    -1
      src/rom.c
  3. +1
    -0
      src/rom.h

+ 2
- 2
src/gamegear.c View File

@@ -125,10 +125,10 @@ const char* gamegear_get_exception(GameGear *gg)
SET_EXC("CPU not powered") SET_EXC("CPU not powered")
break; break;
case Z80_EXC_UNIMPLEMENTED_OPCODE: case Z80_EXC_UNIMPLEMENTED_OPCODE:
SET_EXC("Unimplemented opcode: 0x%02X", gg->cpu.exc_data)
SET_EXC("unimplemented opcode: 0x%02X", gg->cpu.exc_data)
break; break;
default: default:
SET_EXC("Unknown exception")
SET_EXC("unknown exception")
break; break;
} }
} else { } else {


+ 14
- 1
src/rom.c View File

@@ -105,7 +105,8 @@ static bool parse_header(ROM *rom, const uint8_t *header)
else else
DEBUG(" - checksum: 0x%04X (invalid, expected 0x%04X)", DEBUG(" - checksum: 0x%04X (invalid, expected 0x%04X)",
rom->reported_checksum, rom->expected_checksum) rom->reported_checksum, rom->expected_checksum)
DEBUG(" - product code: %u", rom->product_code)
DEBUG(" - product code: %u (%s)", rom->product_code,
rom_product(rom) ? rom_product(rom) : "unknown")
DEBUG(" - version: %u", rom->version) DEBUG(" - version: %u", rom->version)
DEBUG(" - region code: %u (%s)", rom->region_code, DEBUG(" - region code: %u (%s)", rom->region_code,
rom_region(rom) ? rom_region(rom) : "unknown") rom_region(rom) ? rom_region(rom) : "unknown")
@@ -227,6 +228,18 @@ void rom_close(ROM *rom)
} }


/* /*
Return a string explanation of this ROM's product code.

NULL is returned if the product code is not known.
*/
const char* rom_product(const ROM *rom)
{
// TODO

return NULL;
}

/*
Return the region this ROM was intended for, based on header information. Return the region this ROM was intended for, based on header information.


NULL is returned if the region code is invalid. NULL is returned if the region code is invalid.


+ 1
- 0
src/rom.h View File

@@ -41,4 +41,5 @@ typedef struct {


const char* rom_open(ROM**, const char*); const char* rom_open(ROM**, const char*);
void rom_close(ROM*); void rom_close(ROM*);
const char* rom_product(const ROM*);
const char* rom_region(const ROM*); const char* rom_region(const ROM*);

Loading…
Cancel
Save