mirror of
https://github.com/zellyn/goapple2.git
synced 2025-02-10 07:30:39 +00:00
Add Callback PCAction
This commit is contained in:
parent
22a6e29678
commit
28b7295d46
@ -21,6 +21,7 @@ const (
|
||||
ActionSetLimit
|
||||
ActionHere
|
||||
ActionDiskStatus
|
||||
ActionCallback
|
||||
)
|
||||
|
||||
type PCAction struct {
|
||||
@ -29,6 +30,7 @@ type PCAction struct {
|
||||
Mask byte
|
||||
Masked byte
|
||||
Delay uint64
|
||||
Callback func()
|
||||
}
|
||||
|
||||
// Apple II struct
|
||||
@ -289,6 +291,8 @@ func (a2 *Apple2) Step() error {
|
||||
case ActionDiskStatus:
|
||||
fmt.Printf("$%04X: %v\n",
|
||||
a2.cpu.PC(), a2.cards[6])
|
||||
case ActionCallback:
|
||||
action.Callback()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user