Add Callback PCAction
This commit is contained in:
parent
22a6e29678
commit
28b7295d46
14
goapple2.go
14
goapple2.go
|
@ -21,14 +21,16 @@ const (
|
||||||
ActionSetLimit
|
ActionSetLimit
|
||||||
ActionHere
|
ActionHere
|
||||||
ActionDiskStatus
|
ActionDiskStatus
|
||||||
|
ActionCallback
|
||||||
)
|
)
|
||||||
|
|
||||||
type PCAction struct {
|
type PCAction struct {
|
||||||
Type PCActionType
|
Type PCActionType
|
||||||
String string
|
String string
|
||||||
Mask byte
|
Mask byte
|
||||||
Masked byte
|
Masked byte
|
||||||
Delay uint64
|
Delay uint64
|
||||||
|
Callback func()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Apple II struct
|
// Apple II struct
|
||||||
|
@ -289,6 +291,8 @@ func (a2 *Apple2) Step() error {
|
||||||
case ActionDiskStatus:
|
case ActionDiskStatus:
|
||||||
fmt.Printf("$%04X: %v\n",
|
fmt.Printf("$%04X: %v\n",
|
||||||
a2.cpu.PC(), a2.cards[6])
|
a2.cpu.PC(), a2.cards[6])
|
||||||
|
case ActionCallback:
|
||||||
|
action.Callback()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue