From e57a4b21e63ae103d259bcb2e14f2d849636f879 Mon Sep 17 00:00:00 2001 From: Ivan Izaguirre Date: Mon, 9 Mar 2020 23:20:11 +0100 Subject: [PATCH] Unused softswitches on the Slinky return 255 --- cardMemoryExpansion.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cardMemoryExpansion.go b/cardMemoryExpansion.go index a10589d..475c292 100644 --- a/cardMemoryExpansion.go +++ b/cardMemoryExpansion.go @@ -28,7 +28,6 @@ value in the range $F0-FF. The top nybble can be any value when you write it, but it will always be “F” when you read it. If the card has more than one Megabyte of RAM, the top nybble will be a meaningful part of the address. - */ const ( memoryExpansionSize256 = 256 * 1024 @@ -90,5 +89,12 @@ func (c *cardMemoryExpansion) assign(a *Apple2, slot int) { c.index = (c.index + 1) & memoryExpansionMask }, "MEMORYEXW") + // The rest of the softswitches return 255, at least on //e and //c + for i := uint8(4); i < 16; i++ { + c.addCardSoftSwitchR(i, func(*ioC0Page) uint8 { + return 255 + }, "MEMORYEXUNUSEDR") + } + c.cardBase.assign(a, slot) }