Documentation ¶
Overview ¶
Package Callfn facilitates the ARM CALLFN process common to both DPC+ and CDF* cartridge mappers. It does not handle the ARM itself and cartridge mappers that use it should take care in particular to Run() and Step() the ARM when required.
It is not required when the ARM is intended to be run in "immediate" mode.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallFn ¶
type CallFn struct { // on ARM program conclusion we JMP to the address after the CALLFN ResumeAddr uint16 // contains filtered or unexported fields }
CallFn keeps track of the CallFn process common to both DPC+ and CDF* cartridge mappers.
func (*CallFn) Accumulate ¶ added in v0.20.0
Accumulate cycles to the account for. Is safe to call if callfn is already active.
There is no need to call this function if the ARM is operating in "immediate" mode. However, if you want to see the corrective JMP instruction at the end of a CALLFN then it is safe to call this function with cycles value of 0
func (*CallFn) Check ¶
Check state of CallFn. Returns true if it is active and false if it is not. If CallFn is active then the the value to put on the data bus is also returned. If CallFn is not active then the data bus value should be determined in the normal way (most probably by reading the cartridge ROM).
func (*CallFn) Step ¶
Step forward one clock. Returns true if the ARM program is running and false otherwise.
Returns 0 or the adjusted clock speed to be passed to the ARM.Step() function.
CallFn.IsActive() should have been checked before calling this function.
Also consider whether the function needs to be called at all - the ARM emulation might be in immediate mode