Xemu [doxygen]  hyppo 0a42be3a057156924bc1b626a687bd6e27349c45 @ Sat 19 Mar 02:15:11 CET 2022
Macros | Enumerations | Functions | Variables
hardware.c File Reference
#include "xemu/emutools.h"
#include "hardware.h"
#include "console.h"
#include "fake_rom.h"
#include <string.h>
Include dependency graph for hardware.c:

Go to the source code of this file.

Macros

#define OPCODE_RET   0xC9
 

Enumerations

enum  ed_trap_types {
  ED_TRAP_RESET = 0xBC, ED_TRAP_SERVICE_BEGIN, ED_TRAP_SERVICE_RUN, ED_TRAP_RST_08,
  ED_TRAP_RST_10, ED_TRAP_RST_18, ED_TRAP_RST_20, ED_TRAP_RST_28,
  ED_TRAP_RST_30, ED_TRAP_RST_38, ED_TRAP_QUIT
}
 

Functions

void use_internal_rom (int yes)
 
int z80ex_ed_cb (Z80EX_BYTE opcode)
 
Z80EX_BYTE z80ex_mread_cb (Z80EX_WORD addr, int m1_state)
 
void z80ex_mwrite_cb (Z80EX_WORD addr, Z80EX_BYTE value)
 
void emu_mem_write (int addr, int data)
 
int emu_mem_read (int addr)
 
Z80EX_BYTE z80ex_pread_cb (Z80EX_WORD port16)
 
void z80ex_pwrite_cb (Z80EX_WORD port16, Z80EX_BYTE value)
 
Z80EX_BYTE z80ex_intread_cb (void)
 
void z80ex_reti_cb (void)
 
int z80_custom_disasm (int addr, char *buf, int buf_size)
 

Variables

Z80EX_CONTEXT z80ex
 
Uint8 memory [0x10000]
 
int stop_emulation = 0
 
int cpu_cycles = 0
 
int cpu_cycles_per_frame
 
int trace
 
int io_cycles
 

Macro Definition Documentation

◆ OPCODE_RET

#define OPCODE_RET   0xC9

Definition at line 25 of file hardware.c.

Enumeration Type Documentation

◆ ed_trap_types

Enumerator
ED_TRAP_RESET 
ED_TRAP_SERVICE_BEGIN 
ED_TRAP_SERVICE_RUN 
ED_TRAP_RST_08 
ED_TRAP_RST_10 
ED_TRAP_RST_18 
ED_TRAP_RST_20 
ED_TRAP_RST_28 
ED_TRAP_RST_30 
ED_TRAP_RST_38 
ED_TRAP_QUIT 

Definition at line 37 of file hardware.c.

Function Documentation

◆ emu_mem_read()

int emu_mem_read ( int  addr)

Definition at line 138 of file hardware.c.

◆ emu_mem_write()

void emu_mem_write ( int  addr,
int  data 
)

Definition at line 129 of file hardware.c.

Here is the caller graph for this function:

◆ use_internal_rom()

void use_internal_rom ( int  yes)

Definition at line 56 of file hardware.c.

◆ z80_custom_disasm()

int z80_custom_disasm ( int  addr,
char *  buf,
int  buf_size 
)

Definition at line 193 of file hardware.c.

◆ z80ex_ed_cb()

int z80ex_ed_cb ( Z80EX_BYTE  opcode)

Definition at line 78 of file hardware.c.

◆ z80ex_intread_cb()

Z80EX_BYTE z80ex_intread_cb ( void  )

Definition at line 178 of file hardware.c.

◆ z80ex_mread_cb()

Z80EX_BYTE z80ex_mread_cb ( Z80EX_WORD  addr,
int  m1_state 
)

Definition at line 115 of file hardware.c.

◆ z80ex_mwrite_cb()

void z80ex_mwrite_cb ( Z80EX_WORD  addr,
Z80EX_BYTE  value 
)

Definition at line 120 of file hardware.c.

◆ z80ex_pread_cb()

Z80EX_BYTE z80ex_pread_cb ( Z80EX_WORD  port16)

Definition at line 147 of file hardware.c.

◆ z80ex_pwrite_cb()

void z80ex_pwrite_cb ( Z80EX_WORD  port16,
Z80EX_BYTE  value 
)

Definition at line 152 of file hardware.c.

Here is the call graph for this function:

◆ z80ex_reti_cb()

void z80ex_reti_cb ( void  )

Definition at line 183 of file hardware.c.

Variable Documentation

◆ cpu_cycles

int cpu_cycles = 0

Definition at line 32 of file hardware.c.

◆ cpu_cycles_per_frame

int cpu_cycles_per_frame

Definition at line 33 of file hardware.c.

◆ io_cycles

int io_cycles

Definition at line 35 of file hardware.c.

◆ memory

Uint8 memory[0x10000]

Definition at line 29 of file hardware.c.

◆ stop_emulation

int stop_emulation = 0

Definition at line 30 of file hardware.c.

◆ trace

int trace

Definition at line 34 of file hardware.c.

◆ z80ex

Definition at line 28 of file hardware.c.