# HG changeset patch # User nkeynes # Date 1135394875 0 # Node ID 87219209d93e4b2bf608a210e5e571b00872c0ff # Parent 1ec3acd0594df7e88e8469a11e0329403e7edeef Rearrange directory structure to be a little neater remove tst & tst1 --- a/src/Makefile.am Fri Dec 23 11:44:55 2005 +0000 +++ b/src/Makefile.am Sat Dec 24 03:27:55 2005 +0000 @@ -10,19 +10,23 @@ dream_SOURCES = \ main.c \ - support.c support.h \ - interface.c interface.h \ - callbacks.c callbacks.h \ - gui.c gui.h mmr_win.c debug_win.c dump_win.c \ mem.c mem.h mmio.h \ - asic.c asic.h pvr2.c pvr2.h ide.c ide.h \ + asic.c asic.h \ + pvr2.c pvr2.h \ + gdrom/ide.c gdrom/ide.h \ video.c dreamcast.c dreamcast.h \ - maple.c maple.h maple/controller.c maple/controller.h \ sh4/intc.c sh4/intc.h sh4/sh4mem.c sh4/timer.c \ sh4/sh4core.c sh4/sh4core.h sh4/sh4dasm.c sh4/sh4dasm.h \ sh4/sh4mmio.c sh4/sh4mmio.h sh4/scif.c sh4/watch.c \ aica/armcore.c aica/armcore.h aica/armdasm.c aica/armmem.c \ aica/aica.c aica/aica.h \ + maple/maple.c maple/maple.h + maple/controller.c maple/controller.h \ + gui/support.c gui/support.h \ + gui/interface.c gui/interface.h \ + gui/callbacks.c gui/callbacks.h \ + gui/gui.c gui/gui.h gui/mmr_win.c + gui/debug_win.c gui/dump_win.c \ fileio.c ipbin.c util.c dream_LDADD = @PACKAGE_LIBS@ $(INTLLIBS) --- a/src/tst.c Fri Dec 23 11:44:55 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,15 +0,0 @@ -#define D #define -#define tst(a) D a 1 - -tst(forte) - -int main() -{ - signed int a = 0xFFFFFFFF; - unsigned int b = 0xFFFFFFFF; - - a >>= 16; - b >>= 16; - - printf( "%08x %08x\n", a, b ); -} --- a/src/tst1.c Fri Dec 23 11:44:55 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -#include - -#define PORT_R 1 -#define PORT_W 2 -#define PORT_MEM 4 /* store written value */ -#define PORT_RW 3 -#define PORT_MRW 7 -#define UNDEFINED 0 - -struct mmio_region { - char *id, *desc; - uint32_t base; - char *mem; - struct mmio_port { - char *id, *desc; - int width; - uint32_t offset; - uint32_t default; - int flags; - } *ports; -}; - -#define _MACROIZE #define - -#define MMIO_REGION_BEGIN(b,id,d) struct mmio_region mmio_region_##id = { #id, d, b, NULL, -#define LONG_PORT( o,id,f,def,d ) { #id, desc, 32, o, def, f }, \ -_MACROIZE port_##id o \ -_MACROIZE reg_##id (*(uint32_t *)(mmio_region_##id.mem + o)) -#define WORD_PORT( o,id,f,def,d ) { #id, desc, 16, o, def, f }, -#define BYTE_PORT( o,id,f,def,d ) { #id, desc, 8, o, def, f }, -#define MMIO_REGION_END {NULL, NULL, 0, 0, 0} }; - -MMIO_REGION_BEGIN( 0xFF000000, MMU, "MMU Registers" ) - LONG_PORT( 0x000, PTEH, PORT_MRW, UNDEFINED, "Page table entry high" ), - LONG_PORT( 0x004, PTEL, PORT_MRW, UNDEFINED, "Page table entry low" ), -MMIO_REGION_END - -MMIO_REGION_BEGIN( BSC, 0xFF800000, "I/O Port Registers" ) - LONG_PORT( 0x000, BCR1, PORT_MRW, 0, "" ), - WORD_PORT( 0x004, BCR2, PORT_MRW, 0x3FFC, "" ), - LONG_PORT( 0x008, WCR1, PORT_MRW, 0x77777777, "" ), - LONG_PORT( 0x00C, WCR2, PORT_MRW, 0xFFFEEFFF, "" ), - LONG_PORT( 0x010, WCR3, PORT_MRW, 0x07777777, "" ), - LONG_PORT( 0x02C, PCTRA, PORT_MRW, 0, "Port control register A" ), - WORD_PORT( 0x030, PDTRA, PORT_RW, UNDEFINED, "Port data register A" ), - LONG_PORT( 0x040, PCTRB, PORT_MRW, 0, "Port control register B" ), - WORD_PORT( 0x044, PCTRB, PORT_RW, UNDEFINED, "Port data register B" ), - WORD_PORT( 0x048, GPIOIC, PORT_MRW, 0, "GPIO interrupt control register" ) -MMIO_REGION_END - -MMIO_REGION_BEGIN( SCI, 0xFFE00000, "Serial Controller Registers" ) - -MMIO_REGION_END - -MMIO_REGIN_BEGIN( SCIF, 0xFFE80000, "Serial Controller (FIFO) Registers" ) -MMIO_REGION_END -