Procházet zdrojové kódy

Stub out rom_product(); minor tweak.

master
Ben Kurtovic před 9 roky
rodič
revize
d47ce5735b
3 změnil soubory, kde provedl 17 přidání a 3 odebrání
  1. +2
    -2
      src/gamegear.c
  2. +14
    -1
      src/rom.c
  3. +1
    -0
      src/rom.h

+ 2
- 2
src/gamegear.c Zobrazit soubor

@@ -125,10 +125,10 @@ const char* gamegear_get_exception(GameGear *gg)
SET_EXC("CPU not powered")
break;
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;
default:
SET_EXC("Unknown exception")
SET_EXC("unknown exception")
break;
}
} else {


+ 14
- 1
src/rom.c Zobrazit soubor

@@ -105,7 +105,8 @@ static bool parse_header(ROM *rom, const uint8_t *header)
else
DEBUG(" - checksum: 0x%04X (invalid, expected 0x%04X)",
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(" - region code: %u (%s)", rom->region_code,
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.

NULL is returned if the region code is invalid.


+ 1
- 0
src/rom.h Zobrazit soubor

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

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

Načítá se…
Zrušit
Uložit