diff options
author | twinaphex | 2014-11-01 06:07:01 +0100 |
---|---|---|
committer | twinaphex | 2014-11-01 06:07:01 +0100 |
commit | bbac1324c6135fc17641fe12f5aa2b7c3623483c (patch) | |
tree | 3a0aef4b3cb8e95829fdb573442e1de891bd10cf | |
parent | 6097277f9119c2ae632eaf05a581a839c01a9366 (diff) | |
download | snesemu-bbac1324c6135fc17641fe12f5aa2b7c3623483c.tar.gz snesemu-bbac1324c6135fc17641fe12f5aa2b7c3623483c.tar.bz2 snesemu-bbac1324c6135fc17641fe12f5aa2b7c3623483c.zip |
(Griffin) Add Griffin option, enable by default
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | source/catsfc_griffin.c | 33 | ||||
-rw-r--r-- | source/spc700.c | 12 |
3 files changed, 47 insertions, 7 deletions
@@ -1,5 +1,6 @@ DEBUG = 0 PERF_TEST = 1 +HAVE_GRIFFIN = 1 ifeq ($(platform),) platform = unix @@ -128,6 +129,11 @@ DEFS += -D__LIBRETRO__ CATSFC_DIR := libfreedo +ifeq ($(HAVE_GRIFFIN), 1) +CATSFC_SOURCES := source/catsfc_griffin.c +CATSFC_SOURCES += source/sa1.c source/sa1cpu.c +LIBRETRO_SOURCES := +else CATSFC_SOURCES := source/apu.c source/c4.c \ source/c4emu.c \ source/cheats2.c \ @@ -158,9 +164,10 @@ CATSFC_SOURCES := source/apu.c source/c4.c \ source/spc700.c source/spc7110.c \ source/srtc.c \ source/tile.c +LIBRETRO_SOURCES := libretro.c +endif -LIBRETRO_SOURCES := libretro.c SOURCES_C := $(LIBRETRO_SOURCES) $(CATSFC_SOURCES) diff --git a/source/catsfc_griffin.c b/source/catsfc_griffin.c new file mode 100644 index 0000000..e94c144 --- /dev/null +++ b/source/catsfc_griffin.c @@ -0,0 +1,33 @@ +#include "apu.c" +#include "c4.c" +#include "c4emu.c" +#include "cheats2.c" +#include "cheats.c" +#include "clip.c" +#include "cpu.c" +#include "cpuexec.c" +#include "cpuops.c" +#include "data.c" +#include "dma.c" +#include "dsp1.c" +#include "fxdbg.c" +#include "fxemu.c" +#include "fxinst.c" +#include "gfx.c" +#include "globals.c" +#include "memmap.c" +#include "obc1.c" +#include "ppu.c" +#include "sdd1.c" +#include "sdd1emu.c" +#include "seta010.c" +#include "seta011.c" +#include "seta018.c" +#include "seta.c" +#include "soundux.c" +#include "spc700.c" +#include "spc7110.c" +#include "srtc.c" +#include "tile.c" + +#include "../libretro.c" diff --git a/source/spc700.c b/source/spc700.c index 904c429..a17c7b7 100644 --- a/source/spc700.c +++ b/source/spc700.c @@ -154,7 +154,7 @@ void STOP(char* s) #define TCALL(n)\ {\ - PushW (IAPU.PC - IAPU.RAM + 1); \ + SPC700_PushW (IAPU.PC - IAPU.RAM + 1); \ IAPU.PC = IAPU.RAM + (APU.ExtraRAM [((15 - n) << 1)] + \ (APU.ExtraRAM [((15 - n) << 1) + 1] << 8)); \ } @@ -222,14 +222,14 @@ APUSetZN8 ((uint8) Int16); (b) = *(IAPU.RAM + 0x100 + IAPU.Registers.S); #ifdef FAST_LSB_WORD_ACCESS -#define PushW(w)\ +#define SPC700_PushW(w)\ *(uint16 *) (IAPU.RAM + 0xff + IAPU.Registers.S) = w;\ IAPU.Registers.S -= 2; #define PopW(w)\ IAPU.Registers.S += 2;\ w = *(uint16 *) (IAPU.RAM + 0xff + IAPU.Registers.S); #else -#define PushW(w)\ +#define SPC700_PushW(w)\ *(IAPU.RAM + 0xff + IAPU.Registers.S) = w;\ *(IAPU.RAM + 0x100 + IAPU.Registers.S) = ((w) >> 8);\ IAPU.Registers.S -= 2; @@ -380,14 +380,14 @@ void Apu3F() // CALL absolute { Absolute(); // 0xB6f for Star Fox 2 - PushW(IAPU.PC + 3 - IAPU.RAM); + SPC700_PushW(IAPU.PC + 3 - IAPU.RAM); IAPU.PC = IAPU.RAM + IAPU.Address; } void Apu4F() // PCALL $XX { uint8 Work8 = OP1; - PushW(IAPU.PC + 2 - IAPU.RAM); + SPC700_PushW(IAPU.PC + 2 - IAPU.RAM); IAPU.PC = IAPU.RAM + 0xff00 + Work8; } @@ -909,7 +909,7 @@ void Apu0F() #if 0 STOP("BRK"); #else - PushW(IAPU.PC + 1 - IAPU.RAM); + SPC700_PushW(IAPU.PC + 1 - IAPU.RAM); S9xAPUPackStatus(); Push(IAPU.Registers.P); APUSetBreak(); |