callfn

package
v0.32.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

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.

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

func (cf *CallFn) Accumulate(cycles float32)

Accumulate cycles to the account for. Is safe to call if callfn is already active.

func (*CallFn) Check

func (cf *CallFn) Check(addr uint16) (uint8, bool)

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) IsActive

func (cf *CallFn) IsActive() bool

IsActive returns true if ARM program is still running.

func (*CallFn) Step

func (cf *CallFn) Step(vcsClock float32, armClock float32) float32

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL