Implement everything for Gameboy Doctor
This commit is contained in:
parent
66c19caaee
commit
c52aa91f26
8 changed files with 136 additions and 14 deletions
cartridge
|
@ -5,10 +5,10 @@
|
|||
#include <fstream>
|
||||
|
||||
enum CartridgeType : u8 {
|
||||
ROM_ONLY = 0x00,
|
||||
MBC1 = 0x01,
|
||||
MBC1_RAM = 0x02,
|
||||
MBC1_RAM_BATTERY = 0x03,
|
||||
CT_ROM_ONLY = 0x00,
|
||||
CT_MBC1 = 0x01,
|
||||
CT_MBC1_RAM = 0x02,
|
||||
CT_MBC1_RAM_BATTERY = 0x03,
|
||||
};
|
||||
|
||||
class Cartridge {
|
||||
|
@ -28,10 +28,14 @@ public:
|
|||
u8 operator[](size_t addr);
|
||||
|
||||
inline
|
||||
const char* title()
|
||||
const char* title() const
|
||||
{ return _title; }
|
||||
|
||||
inline
|
||||
size_t size()
|
||||
CartridgeType type() const
|
||||
{ return (CartridgeType)_data[0x147]; }
|
||||
|
||||
inline
|
||||
size_t size() const
|
||||
{ return _size; }
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue