Fix Saturn card to pass Saturn test

This commit is contained in:
Ivan Izaguirre 2019-06-07 17:42:18 +02:00
parent ded7c10ed3
commit b847cd34e6
5 changed files with 9 additions and 10 deletions

View File

@ -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:

View File

@ -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) {

View File

@ -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
}

View File

@ -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)

View File

@ -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