From 8ee23744b54197fcc8c63f12fd1224bf6af31f05 Mon Sep 17 00:00:00 2001 From: Curt Coder Date: Fri, 26 Oct 2012 22:26:47 +0000 Subject: [PATCH] (MESS) c64: Fixed StarDOS cartridge. (nw) --- src/mess/machine/c64_stardos.c | 12 +++++++++++- src/mess/machine/c64_stardos.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/mess/machine/c64_stardos.c b/src/mess/machine/c64_stardos.c index f8342271066..469b44cc1d7 100644 --- a/src/mess/machine/c64_stardos.c +++ b/src/mess/machine/c64_stardos.c @@ -191,5 +191,15 @@ void c64_stardos_cartridge_device::c64_cd_w(address_space &space, offs_t offset, int c64_stardos_cartridge_device::c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram) { - return !(ba & rw & ((offset & 0xe000) == 0xe000) & hiram); + return !(sphi2 && ba & rw & ((offset & 0xe000) == 0xe000) & hiram); +} + + +//------------------------------------------------- +// c64_exrom_r - EXROM read +//------------------------------------------------- + +int c64_stardos_cartridge_device::c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram) +{ + return (BIT(offset, 13)) ? 1 : m_exrom; } diff --git a/src/mess/machine/c64_stardos.h b/src/mess/machine/c64_stardos.h index 35a48af85de..694a13dacb3 100644 --- a/src/mess/machine/c64_stardos.h +++ b/src/mess/machine/c64_stardos.h @@ -46,6 +46,7 @@ protected: virtual UINT8 c64_cd_r(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2); virtual void c64_cd_w(address_space &space, offs_t offset, UINT8 data, int sphi2, int ba, int roml, int romh, int io1, int io2); virtual int c64_game_r(offs_t offset, int sphi2, int ba, int rw, int hiram); + virtual int c64_exrom_r(offs_t offset, int sphi2, int ba, int rw, int hiram); private: inline void charge_io1_capacitor();