diff --git a/README.md b/README.md index dd9486f..877b6ba 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Portable emulator of an Apple II+. Written in Go. - Emulated extension cards: - DiskII controller - 16Kb Language Card - - 256kb Saturn RAM Card + - 256Kb Saturn RAM Card - Graphic modes: - Text, Lores and Hires - Displays: diff --git a/cardDisk2.go b/cardDisk2.go index 73a8a61..5043c30 100644 --- a/cardDisk2.go +++ b/cardDisk2.go @@ -138,9 +138,8 @@ func (c *cardDisk2) softSwitchQ6Q7(index int, in uint8) uint8 { if index&1 == 0 { // All even addresses return the last dataLatch return c.dataLatch - } else { - return 0 } + return 0 } func (c *cardDisk2) processQ6Q7(in uint8) { diff --git a/cardLanguage.go b/cardLanguage.go index 47c342c..b342048 100644 --- a/cardLanguage.go +++ b/cardLanguage.go @@ -56,11 +56,11 @@ func (c *cardLanguage) assign(a *Apple2, slot int) { for i := 0x0; i <= 0xf; i++ { iCopy := i - c.ssr[i] = func(*ioC0Page) uint8 { + c.ssr[iCopy] = func(*ioC0Page) uint8 { c.ssAction(iCopy) return 0 } - c.ssw[i] = func(*ioC0Page, uint8) { + c.ssw[iCopy] = func(*ioC0Page, uint8) { // Writing resets write count (from A2AUDIT) c.writeState = lcWriteDisabled } diff --git a/cardSaturn.go b/cardSaturn.go index c2a1d06..f19303e 100644 --- a/cardSaturn.go +++ b/cardSaturn.go @@ -47,13 +47,13 @@ func (c *cardSaturn) assign(a *Apple2, slot int) { } for i := 0x0; i <= 0xf; i++ { iCopy := i - c.ssr[i] = func(*ioC0Page) uint8 { + c.ssr[iCopy] = func(*ioC0Page) uint8 { c.ssAction(iCopy) return 0 } - c.ssw[i] = func(*ioC0Page, uint8) { - // Writing resets write count (from A2AUDIT) - c.writeState = lcWriteDisabled + c.ssw[iCopy] = func(*ioC0Page, uint8) { + // Writing does not reset write count + c.ssAction(iCopy) } } c.cardBase.assign(a, slot) diff --git a/core6502/addressing.go b/core6502/addressing.go index 37bd7dc..b35edb6 100644 --- a/core6502/addressing.go +++ b/core6502/addressing.go @@ -96,7 +96,7 @@ func resolve(s *State, line []uint8, opcode opcode) (getValue func() uint8, setV } else if register != regNone { s.reg.setRegister(register, value) } else { - // Todo: assert impossible + panic("Should never happen") } } return