68K emulator user interface. More...
#include "emu68/struct68.h"
#include <config_type68.h>
#include "emu68/type68.h"
#include "emu68/struct68.h"
Go to the source code of this file.
Functions | |
Init functions | |
void | EMU68_reset (void) |
68K Hardware Reset | |
int | EMU68_init (u8 *buffer, u32 maxmem) |
First time init. | |
void | EMU68_kill (void) |
Clean exit. | |
EMU68 on-board memory access | |
int | EMU68_memvalid (u32 dest, u32 sz) |
Check if a memory block is in 68K on-board memory range. | |
u8 | EMU68_peek (u32 addr) |
Get byte in 68K onboard memory. | |
u8 | EMU68_poke (u32 addr, u8 v) |
Put a byte in 68K onboard memory. | |
int | EMU68_memput (u32 dest, u8 *src, u32 sz) |
Put a memory block to 68K on-board memory. | |
int | EMU68_memget (u8 *dest, u32 src, u32 sz) |
Get 68K on-board memory into a memory block. | |
Execution functions | |
void | EMU68_step (void) |
Execute one instruction. | |
void | EMU68_level_and_interrupt (u32 cycleperpass) |
Execute until RTS. | |
void | EMU68_cycle (u32 cycleperpass) |
Execute for given number of cycle. | |
void | EMU68_break (u32 breakpc) |
Execute until PC reachs breakpoint. | |
Version checking functions | |
int | EMU68_debugmode (void) |
Get EMU68 debug mode. | |
EMU68 internal struct access | |
| |
reg68_t | reg68 |
EMU68 internal 68K register set structure. | |
io68_t * | EMU68_set_interrupt_io (io68_t *io) |
Set new interrupt IO. | |
void | EMU68_set_registers (const reg68_t *r) |
Copy specified register set to EMU68 internal register set. | |
void | EMU68_get_registers (reg68_t *r) |
Copy EMU68 internal register set to specified register set. | |
void | EMU68_set_cycle (u32 cycle) |
Set EMU68 internal cycle counter. | |
u32 | EMU68_get_cycle (void) |
Get EMU68 internal cycle counter. |
68K emulator user interface.
Set new interrupt IO.
This version of EMU68 was specially build for SC68. For optimization purposes only one IO plugged chip could interrupt processor.
io | Pointer to the only IO that could eventually interrupt. |
void EMU68_reset | ( | void | ) |
68K Hardware Reset
Perform following operations :
First time init.
The EMU68_init() function initializes the 68k emulator. The maxmem parameter is the size of the 68K memory. The function checks if its value is valid. It must be a power of 2 in the range [2^17..2^24], 128Kb to 16 Mb.
buffer | 68K memory buffer. | |
maxmem | 68K memory amount in byte (power of 2 only). |
0 | Success | |
<0 | Failure |
Check if a memory block is in 68K on-board memory range.
0 | Success | |
<0 | Failure |
Get byte in 68K onboard memory.
Put a byte in 68K onboard memory.
Put a memory block to 68K on-board memory.
The function copy a memory block in 68K on-board memory after verifying that the operation access valid 68K memory.
Get 68K on-board memory into a memory block.
The function copy a 68K on-board memory to a memory location after verifying that the operation access valid 68K memory.
void EMU68_step | ( | void | ) |
Execute one instruction.
void EMU68_level_and_interrupt | ( | u32 | cycleperpass | ) |
Execute until RTS.
This function runs an emulation loop until stack address becomes higher than its value at start. After what, the interruption are tested and executed for this pass, with an execution time given in parameter whatever the time passed in the execution loop. This function is very specific to SC68 implementation.
void EMU68_break | ( | u32 | breakpc | ) |
Execute until PC reachs breakpoint.
breakpc | Breakpoint location |
int EMU68_debugmode | ( | void | ) |
Get EMU68 debug mode.
0 | normal mode. | |
1 | debug mode. |