mirror of
https://github.com/ivanizag/izapple2.git
synced 2025-03-20 23:32:17 +00:00
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
|
||||
}
|
||||
|
||||
// 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
|
||||
func (a *Apple2) AddLanguageCard(slot int) {
|
||||
a.insertCard(&cardLanguage{}, slot)
|
||||
|
@ -53,51 +53,46 @@ func MainApple() *Apple2 {
|
||||
"thunderClockCardSlot",
|
||||
4,
|
||||
"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",
|
||||
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",
|
||||
true,
|
||||
"set fast mode when the disks are spinning",
|
||||
)
|
||||
"set fast mode when the disks are spinning")
|
||||
panicSS := flag.Bool(
|
||||
"panicSS",
|
||||
false,
|
||||
"panic if a not implemented softswitch is used",
|
||||
)
|
||||
"panic if a not implemented softswitch is used")
|
||||
traceCPU := flag.Bool(
|
||||
"traceCpu",
|
||||
false,
|
||||
"dump to the console the CPU execution operations",
|
||||
)
|
||||
"dump to the console the CPU execution operations")
|
||||
traceSS := flag.Bool(
|
||||
"traceSS",
|
||||
false,
|
||||
"dump to the console the sofswitches calls",
|
||||
)
|
||||
"dump to the console the sofswitches calls")
|
||||
traceHD := flag.Bool(
|
||||
"traceHD",
|
||||
false,
|
||||
"dump to the console the hd commands",
|
||||
)
|
||||
"dump to the console the hd commands")
|
||||
dumpChars := flag.Bool(
|
||||
"dumpChars",
|
||||
false,
|
||||
"shows the character map",
|
||||
)
|
||||
"shows the character map")
|
||||
model := flag.String(
|
||||
"model",
|
||||
"2enh",
|
||||
"set base model. Models available 2plus, 2e, 2enh, base64a",
|
||||
)
|
||||
"set base model. Models available 2plus, 2e, 2enh, base64a")
|
||||
profile := flag.Bool(
|
||||
"profile",
|
||||
false,
|
||||
"generate profile trace to analyse with pprof",
|
||||
)
|
||||
"generate profile trace to analyse with pprof")
|
||||
flag.Parse()
|
||||
|
||||
var a *Apple2
|
||||
@ -190,6 +185,9 @@ func MainApple() *Apple2 {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
if *vidHDCardSlot > 0 {
|
||||
a.AddVidHD(*vidHDCardSlot)
|
||||
}
|
||||
if *disk2Slot > 0 {
|
||||
err := a.AddDisk2(*disk2Slot, *disk2RomFile, *diskImage)
|
||||
if err != nil {
|
||||
|
26
cardVidHD.go
Normal file
26
cardVidHD.go
Normal file
@ -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…
x
Reference in New Issue
Block a user