mirror of
https://github.com/libretro/snes9x2005.git
synced 2025-01-30 21:43:45 +00:00
remove snapshot.c snaporig.c dependencies.
This commit is contained in:
parent
1fbc985d61
commit
21ddea4dfa
2
Makefile
2
Makefile
@ -153,8 +153,6 @@ CATSFC_SOURCES := source/apu.c source/c4.c \
|
||||
source/seta011.c \
|
||||
source/seta018.c \
|
||||
source/seta.c \
|
||||
source/snaporig.c \
|
||||
source/snapshot.c \
|
||||
source/soundux.c \
|
||||
source/spc700.c source/spc7110.c \
|
||||
source/srtc.c \
|
||||
|
79
libretro.c
79
libretro.c
@ -6,11 +6,11 @@
|
||||
#include "memmap.h"
|
||||
#include "apu.h"
|
||||
#include "cheats.h"
|
||||
#include "snapshot.h"
|
||||
#include "display.h"
|
||||
#include "gfx.h"
|
||||
#include "cpuexec.h"
|
||||
#include "spc7110.h"
|
||||
#include "srtc.h"
|
||||
|
||||
#include <libretro.h>
|
||||
|
||||
@ -322,31 +322,6 @@ void S9xAutoSaveSRAM()
|
||||
SaveSRAM(S9xGetFilename(".srm"));
|
||||
}
|
||||
|
||||
int game_load_state(char* file)
|
||||
{
|
||||
int flag;
|
||||
|
||||
flag = 0;
|
||||
if (S9xUnfreezeGame(file) == FALSE)
|
||||
flag = -1;
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
int game_save_state(char* file)
|
||||
{
|
||||
int flag;
|
||||
|
||||
flag = 0;
|
||||
if (S9xFreezeGame(file) == FALSE)
|
||||
flag = -1;
|
||||
|
||||
S9xAutoSaveSRAM();
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
|
||||
void retro_init(void)
|
||||
{
|
||||
struct retro_log_callback log;
|
||||
@ -578,7 +553,57 @@ size_t retro_serialize_size(void)
|
||||
|
||||
bool retro_serialize(void* data, size_t size)
|
||||
{
|
||||
return false;
|
||||
// S9xUpdateRTC();
|
||||
// S9xSRTCPreSaveState();
|
||||
|
||||
// for (i = 0; i < 8; i++)
|
||||
// {
|
||||
// SoundData.channels [i].previous16 [0] = (int16)
|
||||
// SoundData.channels [i].previous [0];
|
||||
// SoundData.channels [i].previous16 [1] = (int16)
|
||||
// SoundData.channels [i].previous [1];
|
||||
// }
|
||||
// sprintf(buffer, "%s:%04d\n", SNAPSHOT_MAGIC, SNAPSHOT_VERSION);
|
||||
// WRITE_STREAM(buffer, strlen(buffer), stream);
|
||||
// sprintf(buffer, "NAM:%06d:%s%c", strlen(Memory.ROMFilename) + 1,
|
||||
// Memory.ROMFilename, 0);
|
||||
// WRITE_STREAM(buffer, strlen(buffer) + 1, stream);
|
||||
// FreezeStruct(stream, "CPU", &CPU, SnapCPU, COUNT(SnapCPU));
|
||||
// FreezeStruct(stream, "REG", &ICPU.Registers, SnapRegisters,
|
||||
// COUNT(SnapRegisters));
|
||||
// FreezeStruct(stream, "PPU", &PPU, SnapPPU, COUNT(SnapPPU));
|
||||
// FreezeStruct(stream, "DMA", DMA, SnapDMA, COUNT(SnapDMA));
|
||||
|
||||
// // RAM and VRAM
|
||||
// FreezeBlock(stream, "VRA", Memory.VRAM, 0x10000);
|
||||
// FreezeBlock(stream, "RAM", Memory.RAM, 0x20000);
|
||||
// FreezeBlock(stream, "SRA", Memory.SRAM, 0x20000);
|
||||
// FreezeBlock(stream, "FIL", Memory.FillRAM, 0x8000);
|
||||
// if (Settings.APUEnabled)
|
||||
// {
|
||||
// // APU
|
||||
// FreezeStruct(stream, "APU", &APU, SnapAPU, COUNT(SnapAPU));
|
||||
// FreezeStruct(stream, "ARE", &IAPU.Registers, SnapAPURegisters,
|
||||
// COUNT(SnapAPURegisters));
|
||||
// FreezeBlock(stream, "ARA", IAPU.RAM, 0x10000);
|
||||
// FreezeStruct(stream, "SOU", &SoundData, SnapSoundData,
|
||||
// COUNT(SnapSoundData));
|
||||
// }
|
||||
// if (Settings.SA1)
|
||||
// {
|
||||
// SA1.Registers.PC = SA1.PC - SA1.PCBase;
|
||||
// S9xSA1PackStatus();
|
||||
// FreezeStruct(stream, "SA1", &SA1, SnapSA1, COUNT(SnapSA1));
|
||||
// FreezeStruct(stream, "SAR", &SA1.Registers, SnapSA1Registers,
|
||||
// COUNT(SnapSA1Registers));
|
||||
// }
|
||||
|
||||
// if (Settings.SPC7110)
|
||||
// FreezeStruct(stream, "SP7", &s7r, SnapSPC7110, COUNT(SnapSPC7110));
|
||||
// if (Settings.SPC7110RTC)
|
||||
// FreezeStruct(stream, "RTC", &rtc_f9, SnapS7RTC, COUNT(SnapS7RTC));
|
||||
|
||||
return true;
|
||||
}
|
||||
bool retro_unserialize(const void* data, size_t size)
|
||||
{
|
||||
|
21
source/apu.c
21
source/apu.c
@ -98,13 +98,6 @@
|
||||
#include "soundux.h"
|
||||
#include "cpuexec.h"
|
||||
|
||||
/* For note-triggered SPC dump support */
|
||||
#include "snapshot.h"
|
||||
|
||||
int spc_is_dumping = 0;
|
||||
int spc_is_dumping_temp;
|
||||
uint8 spc_dump_dsp[0x100];
|
||||
|
||||
extern int NoiseFreq [32];
|
||||
|
||||
bool8 S9xInitAPU()
|
||||
@ -140,7 +133,6 @@ void S9xResetAPU()
|
||||
|
||||
Settings.APUEnabled = Settings.NextAPUEnabled;
|
||||
|
||||
ZeroMemory(spc_dump_dsp, 0x100);
|
||||
ZeroMemory(IAPU.RAM, 0x100);
|
||||
memset(IAPU.RAM + 0x20, 0xFF, 0x20);
|
||||
memset(IAPU.RAM + 0x60, 0xFF, 0x20);
|
||||
@ -207,8 +199,6 @@ void S9xSetAPUDSP(uint8 byte)
|
||||
static uint8 KeyOnPrev;
|
||||
int i;
|
||||
|
||||
spc_dump_dsp[reg] = byte;
|
||||
|
||||
switch (reg)
|
||||
{
|
||||
case APU_FLG:
|
||||
@ -320,16 +310,6 @@ void S9xSetAPUDSP(uint8 byte)
|
||||
APU.DSP [APU_KOFF] = byte;
|
||||
return;
|
||||
case APU_KON:
|
||||
if (spc_is_dumping)
|
||||
{
|
||||
if (byte & ~spc_is_dumping_temp)
|
||||
{
|
||||
IAPU.Registers.PC = IAPU.PC - IAPU.RAM;
|
||||
S9xAPUPackStatus();
|
||||
S9xSPCDump(".spc");
|
||||
spc_is_dumping = 0;
|
||||
}
|
||||
}
|
||||
if (byte)
|
||||
{
|
||||
int c;
|
||||
@ -353,7 +333,6 @@ void S9xSetAPUDSP(uint8 byte)
|
||||
}
|
||||
}
|
||||
}
|
||||
spc_is_dumping_temp = byte;
|
||||
return;
|
||||
|
||||
case APU_VOL_LEFT + 0x00:
|
||||
|
@ -90,6 +90,7 @@
|
||||
#ifndef _apu_h_
|
||||
#define _apu_h_
|
||||
|
||||
#include "port.h"
|
||||
#include "spc700.h"
|
||||
|
||||
typedef struct
|
||||
@ -130,9 +131,7 @@ typedef struct
|
||||
|
||||
SAPU APU;
|
||||
SIAPU IAPU;
|
||||
extern int spc_is_dumping;
|
||||
extern int spc_is_dumping_temp;
|
||||
extern uint8 spc_dump_dsp[0x100];
|
||||
|
||||
STATIC inline void S9xAPUUnpackStatus()
|
||||
{
|
||||
IAPU._Zero = ((IAPU.Registers.P & Zero) == 0) | (IAPU.Registers.P & Negative);
|
||||
|
@ -95,7 +95,6 @@
|
||||
#include "cpuops.h"
|
||||
#include "ppu.h"
|
||||
#include "cpuexec.h"
|
||||
#include "snapshot.h"
|
||||
#include "gfx.h"
|
||||
#include "missing.h"
|
||||
#include "apu.h"
|
||||
|
Loading…
x
Reference in New Issue
Block a user