sc68fordevelopers
2.2.1
|
00001 00010 /* Copyright (C) 1998-2001 Ben(jamin) Gerard */ 00011 00012 #ifndef _STRUCT68_H_ 00013 #define _STRUCT68_H_ 00014 00015 #include "emu68/type68.h" 00016 00017 #ifdef __cplusplus 00018 extern "C" { 00019 #endif 00020 00026 #define IO68_NO_INT (0x80000000) 00027 00028 #ifndef NULL 00029 # define NULL 0L 00030 #endif 00031 00034 #define MEM68MSK ((1<<19)-1) /* 512 Kb memory */ 00035 /* #define MEM68MSK (reg68.memmsk) */ 00036 00042 typedef u32 (*memrfunc68_t)(u32 addr, cycle68_t cycle); 00043 00045 typedef void (*memwfunc68_t)(u32 addr, u32 value, cycle68_t cycle); 00046 00050 typedef void (linefunc68_t)(int, int ); 00051 00054 typedef struct 00055 { 00056 int vector; 00057 int level; 00058 } int68_t; 00059 00066 typedef struct _io68_t 00067 { 00068 struct _io68_t * next; 00069 char name[32]; 00070 u32 addr_low; 00071 u32 addr_high; 00072 memrfunc68_t Rfunc[3]; 00073 memwfunc68_t Wfunc[3]; 00074 int68_t *(*interrupt)(cycle68_t); 00075 cycle68_t (*next_int)(cycle68_t); 00076 void (*adjust_cycle)(cycle68_t); 00077 int (*reset)(void); 00078 cycle68_t rcycle_penalty; 00079 cycle68_t wcycle_penalty; 00080 } io68_t; 00081 00084 typedef struct 00085 { 00086 /* Registers. */ 00087 s32 d[8]; 00088 s32 a[8]; 00089 s32 usp; 00090 s32 pc; 00091 u32 sr; 00093 cycle68_t cycle; 00094 int status; 00096 /* Memory. */ 00097 u8 *mem; 00098 u32 memmsk; 00099 unsigned int memsz; 00101 /* Debug mode only. */ 00102 u8 *chk; 00103 int framechk; 00105 /* IO chips. */ 00106 int nio; 00107 io68_t *iohead; 00109 } reg68_t; 00110 00111 #ifdef __cplusplus 00112 } 00113 #endif 00114 00115 #endif /* #ifndef _STRUCT68_H_ */