diff options
Diffstat (limited to 'src/emu/bus/gameboy')
| -rw-r--r-- | src/emu/bus/gameboy/gb_slot.h | 2 | ||||
| -rw-r--r-- | src/emu/bus/gameboy/mbc.c | 20 | ||||
| -rw-r--r-- | src/emu/bus/gameboy/mbc.h | 22 |
3 files changed, 22 insertions, 22 deletions
diff --git a/src/emu/bus/gameboy/gb_slot.h b/src/emu/bus/gameboy/gb_slot.h index c04220323a4..61a7a7d8350 100644 --- a/src/emu/bus/gameboy/gb_slot.h +++ b/src/emu/bus/gameboy/gb_slot.h @@ -69,7 +69,7 @@ public: void rom_map_setup(UINT32 size); void ram_map_setup(UINT8 banks); - virtual void set_additional_wirings(UINT8 mask, int shift) { } // MBC-1 will then overwrite this! + virtual void set_additional_wirings(UINT8 mask, int shift) { } // MBC-1 will then overwrite this! void set_has_timer(bool val) { has_timer = val; } void set_has_rumble(bool val) { has_rumble = val; } void set_has_battery(bool val) { has_battery = val; } diff --git a/src/emu/bus/gameboy/mbc.c b/src/emu/bus/gameboy/mbc.c index a303910055e..9d1e5aef40e 100644 --- a/src/emu/bus/gameboy/mbc.c +++ b/src/emu/bus/gameboy/mbc.c @@ -25,7 +25,7 @@ const device_type GB_ROM_MBC7 = &device_creator<gb_rom_mbc7_device>; const device_type GB_ROM_M161_M12 = &device_creator<gb_rom_m161_device>; const device_type GB_ROM_MMM01 = &device_creator<gb_rom_mmm01_device>; const device_type GB_ROM_SACHEN1 = &device_creator<gb_rom_sachen1_device>; -const device_type GB_ROM_SACHEN2 = &device_creator<gb_rom_sachen1_device>; // Just a placeholder for the moment... +const device_type GB_ROM_SACHEN2 = &device_creator<gb_rom_sachen1_device>; // Just a placeholder for the moment... const device_type GB_ROM_188IN1 = &device_creator<gb_rom_188in1_device>; const device_type GB_ROM_SINTAX = &device_creator<gb_rom_sintax_device>; const device_type GB_ROM_CHONGWU = &device_creator<gb_rom_chongwu_device>; @@ -322,18 +322,18 @@ WRITE8_MEMBER(gb_rom_mbc1_device::write_bank) // the mapper only uses inputs A13-A15 switch (offset & 0xe000) { - case 0x0000: // RAM Enable Register + case 0x0000: // RAM Enable Register m_ram_enable = ((data & 0x0f) == 0x0a) ? 1 : 0; break; - case 0x2000: // ROM Bank Register + case 0x2000: // ROM Bank Register data &= 0x1f; m_latch_bank2 = data ? data : 1; m_latch_bank2 &= m_mask; break; - case 0x4000: // RAM Bank Register + case 0x4000: // RAM Bank Register m_ram_bank = data & 0x3; break; - case 0x6000: // MBC1 Mode Register + case 0x6000: // MBC1 Mode Register default: m_mode = (data & 0x1) ? MODE_4M_256k : MODE_16M_8k; break; @@ -647,10 +647,10 @@ WRITE8_MEMBER(gb_rom_m161_device::write_bank) { switch (offset & 0xe000) { - case 0x4000: // Base Bank Register + case 0x4000: // Base Bank Register m_base_bank = data << 1; break; - case 0x2000: // Tetris writes 1 here when selected... + case 0x2000: // Tetris writes 1 here when selected... default: break; } @@ -715,18 +715,18 @@ READ8_MEMBER(gb_rom_sachen1_device::read_rom) WRITE8_MEMBER(gb_rom_sachen1_device::write_bank) { - if (offset < 0x2000) // Base ROM Bank register + if (offset < 0x2000) // Base ROM Bank register { if ((m_latch_bank2 & 0x30) == 0x30 && data) m_base_bank = data & 0x0f; //logerror("write to base bank %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); } - else if (offset < 0x4000) // ROM Bank Register + else if (offset < 0x4000) // ROM Bank Register { m_latch_bank2 = data ? data : 1; //logerror("write to latch %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); } - else if (offset < 0x6000) // ROM bank mask register + else if (offset < 0x6000) // ROM bank mask register { if ((m_latch_bank2 & 0x30) == 0x30) m_mask = data; diff --git a/src/emu/bus/gameboy/mbc.h b/src/emu/bus/gameboy/mbc.h index bda06a65523..1d9e35c7ba9 100644 --- a/src/emu/bus/gameboy/mbc.h +++ b/src/emu/bus/gameboy/mbc.h @@ -33,12 +33,12 @@ public: class gb_rom_mbc1_device : public gb_rom_mbc_device { public: - + enum { MODE_16M_8k = 0, /// 16Mbit ROM, 8kBit RAM MODE_4M_256k = 1, /// 4Mbit ROM, 256kBit RAM }; - + // construction/destruction gb_rom_mbc1_device(const machine_config &mconfig, device_type type, const char *name, const char *tag, device_t *owner, UINT32 clock, const char *shortname, const char *source); gb_rom_mbc1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); @@ -46,7 +46,7 @@ public: // device-level overrides virtual void device_start() { shared_start(); save_item(NAME(m_mode)); }; virtual void device_reset() { shared_reset(); m_mode = MODE_16M_8k; }; - virtual void set_additional_wirings(UINT8 mask, int shift) { m_mask = mask; m_shift = shift; } // these get set at cart loading + virtual void set_additional_wirings(UINT8 mask, int shift) { m_mask = mask; m_shift = shift; } // these get set at cart loading virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); @@ -156,19 +156,19 @@ public: class gb_rom_m161_device : public gb_rom_mbc_device { public: - + // construction/destruction gb_rom_m161_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(write_ram) { } - + UINT8 m_base_bank; }; @@ -194,19 +194,19 @@ public: class gb_rom_sachen1_device : public gb_rom_mbc1_device { public: - + // construction/destruction gb_rom_sachen1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock); - + // device-level overrides virtual void device_start(); virtual void device_reset(); - + virtual DECLARE_READ8_MEMBER(read_rom); virtual DECLARE_WRITE8_MEMBER(write_bank); virtual DECLARE_READ8_MEMBER(read_ram) { return 0xff; } virtual DECLARE_WRITE8_MEMBER(write_ram) { } - + UINT8 m_base_bank, m_mask; }; |
