From bbac1324c6135fc17641fe12f5aa2b7c3623483c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 1 Nov 2014 06:07:01 +0100 Subject: (Griffin) Add Griffin option, enable by default --- source/catsfc_griffin.c | 33 +++++++++++++++++++++++++++++++++ source/spc700.c | 12 ++++++------ 2 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 source/catsfc_griffin.c (limited to 'source') 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(); -- cgit v1.2.3