/* alewman-probe: the addresses the assembly and C share, and the framework's calls. */ #ifndef MD_H #define MD_H typedef unsigned char u8; typedef unsigned short u16; typedef unsigned long u32; typedef volatile u8 v8; typedef volatile u16 v16; typedef volatile u32 v32; #define VDATA (*(v16 *)0xC00000) #define VCTRL (*(v16 *)0xC00004) #define VCTRL32 (*(v32 *)0xC00004) #define VHV (*(v16 *)0xC00008) #define RECS ((u8 *)0xFF0000) /* the running test's records */ #define MAX_RECS 800 #define VCOUNT (*(v16 *)0xFF3F00) #define VDMA (*(v16 *)0xFF3F02) #define NREC (*(v16 *)0xFF3F04) #define SHADOW ((u8 *)0xFF4000) /* a copy of the whole save, so RAM alone can report */ /* What the first instructions saw, before anything wrote to memory. */ typedef struct { u16 hv; /* HV counter at the first instruction */ u16 status; /* VDP status */ u16 warm; /* our mark was still in RAM: a reset, or a menu that kept RAM */ u16 version; /* $A10001 */ u32 ram_sum; /* sum of work RAM's words, the mark's area excepted */ u32 ram_nonzero; /* how many of them were not zero */ u32 vram_nonzero; u32 cram_nonzero; u32 vsram_nonzero; u32 zram_nonzero; u32 zram_sum; } BootInfo; #define BOOT ((BootInfo *)0xFF3F40) /* Assembly. */ void vdp_init(void); void t_run(int id); void t2_run(int id); void t3_run(int id); void wait_vint(void); /* Build settings: gen/settings.h. */ #include "settings.h" #endif