Ralle Palaveev's ProDOS-Romcard3
This commit is contained in:
parent
e20e355f9f
commit
a4ad599056
|
@ -241,7 +241,8 @@ The available cards are:
|
||||||
mouse: Mouse card implementation, does not emulate a real card, only the firmware behaviour
|
mouse: Mouse card implementation, does not emulate a real card, only the firmware behaviour
|
||||||
multirom: Multiple Image ROM card
|
multirom: Multiple Image ROM card
|
||||||
parallel: Card to dump to a file what would be printed to a parallel printer
|
parallel: Card to dump to a file what would be printed to a parallel printer
|
||||||
prodosrom: A bootable 1 MB solid state disk
|
prodosromcard3: A bootable 4 MB ROM card by Ralle Palaveev
|
||||||
|
prodosromdrive: A bootable 1 MB solid state disk by Terence Boldt
|
||||||
saturn: RAM card with 128Kb, it's like 8 language cards
|
saturn: RAM card with 128Kb, it's like 8 language cards
|
||||||
smartport: SmartPort interface card
|
smartport: SmartPort interface card
|
||||||
softswitchlogger: Card to log softswitch accesses
|
softswitchlogger: Card to log softswitch accesses
|
||||||
|
|
|
@ -51,7 +51,8 @@ func getCardFactory() map[string]*cardBuilder {
|
||||||
cardFactory["mouse"] = newCardMouseBuilder()
|
cardFactory["mouse"] = newCardMouseBuilder()
|
||||||
cardFactory["multirom"] = newMultiRomCardBuilder()
|
cardFactory["multirom"] = newMultiRomCardBuilder()
|
||||||
cardFactory["parallel"] = newCardParallelPrinterBuilder()
|
cardFactory["parallel"] = newCardParallelPrinterBuilder()
|
||||||
cardFactory["prodosrom"] = newCardProDOSRomDriveBuilder()
|
cardFactory["prodosromdrive"] = newCardProDOSRomDriveBuilder()
|
||||||
|
cardFactory["prodosromcard3"] = newCardProDOSRomCard3Builder()
|
||||||
cardFactory["saturn"] = newCardSaturnBuilder()
|
cardFactory["saturn"] = newCardSaturnBuilder()
|
||||||
cardFactory["smartport"] = newCardSmartPortStorageBuilder()
|
cardFactory["smartport"] = newCardSmartPortStorageBuilder()
|
||||||
cardFactory["swyftcard"] = newCardSwyftBuilder()
|
cardFactory["swyftcard"] = newCardSwyftBuilder()
|
||||||
|
|
|
@ -0,0 +1,79 @@
|
||||||
|
package izapple2
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Ralle Palaveev's ProDOS-Romcard3
|
||||||
|
|
||||||
|
See:
|
||||||
|
https://github.com/rallepaqlaveev/ProDOS-Romcard3
|
||||||
|
|
||||||
|
Note that this card disables the C800-CFFF range only on writes to CFFF, not as most other cards that disable on reads and writes.
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
// CardProDOSRomCard3 is a Memory Expansion card
|
||||||
|
type CardProDOSRomCard3 struct {
|
||||||
|
cardBase
|
||||||
|
bank uint16
|
||||||
|
data []uint8
|
||||||
|
}
|
||||||
|
|
||||||
|
func newCardProDOSRomCard3Builder() *cardBuilder {
|
||||||
|
return &cardBuilder{
|
||||||
|
name: "ProDOS ROM Card 3",
|
||||||
|
description: "A bootable 4 MB ROM card by Ralle Palaveev",
|
||||||
|
defaultParams: &[]paramSpec{
|
||||||
|
{"image", "ROM image with the ProDOS volume", "https://github.com/rallepalaveev/ProDOS-Romcard3/raw/main/ProDOS-ROMCARD3_4MB_A2D.v1.4_v37.po"},
|
||||||
|
},
|
||||||
|
buildFunc: func(params map[string]string) (Card, error) {
|
||||||
|
image := paramsGetPath(params, "image")
|
||||||
|
if image == "" {
|
||||||
|
return nil, fmt.Errorf("image required for the ProDOS ROM drive")
|
||||||
|
}
|
||||||
|
|
||||||
|
data, _, err := LoadResource(image)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
|
||||||
|
var c CardProDOSRomCard3
|
||||||
|
c.data = data
|
||||||
|
c.loadRom(data[0x200:0x300])
|
||||||
|
c.romC8xx = &c
|
||||||
|
return &c, nil
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CardProDOSRomCard3) assign(a *Apple2, slot int) {
|
||||||
|
|
||||||
|
// Set pointer position
|
||||||
|
c.addCardSoftSwitchW(0, func(value uint8) {
|
||||||
|
c.bank = uint16(value) | c.bank&0xff00
|
||||||
|
}, "BANKLO")
|
||||||
|
c.addCardSoftSwitchW(1, func(value uint8) {
|
||||||
|
c.bank = uint16(value)<<8 | c.bank&0xff
|
||||||
|
}, "BANKHI")
|
||||||
|
|
||||||
|
c.cardBase.assign(a, slot)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CardProDOSRomCard3) translateAddress(address uint16) int {
|
||||||
|
// An address from 0xC800 to 0xCFFF is mapped to the corresponding bank of the ROM
|
||||||
|
// There are 0x800 (2048) banks with 0x0800 (2048) bytes each
|
||||||
|
offset := address - 0xC800
|
||||||
|
pageAddress := int(c.bank&0x7FF) * 0x0800
|
||||||
|
|
||||||
|
//fmt.Printf("CardProDOSRomCard3.translateAddress: address=%04X, bank=%04X, offset=%04X, pageAddress=%08X\n", address, c.bank, offset, pageAddress)
|
||||||
|
|
||||||
|
return pageAddress + int(offset)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CardProDOSRomCard3) peek(address uint16) uint8 {
|
||||||
|
return c.data[c.translateAddress(address)]
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *CardProDOSRomCard3) poke(address uint16, value uint8) {
|
||||||
|
// Do nothing
|
||||||
|
}
|
|
@ -3,7 +3,7 @@ package izapple2
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
ProDOS-ROM-Drive: A bootable 1 MB solid state disk for Apple ][ computers
|
Terence Boldt's ProDOS-ROM-Drive: A bootable 1 MB solid state disk for Apple ][ computers
|
||||||
|
|
||||||
Emulates version 4.0+
|
Emulates version 4.0+
|
||||||
|
|
||||||
|
@ -25,10 +25,10 @@ const proDOSRomDriveMask = 0xf_ffff // 1 MB mask
|
||||||
func newCardProDOSRomDriveBuilder() *cardBuilder {
|
func newCardProDOSRomDriveBuilder() *cardBuilder {
|
||||||
return &cardBuilder{
|
return &cardBuilder{
|
||||||
name: "ProDOS ROM Drive",
|
name: "ProDOS ROM Drive",
|
||||||
description: "A bootable 1 MB solid state disk",
|
description: "A bootable 1 MB solid state disk by Terence Boldt",
|
||||||
defaultParams: &[]paramSpec{
|
defaultParams: &[]paramSpec{
|
||||||
//∫{"image", "ROM image with the ProDOS volume", "https://github.com/tjboldt/ProDOS-ROM-Drive/raw/v4.0/Firmware/GamesWithFirmware.po"},
|
//{"image", "ROM image with the ProDOS volume", "https://github.com/tjboldt/ProDOS-ROM-Drive/raw/v4.0/Firmware/GamesWithFirmware.po"},
|
||||||
{"image", "ROM image with the ProDOS volume", "https://github.com/Alex-Kw/ProDOS-ROM-Drive-Images/raw/main/ProDOS242_Beta5.po"},
|
{"image", "ROM image with the ProDOS volume", "https://github.com/Alex-Kw/ProDOS-ROM-Drive-Images/raw/main/ProDOS_2.4.3_TJ.po"},
|
||||||
},
|
},
|
||||||
buildFunc: func(params map[string]string) (Card, error) {
|
buildFunc: func(params map[string]string) (Card, error) {
|
||||||
image := paramsGetPath(params, "image")
|
image := paramsGetPath(params, "image")
|
||||||
|
|
|
@ -4,6 +4,4 @@ board: 2e
|
||||||
rom: <internal>/Apple2e.rom
|
rom: <internal>/Apple2e.rom
|
||||||
charrom: <internal>/Apple IIe Video Unenhanced.bin
|
charrom: <internal>/Apple IIe Video Unenhanced.bin
|
||||||
s0: language
|
s0: language
|
||||||
s2: vidhd
|
|
||||||
s3: fastchip
|
|
||||||
s6: diskii,disk1=<internal>/dos33.dsk
|
s6: diskii,disk1=<internal>/dos33.dsk
|
|
@ -66,7 +66,8 @@ The available cards are:
|
||||||
mouse: Mouse card implementation, does not emulate a real card, only the firmware behaviour
|
mouse: Mouse card implementation, does not emulate a real card, only the firmware behaviour
|
||||||
multirom: Multiple Image ROM card
|
multirom: Multiple Image ROM card
|
||||||
parallel: Card to dump to a file what would be printed to a parallel printer
|
parallel: Card to dump to a file what would be printed to a parallel printer
|
||||||
prodosrom: A bootable 1 MB solid state disk
|
prodosromcard3: A bootable 4 MB ROM card by Ralle Palaveev
|
||||||
|
prodosromdrive: A bootable 1 MB solid state disk by Terence Boldt
|
||||||
saturn: RAM card with 128Kb, it's like 8 language cards
|
saturn: RAM card with 128Kb, it's like 8 language cards
|
||||||
smartport: SmartPort interface card
|
smartport: SmartPort interface card
|
||||||
softswitchlogger: Card to log softswitch accesses
|
softswitchlogger: Card to log softswitch accesses
|
||||||
|
|
|
@ -104,7 +104,14 @@ func (mmu *memoryManager) accessCArea(address uint16) memoryHandler {
|
||||||
// Extra slot area reset
|
// Extra slot area reset
|
||||||
if address == ioC8Off {
|
if address == ioC8Off {
|
||||||
// Reset extra slot area owner
|
// Reset extra slot area owner
|
||||||
mmu.activeSlot = 0
|
|
||||||
|
// There is not really an activeSlot in c8xx, any card could be active
|
||||||
|
// we should check all of them and maybe have conflicts. As I don't do that I won't disable and
|
||||||
|
// just track teh last active card.
|
||||||
|
// This code is disabled because cards could have different logic for disabling. Most cards disable
|
||||||
|
// on access to 0xCFFF, but the ProDOS ROM card 3 disables only on writes and not on reads.
|
||||||
|
// mmu.activeSlot = 0
|
||||||
|
|
||||||
mmu.intC8ROMActive = false
|
mmu.intC8ROMActive = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue