VidHD card signature. Total Replay thinks it's there
This commit is contained in:
parent
4bf8531ae4
commit
fce719deb8
|
@ -130,6 +130,13 @@ func (a *Apple2) AddHardDisk(slot int, hdImage string, trace bool) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// AddVidHD adds a card with the signature of VidHD
|
||||||
|
func (a *Apple2) AddVidHD(slot int) {
|
||||||
|
var c cardVidHD
|
||||||
|
c.loadRom(buildVidHDRom())
|
||||||
|
a.insertCard(&c, slot)
|
||||||
|
}
|
||||||
|
|
||||||
// AddLanguageCard inserts a 16Kb card
|
// AddLanguageCard inserts a 16Kb card
|
||||||
func (a *Apple2) AddLanguageCard(slot int) {
|
func (a *Apple2) AddLanguageCard(slot int) {
|
||||||
a.insertCard(&cardLanguage{}, slot)
|
a.insertCard(&cardLanguage{}, slot)
|
||||||
|
|
|
@ -53,51 +53,46 @@ func MainApple() *Apple2 {
|
||||||
"thunderClockCardSlot",
|
"thunderClockCardSlot",
|
||||||
4,
|
4,
|
||||||
"slot for the ThunderClock Plus card. -1 for none")
|
"slot for the ThunderClock Plus card. -1 for none")
|
||||||
|
vidHDCardSlot := flag.Int(
|
||||||
|
"vidHDSlot",
|
||||||
|
2,
|
||||||
|
"slot for the VidHD card, -1 for none")
|
||||||
mono := flag.Bool(
|
mono := flag.Bool(
|
||||||
"mono",
|
"mono",
|
||||||
false,
|
false,
|
||||||
"emulate a green phosphor monitor instead of a NTSC color TV. Use F6 to toggle.",
|
"emulate a green phosphor monitor instead of a NTSC color TV. Use F6 to toggle.")
|
||||||
)
|
|
||||||
fastDisk := flag.Bool(
|
fastDisk := flag.Bool(
|
||||||
"fastDisk",
|
"fastDisk",
|
||||||
true,
|
true,
|
||||||
"set fast mode when the disks are spinning",
|
"set fast mode when the disks are spinning")
|
||||||
)
|
|
||||||
panicSS := flag.Bool(
|
panicSS := flag.Bool(
|
||||||
"panicSS",
|
"panicSS",
|
||||||
false,
|
false,
|
||||||
"panic if a not implemented softswitch is used",
|
"panic if a not implemented softswitch is used")
|
||||||
)
|
|
||||||
traceCPU := flag.Bool(
|
traceCPU := flag.Bool(
|
||||||
"traceCpu",
|
"traceCpu",
|
||||||
false,
|
false,
|
||||||
"dump to the console the CPU execution operations",
|
"dump to the console the CPU execution operations")
|
||||||
)
|
|
||||||
traceSS := flag.Bool(
|
traceSS := flag.Bool(
|
||||||
"traceSS",
|
"traceSS",
|
||||||
false,
|
false,
|
||||||
"dump to the console the sofswitches calls",
|
"dump to the console the sofswitches calls")
|
||||||
)
|
|
||||||
traceHD := flag.Bool(
|
traceHD := flag.Bool(
|
||||||
"traceHD",
|
"traceHD",
|
||||||
false,
|
false,
|
||||||
"dump to the console the hd commands",
|
"dump to the console the hd commands")
|
||||||
)
|
|
||||||
dumpChars := flag.Bool(
|
dumpChars := flag.Bool(
|
||||||
"dumpChars",
|
"dumpChars",
|
||||||
false,
|
false,
|
||||||
"shows the character map",
|
"shows the character map")
|
||||||
)
|
|
||||||
model := flag.String(
|
model := flag.String(
|
||||||
"model",
|
"model",
|
||||||
"2enh",
|
"2enh",
|
||||||
"set base model. Models available 2plus, 2e, 2enh, base64a",
|
"set base model. Models available 2plus, 2e, 2enh, base64a")
|
||||||
)
|
|
||||||
profile := flag.Bool(
|
profile := flag.Bool(
|
||||||
"profile",
|
"profile",
|
||||||
false,
|
false,
|
||||||
"generate profile trace to analyse with pprof",
|
"generate profile trace to analyse with pprof")
|
||||||
)
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
var a *Apple2
|
var a *Apple2
|
||||||
|
@ -190,6 +185,9 @@ func MainApple() *Apple2 {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if *vidHDCardSlot > 0 {
|
||||||
|
a.AddVidHD(*vidHDCardSlot)
|
||||||
|
}
|
||||||
if *disk2Slot > 0 {
|
if *disk2Slot > 0 {
|
||||||
err := a.AddDisk2(*disk2Slot, *disk2RomFile, *diskImage)
|
err := a.AddDisk2(*disk2Slot, *disk2RomFile, *diskImage)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
package apple2
|
||||||
|
|
||||||
|
/*
|
||||||
|
Simulates just what is needed to make Total Replay use the GS modes if the VidHD card is found
|
||||||
|
|
||||||
|
See:
|
||||||
|
https://github.com/a2-4am/4cade/blob/master/src/hw.vidhd.a
|
||||||
|
*/
|
||||||
|
|
||||||
|
type cardVidHD struct {
|
||||||
|
cardBase
|
||||||
|
}
|
||||||
|
|
||||||
|
func buildVidHDRom() []uint8 {
|
||||||
|
data := make([]uint8, 256)
|
||||||
|
|
||||||
|
data[0] = 0x24
|
||||||
|
data[1] = 0xEA
|
||||||
|
data[2] = 0x4C
|
||||||
|
|
||||||
|
return data
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *cardVidHD) assign(a *Apple2, slot int) {
|
||||||
|
c.cardBase.assign(a, slot)
|
||||||
|
}
|
Loading…
Reference in New Issue