From d773465455eb881ca7b2d2142392615ea5306422 Mon Sep 17 00:00:00 2001 From: Martin Haye Date: Thu, 7 Jul 2016 19:01:56 -0700 Subject: [PATCH] Fix for real Apple hardware: enabling language card requires reads, not writes. --- Platform/Apple/virtual/src/core/mem.s | 5 +++-- Platform/Apple/virtual/src/plasma/gameloop.pla | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Platform/Apple/virtual/src/core/mem.s b/Platform/Apple/virtual/src/core/mem.s index 5bbcd53e..366f017f 100644 --- a/Platform/Apple/virtual/src/core/mem.s +++ b/Platform/Apple/virtual/src/core/mem.s @@ -458,9 +458,10 @@ SWXX: bit monrts ; set V to denote SWX (not SBX) .shst lda evalStkH+1,x ; get hi byte of pointer to store to cmp #$D0 ; in $0000.CFFF range, bcc .norm ; just do normal store - sta setLcRW+lcBank2 ; PLASMA normally write-protects the LC, - sta setLcRW+lcBank2 ; but let's allow writing there. Don't use BIT as it affects V flg. cmp #$E0 ; in $E000.FFFF range do normal store after write-enable + ; Apple IIc note: turning on LC requires a 6502 read, not write. So putting sta below didn't work. + lda setLcRW+lcBank2 ; PLASMA normally write-protects the LC, + lda setLcRW+lcBank2 ; but let's allow writing there. Don't use BIT as it affects V flg. bcs .norm sty tmp jsr l_SXXX ; helper function in low memory because it switches us out (we're in main LC) diff --git a/Platform/Apple/virtual/src/plasma/gameloop.pla b/Platform/Apple/virtual/src/plasma/gameloop.pla index 8f0006f1..e9ec5fa7 100644 --- a/Platform/Apple/virtual/src/plasma/gameloop.pla +++ b/Platform/Apple/virtual/src/plasma/gameloop.pla @@ -2374,6 +2374,7 @@ def startGame() q_mapNum = 0 restoreMapPos() fin + crout() end ///////////////////////////////////////////////////////////////////////////////////////////////////