Trace HD commands

This commit is contained in:
Ivan Izaguirre 2019-11-01 18:48:39 +01:00 committed by Iván Izaguirre
parent 9f2a026fa3
commit 3618cbb9c9
4 changed files with 16 additions and 4 deletions

View File

@ -131,7 +131,7 @@ Only valid on SDL mode
set base model. Models available 2plus, 2e, 2enh, base64a (default "2e")
-mono
emulate a green phosphor monitor instead of a NTSC color TV. Use F6 to toggle.
-panicss
-panicSS
panic if a not implemented softswitch is used
-profile
generate profile trace to analyse with pprof
@ -143,6 +143,8 @@ Only valid on SDL mode
slot for the ThunderClock Plus card. -1 for none (default 4)
-traceCpu
dump to the console the CPU execution. Use F11 to toggle.
-traceHD
dump to the console the hd commands
-traceSS
dump to the console the sofswitches calls

View File

@ -127,8 +127,9 @@ func (a *Apple2) AddDisk2(slot int, diskRomFile string, diskImage string) error
}
// AddHardDisk adds a ProDos hard dirve with a 2MG image
func (a *Apple2) AddHardDisk(slot int, hdImage string) error {
func (a *Apple2) AddHardDisk(slot int, hdImage string, trace bool) error {
var c cardHardDisk
c.setTrace(trace)
c.loadRom(buildHardDiskRom(slot))
a.insertCard(&c, slot)

View File

@ -64,7 +64,7 @@ func MainApple() *Apple2 {
"set fast mode when the disks are spinning",
)
panicSS := flag.Bool(
"panicss",
"panicSS",
false,
"panic if a not implemented softswitch is used",
)
@ -78,6 +78,11 @@ func MainApple() *Apple2 {
false,
"dump to the console the sofswitches calls",
)
traceHD := flag.Bool(
"traceHD",
false,
"dump to the console the hd commands",
)
dumpChars := flag.Bool(
"dumpChars",
false,
@ -196,7 +201,7 @@ func MainApple() *Apple2 {
// If there is a hard disk image, but no slot assigned, use slot 7.
*hardDiskSlot = 7
}
err := a.AddHardDisk(*hardDiskSlot, *hardDiskImage)
err := a.AddHardDisk(*hardDiskSlot, *hardDiskImage, *traceHD)
if err != nil {
panic(err)
}

View File

@ -159,3 +159,7 @@ func (c *cardHardDisk) writeBlock(block uint16, source uint16) uint8 {
func (c *cardHardDisk) addDisk(disk *hardDisk) {
c.disk = disk
}
func (c *cardHardDisk) setTrace(trace bool) {
c.trace = trace
}