GrafX2 2.9.3227
The ultimate 256-color painting program
|
#include <Z/hardware/CPU/architecture/6502.h>
Data Structures | |
struct | M6502 |
6502 emulator instance. More... | |
Macros | |
#define | CPU_6502_API Z_API |
Functions | |
CPU_6502_API void | m6502_power (M6502 *object, zboolean state) |
Changes the CPU power status. More... | |
CPU_6502_API void | m6502_reset (M6502 *object) |
Resets the CPU. More... | |
CPU_6502_API zusize | m6502_run (M6502 *object, zusize cycles) |
Runs the CPU for a given number of cycles . More... | |
CPU_6502_API void | m6502_nmi (M6502 *object) |
Performs a non-maskable interrupt (NMI). More... | |
CPU_6502_API void | m6502_irq (M6502 *object, zboolean state) |
Changes the state of the maskable interrupt (IRQ). More... | |
#define CPU_6502_API Z_API |
CPU_6502_API void m6502_power | ( | M6502 * | object, |
zboolean | state | ||
) |
Changes the CPU power status.
object | A pointer to a 6502 emulator instance. |
state | TRUE = power ON; FALSE = power OFF. |
References A, FALSE, IRQ, NMI, P, PC, S, X, Y, Z_6502_VALUE_AFTER_POWER_ON_A, Z_6502_VALUE_AFTER_POWER_ON_P, Z_6502_VALUE_AFTER_POWER_ON_PC, Z_6502_VALUE_AFTER_POWER_ON_S, Z_6502_VALUE_AFTER_POWER_ON_X, and Z_6502_VALUE_AFTER_POWER_ON_Y.
Referenced by C64_LoadPrg().
CPU_6502_API void m6502_reset | ( | M6502 * | object | ) |
Resets the CPU.
This is equivalent to a pulse on the RESET line of a real 6502.
object | A pointer to a 6502 emulator instance. |
References FALSE, IRQ, NMI, P, PC, READ_POINTER, S, Z_6502_VALUE_AFTER_POWER_ON_P, and Z_6502_VALUE_AFTER_POWER_ON_S.
CPU_6502_API zusize m6502_run | ( | M6502 * | object, |
zusize | cycles | ||
) |
Runs the CPU for a given number of cycles
.
object | A pointer to a 6502 emulator instance. |
cycles | The number of cycles to be executed. |
cycles
specfified. References CYCLES, FALSE, instruction_table, IP, IRQ, NMI, OPCODE, P, PC, PUSH_16, PUSH_8, READ_8, and READ_POINTER.
Referenced by C64_LoadPrg().
CPU_6502_API void m6502_nmi | ( | M6502 * | object | ) |
CPU_6502_API void m6502_irq | ( | M6502 * | object, |
zboolean | state | ||
) |
Changes the state of the maskable interrupt (IRQ).
This is equivalent to a change on the IRQ line of a real 6502.
object | A pointer to a 6502 emulator instance. |
state | TRUE = line high; FALSE = line low. |
References IRQ.
Referenced by C64_LoadPrg(), and C64_mem_write().