summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame
diff options
context:
space:
mode:
author arbee <rb6502@users.noreply.github.com>2021-10-23 17:45:20 -0400
committer arbee <rb6502@users.noreply.github.com>2021-10-23 17:45:20 -0400
commitd699e52606fbb3282799f3912bf8c9e70f7ab503 (patch)
treedc8883c19aadd6976fed904a874c5a6a0e9bb9c4 /src/mame
parentf489f974b9a89caf8bf68f01d9ab39382251e2a5 (diff)
apple2gs: ROM 0/1 have the $C028 ROMSWITCH, support it. [R. Belmont]
Diffstat (limited to 'src/mame')
-rw-r--r--src/mame/drivers/apple2gs.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/mame/drivers/apple2gs.cpp b/src/mame/drivers/apple2gs.cpp
index 7df85e9c9cb..6d3c9624313 100644
--- a/src/mame/drivers/apple2gs.cpp
+++ b/src/mame/drivers/apple2gs.cpp
@@ -495,6 +495,8 @@ private:
int m_inh_slot, m_cnxx_slot;
int m_motoroff_time;
+ bool m_romswitch;
+
bool m_page2;
bool m_an0, m_an1, m_an2, m_an3;
@@ -1434,6 +1436,7 @@ void apple2gs_state::machine_start()
save_item(NAME(m_inh_bank));
save_item(NAME(m_cnxx_slot));
save_item(NAME(m_page2));
+ save_item(NAME(m_romswitch));
save_item(NAME(m_an0));
save_item(NAME(m_an1));
save_item(NAME(m_an2));
@@ -1527,6 +1530,7 @@ void apple2gs_state::machine_start()
void apple2gs_state::machine_reset()
{
m_page2 = false;
+ m_romswitch = false;
m_video->m_page2 = false;
m_an0 = m_an1 = m_an2 = m_an3 = false;
m_gameio->an0_w(0);
@@ -2028,14 +2032,14 @@ void apple2gs_state::lc_update(int offset, bool writing)
{
m_lcbank->set_bank(1);
m_lcaux->set_bank(1);
- m_lc00->set_bank(1);
+ m_lc00->set_bank(1 + (m_romswitch ? 2 : 0));
m_lc01->set_bank(1);
}
else
{
m_lcbank->set_bank(0);
m_lcaux->set_bank(0);
- m_lc00->set_bank(0);
+ m_lc00->set_bank(0 + (m_romswitch ? 2 : 0));
m_lc01->set_bank(0);
}
}
@@ -2073,7 +2077,19 @@ void apple2gs_state::do_io(int offset)
case 0x20:
break;
- case 0x28:
+ case 0x28: // ROMSWITCH - not used by the IIgs firmware or SSW, but does exist at least on ROM 0/1 (need to test on ROM 3 hw)
+ if (!m_is_rom3)
+ {
+ m_romswitch = !m_romswitch;
+ if (m_lcram)
+ {
+ m_lc00->set_bank(1 + (m_romswitch ? 2 : 0));
+ }
+ else
+ {
+ m_lc00->set_bank(0 + (m_romswitch ? 2 : 0));
+ }
+ }
break;
case 0x30:
@@ -4087,6 +4103,8 @@ void apple2gs_state::lc00_map(address_map &map)
{
map(0x0000, 0x2fff).rom().region("maincpu", 0x3d000).w(FUNC(apple2gs_state::lc_00_w));
map(0x3000, 0x5fff).rw(FUNC(apple2gs_state::lc_00_r), FUNC(apple2gs_state::lc_00_w));
+ map(0x6000, 0x8fff).rom().region("maincpu", 0x39000).w(FUNC(apple2gs_state::lc_00_w));
+ map(0x9000, 0xbfff).rw(FUNC(apple2gs_state::lc_00_r), FUNC(apple2gs_state::lc_00_w));
}
void apple2gs_state::lc01_map(address_map &map)