mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-01-30 21:31:21 +00:00
LC mem fix. Fixes IIe self check and The Games: Summer Edition
This commit is contained in:
parent
b9dbcc43a8
commit
810c1a7d89
@ -26,6 +26,10 @@ for $D000-$F7FF.
|
|||||||
Power on RESET initializes ROM to read mode and RAM to write mode,
|
Power on RESET initializes ROM to read mode and RAM to write mode,
|
||||||
and selects the second 4K bank to map $D000-$DFFF."
|
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 {
|
type cardLanguage struct {
|
||||||
@ -56,11 +60,11 @@ func (c *cardLanguage) assign(a *Apple2, slot int) {
|
|||||||
for i := uint8(0x0); i <= 0xf; i++ {
|
for i := uint8(0x0); i <= 0xf; i++ {
|
||||||
iCopy := i
|
iCopy := i
|
||||||
c.addCardSoftSwitchR(iCopy, func(*ioC0Page) uint8 {
|
c.addCardSoftSwitchR(iCopy, func(*ioC0Page) uint8 {
|
||||||
c.ssAction(iCopy, false)
|
c.ssAction(iCopy)
|
||||||
return 0
|
return 0
|
||||||
}, "LANGCARDR")
|
}, "LANGCARDR")
|
||||||
c.addCardSoftSwitchW(iCopy, func(*ioC0Page, uint8) {
|
c.addCardSoftSwitchW(iCopy, func(*ioC0Page, uint8) {
|
||||||
c.ssAction(iCopy, true)
|
c.ssAction(iCopy)
|
||||||
}, "LANGCARDW")
|
}, "LANGCARDW")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,7 +72,7 @@ func (c *cardLanguage) assign(a *Apple2, slot int) {
|
|||||||
c.applyState()
|
c.applyState()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cardLanguage) ssAction(ss uint8, write bool) {
|
func (c *cardLanguage) ssAction(ss uint8) {
|
||||||
c.altBank = ((ss >> 3) & 1) == 0
|
c.altBank = ((ss >> 3) & 1) == 0
|
||||||
action := ss & 0x3
|
action := ss & 0x3
|
||||||
switch action {
|
switch action {
|
||||||
@ -94,11 +98,6 @@ func (c *cardLanguage) ssAction(ss uint8, write bool) {
|
|||||||
c.writeState = lcWriteEnabled
|
c.writeState = lcWriteEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
// Writing to the softswtich disables writes.
|
|
||||||
if write {
|
|
||||||
c.writeState = lcWriteDisabled
|
|
||||||
}
|
|
||||||
|
|
||||||
c.applyState()
|
c.applyState()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,18 +35,19 @@ func (c *cardSaturn) assign(a *Apple2, slot int) {
|
|||||||
for i := uint8(0x0); i <= 0xf; i++ {
|
for i := uint8(0x0); i <= 0xf; i++ {
|
||||||
iCopy := i
|
iCopy := i
|
||||||
c.addCardSoftSwitchR(iCopy, func(*ioC0Page) uint8 {
|
c.addCardSoftSwitchR(iCopy, func(*ioC0Page) uint8 {
|
||||||
c.ssAction(iCopy, false)
|
c.ssAction(iCopy)
|
||||||
return 0
|
return 0
|
||||||
}, "SATURNR")
|
}, "SATURNR")
|
||||||
c.addCardSoftSwitchW(iCopy, func(*ioC0Page, uint8) {
|
c.addCardSoftSwitchW(iCopy, func(*ioC0Page, uint8) {
|
||||||
c.ssAction(iCopy, true)
|
c.ssAction(iCopy)
|
||||||
|
c.ssAction(iCopy)
|
||||||
}, "SATURNW")
|
}, "SATURNW")
|
||||||
}
|
}
|
||||||
c.cardBase.assign(a, slot)
|
c.cardBase.assign(a, slot)
|
||||||
c.applyState()
|
c.applyState()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *cardSaturn) ssAction(ss uint8, write bool) {
|
func (c *cardSaturn) ssAction(ss uint8) {
|
||||||
switch ss {
|
switch ss {
|
||||||
case 0:
|
case 0:
|
||||||
// RAM read, no writes
|
// RAM read, no writes
|
||||||
@ -110,11 +111,6 @@ func (c *cardSaturn) ssAction(ss uint8, write bool) {
|
|||||||
c.writeState = lcWriteEnabled
|
c.writeState = lcWriteEnabled
|
||||||
}
|
}
|
||||||
|
|
||||||
// Writing to the softswtich disables writes.
|
|
||||||
if write {
|
|
||||||
c.writeState = lcWriteDisabled
|
|
||||||
}
|
|
||||||
|
|
||||||
c.applyState()
|
c.applyState()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user