DGen/SDL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions | Variables
mz80.h File Reference
#include <stdint.h>

Go to the source code of this file.

Classes

struct  MemoryWriteByte
struct  MemoryReadByte
struct  z80PortWrite
struct  z80PortRead
struct  z80TrapRec
union  reg_af
union  reg_bc
union  reg_de
union  reg_hl
union  reg_ix
union  reg_iy
struct  mz80context

Macros

#define UINT32   uint32_t
#define UINT16   uint16_t
#define UINT8   uint8_t
#define INT32   int32_t
#define INT16   int16_t
#define INT8   int8_t
#define UINTPTR   uintptr_t
#define _MEMORYREADWRITEBYTE_
#define z80AF   z80af.af
#define z80A   z80af.half.a
#define z80F   z80af.half.f
#define z80BC   z80bc.bc
#define z80B   z80bc.half.b
#define z80C   z80bc.half.c
#define z80DE   z80de.de
#define z80D   z80de.half.d
#define z80E   z80de.half.e
#define z80HL   z80hl.hl
#define z80H   z80hl.half.h
#define z80L   z80hl.half.l
#define z80SP   z80sp.sp
#define z80IX   z80ix.ix
#define z80XH   z80ix.half.xh
#define z80XL   z80ix.half.xl
#define z80IY   z80iy.iy
#define z80YH   z80iy.half.yh
#define z80YL   z80iy.half.yl
#define VALUE_BYTE   0
#define VALUE_WORD   1
#define VALUE_DWORD   2
#define VALUE_IO   3
#define Z80_FLAG_CARRY   0x01
#define Z80_FLAG_NEGATIVE   0x02
#define Z80_FLAG_OVERFLOW_PARITY   0x04
#define Z80_FLAG_UNDEFINED1   0x08
#define Z80_FLAG_HALF_CARRY   0x10
#define Z80_FLAG_UNDEFINED2   0x20
#define Z80_FLAG_ZERO   0x40
#define Z80_FLAG_SIGN   0x80
#define IFF1   0x01
#define IFF2   0x02

Typedefs

typedef struct mz80context CONTEXTMZ80

Enumerations

enum  {
  CPUREG_PC = 0, CPUREG_Z80_AF = 1, CPUREG_Z80_BC, CPUREG_Z80_DE,
  CPUREG_Z80_HL, CPUREG_Z80_AFPRIME, CPUREG_Z80_BCPRIME, CPUREG_Z80_DEPRIME,
  CPUREG_Z80_HLPRIME, CPUREG_Z80_IX, CPUREG_Z80_IY, CPUREG_Z80_SP,
  CPUREG_Z80_I, CPUREG_Z80_R, CPUREG_Z80_A, CPUREG_Z80_B,
  CPUREG_Z80_C, CPUREG_Z80_D, CPUREG_Z80_E, CPUREG_Z80_H,
  CPUREG_Z80_L, CPUREG_Z80_F, CPUREG_Z80_CARRY, CPUREG_Z80_NEGATIVE,
  CPUREG_Z80_PARITY, CPUREG_Z80_OVERFLOW, CPUREG_Z80_HALFCARRY, CPUREG_Z80_ZERO,
  CPUREG_Z80_SIGN, CPUREG_Z80_IFF1, CPUREG_Z80_IFF2, CPUREG_Z80_MAX_INDEX
}

Functions

UINT32 mz80exec (UINT32)
UINT32 mz80GetContextSize (void)
UINT32 mz80GetElapsedTicks (UINT32)
void mz80ReleaseTimeslice (void)
void mz80GetContext (void *)
void mz80SetContext (void *)
void mz80reset (void)
void mz80ClearPendingInterrupt (void)
UINT32 mz80int (UINT32)
UINT32 mz80nmi (void)
void mz80init (void)
UINT8 mz80SetRegisterValue (void *, UINT32, UINT32)
UINT32 mz80GetRegisterValue (void *, UINT32)
UINT32 mz80GetRegisterTextValue (void *, UINT32, UINT8 *)
UINT8mz80GetRegisterName (UINT32)
void mz80WriteValue (UINT8 bWhat, UINT32 dwAddr, UINT32 dwData)
UINT32 mz80ReadValue (UINT8 bWhat, UINT32 dwAddr)

