From: notaz Date: Tue, 26 Jun 2007 21:13:40 +0000 (+0000) Subject: some fixes for some configurations X-Git-Tag: v1.85~718 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a9a5a6e0b1788acaf45adaa84a7c2bc9541e5abc;p=picodrive.git some fixes for some configurations git-svn-id: file:///home/notaz/opt/svn/PicoDrive@175 be3aeb3a-fb24-0410-a615-afba39da0efa --- diff --git a/cpu/Cyclone/Main.cpp b/cpu/Cyclone/Main.cpp index 1d0318ca..e4f71078 100644 --- a/cpu/Cyclone/Main.cpp +++ b/cpu/Cyclone/Main.cpp @@ -32,7 +32,7 @@ void ltorg() else ot(" .ltorg\n"); } -#if CYCLONE_FOR_GENESIS +#if (CYCLONE_FOR_GENESIS == 2) // r12=ptr to tas in table, trashes r0,r1 static void ChangeTAS(int norm) { @@ -186,7 +186,7 @@ static void PrintFramework() ot("CycloneEnd%s\n", ms?"":":"); ot(" sub r4,r4,#2\n"); ot("CycloneEndNoBack%s\n", ms?"":":"); -#ifdef CYCLONE_FOR_PICODRIVE +#if (CYCLONE_FOR_GENESIS == 2) ot(" ldr r1,[r7,#0x54]\n"); ot(" mov r9,r9,lsr #28\n"); ot(" tst r1,r1\n"); @@ -306,7 +306,7 @@ static void PrintFramework() if (ms) ot("CycloneSetRealTAS\n"); else ot("CycloneSetRealTAS:\n"); -#if CYCLONE_FOR_GENESIS +#if (CYCLONE_FOR_GENESIS == 2) ot(" ldr r12,=CycloneJumpTab\n"); ot(" tst r0,r0\n"); ot(" add r12,r12,#0x4a00*4\n"); @@ -691,7 +691,7 @@ static int CycloneMake() ot(" .global CycloneGetSr\n"); ot(" .global CycloneSetRealTAS\n"); ot(" .global CycloneVer\n"); -#ifdef CYCLONE_FOR_PICODRIVE +#if (CYCLONE_FOR_GENESIS == 2) ot(" .global CycloneDoInterrupt\n"); ot(" .global CycloneJumpTab\n"); #endif diff --git a/cpu/Cyclone/OpLogic.cpp b/cpu/Cyclone/OpLogic.cpp index 2a0c8195..b6eb0755 100644 --- a/cpu/Cyclone/OpLogic.cpp +++ b/cpu/Cyclone/OpLogic.cpp @@ -148,7 +148,7 @@ int OpNeg(int op) OpStart(op,ea); Cycles=size<2?4:6; if(ea >= 0x10) { Cycles*=2; -#ifdef CYCLONE_FOR_GENESIS +#if CYCLONE_FOR_GENESIS // This is same as in Starscream core, CLR uses only 6 cycles for memory EAs. // May be this is similar case as with TAS opcode, but this time the dummy // read is ignored somehow? Without this hack Fatal Rewind hangs even in Gens. @@ -672,7 +672,7 @@ int OpTas(int op, int gen_special) OpEnd(); -#if CYCLONE_FOR_GENESIS +#if (CYCLONE_FOR_GENESIS == 2) if (!gen_special && ea >= 0x10) { OpTas(op, 1); } diff --git a/cpu/Cyclone/config.h b/cpu/Cyclone/config.h index ded00b1e..a7f6a75e 100644 --- a/cpu/Cyclone/config.h +++ b/cpu/Cyclone/config.h @@ -18,7 +18,7 @@ * the write-back phase. That will be emulated, if this option is enabled. * This option also alters timing slightly. */ -#define CYCLONE_FOR_GENESIS 1 +#define CYCLONE_FOR_GENESIS 2 /* * This option compresses Cyclone's jumptable. Because of this the executable @@ -35,7 +35,7 @@ * Using 0xff000000 means that only 24 least significant bits should be used. * Set to 0 if you want to mask unused address bits in the memory handlers yourself. */ -#define MEMHANDLERS_ADDR_MASK 0xff000000 +#define MEMHANDLERS_ADDR_MASK 0 /* * Cyclone keeps the 4 least significant bits of SR, PC+membase and it's cycle diff --git a/cpu/Cyclone/proj/Makefile.linux b/cpu/Cyclone/proj/Makefile similarity index 95% rename from cpu/Cyclone/proj/Makefile.linux rename to cpu/Cyclone/proj/Makefile index 159bb661..e9da743a 100644 --- a/cpu/Cyclone/proj/Makefile.linux +++ b/cpu/Cyclone/proj/Makefile @@ -1,4 +1,4 @@ -CFLAGS = -Wall -DCYCLONE_FOR_PICODRIVE +CFLAGS = -Wall all : cyclone.s