Home | Download | Musics | Developers | |||||
struct68.hGo to the documentation of this file.00001 00010 /* Copyright (C) 1998-2003 Benjamin 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 00030 #define IO68_NO_INT (0x80000000) 00031 00032 #ifndef NULL 00033 # define NULL 0L 00034 #endif 00035 00038 #define MEM68MSK ((1<<19)-1) /* 512 Kb memory */ 00039 /* #define MEM68MSK (reg68.memmsk) */ 00040 00046 typedef u32 (*memrfunc68_t)(u32 addr, cycle68_t cycle); 00047 00049 typedef void (*memwfunc68_t)(u32 addr, u32 value, cycle68_t cycle); 00050 00054 typedef void (linefunc68_t)(int, int ); 00055 00058 typedef struct 00059 { 00060 int vector; 00061 int level; 00062 } int68_t; 00063 00070 typedef struct _io68_t 00071 { 00072 struct _io68_t * next; 00073 char name[32]; 00074 u32 addr_low; 00075 u32 addr_high; 00076 memrfunc68_t Rfunc[3]; 00077 memwfunc68_t Wfunc[3]; 00078 int68_t *(*interrupt)(cycle68_t); 00079 cycle68_t (*next_int)(cycle68_t); 00080 void (*adjust_cycle)(cycle68_t); 00081 int (*reset)(void); 00082 cycle68_t rcycle_penalty; 00083 cycle68_t wcycle_penalty; 00084 } io68_t; 00085 00088 typedef struct 00089 { 00090 /* Registers. */ 00091 s32 d[8]; 00092 s32 a[8]; 00093 s32 usp; 00094 s32 pc; 00095 u32 sr; 00097 cycle68_t cycle; 00098 int status; 00100 /* Memory. */ 00101 u8 *mem; 00102 u32 memmsk; 00103 unsigned int memsz; 00105 /* Debug mode only. */ 00106 u8 *chk; 00107 int framechk; 00109 /* IO chips. */ 00110 int nio; 00111 io68_t *iohead; 00113 } reg68_t; 00114 00120 #ifdef __cplusplus 00121 } 00122 #endif 00123 00124 #endif /* #ifndef _STRUCT68_H_ */ | ||||||||
sc68 website ©sashipa Nov 2003 | Design by Benjamin Gerard, powered by |