diff --git a/cardLanguage.go b/cardLanguage.go index 8a26204..95b886a 100644 --- a/cardLanguage.go +++ b/cardLanguage.go @@ -26,6 +26,10 @@ for $D000-$F7FF. Power on RESET initializes ROM to read mode and RAM to write mode, and selects the second 4K bank to map $D000-$DFFF." +Writing to the softswtich disables writing in LC? Saw that +somewhere but doing so fails IIe self check. + + */ type cardLanguage struct { @@ -56,11 +60,11 @@ func (c *cardLanguage) assign(a *Apple2, slot int) { for i := uint8(0x0); i <= 0xf; i++ { iCopy := i c.addCardSoftSwitchR(iCopy, func(*ioC0Page) uint8 { - c.ssAction(iCopy, false) + c.ssAction(iCopy) return 0 }, "LANGCARDR") c.addCardSoftSwitchW(iCopy, func(*ioC0Page, uint8) { - c.ssAction(iCopy, true) + c.ssAction(iCopy) }, "LANGCARDW") } @@ -68,7 +72,7 @@ func (c *cardLanguage) assign(a *Apple2, slot int) { c.applyState() } -func (c *cardLanguage) ssAction(ss uint8, write bool) { +func (c *cardLanguage) ssAction(ss uint8) { c.altBank = ((ss >> 3) & 1) == 0 action := ss & 0x3 switch action { @@ -94,11 +98,6 @@ func (c *cardLanguage) ssAction(ss uint8, write bool) { c.writeState = lcWriteEnabled } - // Writing to the softswtich disables writes. - if write { - c.writeState = lcWriteDisabled - } - c.applyState() } diff --git a/cardSaturn.go b/cardSaturn.go index d68f91a..b8cbe7f 100644 --- a/cardSaturn.go +++ b/cardSaturn.go @@ -35,18 +35,19 @@ func (c *cardSaturn) assign(a *Apple2, slot int) { for i := uint8(0x0); i <= 0xf; i++ { iCopy := i c.addCardSoftSwitchR(iCopy, func(*ioC0Page) uint8 { - c.ssAction(iCopy, false) + c.ssAction(iCopy) return 0 }, "SATURNR") c.addCardSoftSwitchW(iCopy, func(*ioC0Page, uint8) { - c.ssAction(iCopy, true) + c.ssAction(iCopy) + c.ssAction(iCopy) }, "SATURNW") } c.cardBase.assign(a, slot) c.applyState() } -func (c *cardSaturn) ssAction(ss uint8, write bool) { +func (c *cardSaturn) ssAction(ss uint8) { switch ss { case 0: // RAM read, no writes @@ -110,11 +111,6 @@ func (c *cardSaturn) ssAction(ss uint8, write bool) { c.writeState = lcWriteEnabled } - // Writing to the softswtich disables writes. - if write { - c.writeState = lcWriteDisabled - } - c.applyState() }