Variables

UINT32 z80intAddr
UINT32 z80nmiAddr

Macro Definition Documentation

#define _MEMORYREADWRITEBYTE_
#define IFF1   0x01
#define IFF2   0x02
#define INT16   int16_t
#define INT32   int32_t
#define INT8   int8_t
#define UINT16   uint16_t
#define UINT32   uint32_t
#define UINT8   uint8_t
#define UINTPTR   uintptr_t
#define VALUE_BYTE   0
#define VALUE_DWORD   2
#define VALUE_IO   3
#define VALUE_WORD   1
#define Z80_FLAG_CARRY   0x01
#define Z80_FLAG_HALF_CARRY   0x10
#define Z80_FLAG_NEGATIVE   0x02
#define Z80_FLAG_OVERFLOW_PARITY   0x04
#define Z80_FLAG_SIGN   0x80
#define Z80_FLAG_UNDEFINED1   0x08
#define Z80_FLAG_UNDEFINED2   0x20
#define Z80_FLAG_ZERO   0x40
#define z80A   z80af.half.a
#define z80AF   z80af.af
#define z80B   z80bc.half.b
#define z80BC   z80bc.bc
#define z80C   z80bc.half.c
#define z80D   z80de.half.d
#define z80DE   z80de.de
#define z80E   z80de.half.e
#define z80F   z80af.half.f
#define z80H   z80hl.half.h
#define z80HL   z80hl.hl
#define z80IX   z80ix.ix
#define z80IY   z80iy.iy
#define z80L   z80hl.half.l
#define z80SP   z80sp.sp
#define z80XH   z80ix.half.xh
#define z80XL   z80ix.half.xl
#define z80YH   z80iy.half.yh
#define z80YL   z80iy.half.yl

Typedef Documentation

typedef struct mz80context CONTEXTMZ80

Enumeration Type Documentation

anonymous enum
Enumerator:
CPUREG_PC 
CPUREG_Z80_AF 
CPUREG_Z80_BC 
CPUREG_Z80_DE 
CPUREG_Z80_HL 
CPUREG_Z80_AFPRIME 
CPUREG_Z80_BCPRIME 
CPUREG_Z80_DEPRIME 
CPUREG_Z80_HLPRIME 
CPUREG_Z80_IX 
CPUREG_Z80_IY 
CPUREG_Z80_SP 
CPUREG_Z80_I 
CPUREG_Z80_R 
CPUREG_Z80_A 
CPUREG_Z80_B 
CPUREG_Z80_C 
CPUREG_Z80_D 
CPUREG_Z80_E 
CPUREG_Z80_H 
CPUREG_Z80_L 
CPUREG_Z80_F 
CPUREG_Z80_CARRY 
CPUREG_Z80_NEGATIVE 
CPUREG_Z80_PARITY 
CPUREG_Z80_OVERFLOW 
CPUREG_Z80_HALFCARRY 
CPUREG_Z80_ZERO 
CPUREG_Z80_SIGN 
CPUREG_Z80_IFF1 
CPUREG_Z80_IFF2 
CPUREG_Z80_MAX_INDEX 

Function Documentation

void mz80ClearPendingInterrupt ( void  )
UINT32 mz80exec ( UINT32  )
void mz80GetContext ( void *  )
UINT32 mz80GetContextSize ( void  )
UINT32 mz80GetElapsedTicks ( UINT32  )
UINT8* mz80GetRegisterName ( UINT32  )
UINT32 mz80GetRegisterTextValue ( void *  ,
UINT32  ,
UINT8  
)
UINT32 mz80GetRegisterValue ( void *  ,
UINT32   
)
void mz80init ( void  )
UINT32 mz80int ( UINT32  )
UINT32 mz80nmi ( void  )
UINT32 mz80ReadValue ( UINT8  bWhat,
UINT32  dwAddr 
)
void mz80ReleaseTimeslice ( void  )
void mz80reset ( void  )
void mz80SetContext ( void *  )
UINT8 mz80SetRegisterValue ( void *  ,
UINT32  ,
UINT32   
)
void mz80WriteValue ( UINT8  bWhat,
UINT32  dwAddr,
UINT32  dwData 
)

Variable Documentation

UINT32 z80intAddr
UINT32 z80nmiAddr