Implement everything for Gameboy Doctor

This commit is contained in:
madmaurice 2023-09-01 23:19:02 +02:00
parent 66c19caaee
commit c52aa91f26
8 changed files with 136 additions and 14 deletions
cartridge

View file

@ -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; }
};