2015-11-10 11:02:29 +00:00
|
|
|
auto System::serialize() -> serializer {
|
2016-01-23 07:29:34 +00:00
|
|
|
serializer s(_serializeSize);
|
2010-08-09 13:28:56 +00:00
|
|
|
|
Update to v098r01 release.
byuu says:
Changelog:
- SFC: balanced profile removed
- SFC: performance profile removed
- SFC: code for handling non-threaded CPU, SMP, DSP, PPU removed
- SFC: Coprocessor, Controller (and expansion port) shared Thread code
merged to SFC::Cothread
- Cothread here just means "Thread with CPU affinity" (couldn't think
of a better name, sorry)
- SFC: CPU now has vector<Thread*> coprocessors, peripherals;
- this is the beginning of work to allow expansion port devices to be
dynamically changed at run-time
- ruby: all audio drivers default to 48000hz instead of 22050hz now if
no frequency is assigned
- note: the WASAPI driver can default to whatever the native frequency
is; doesn't have to be 48000hz
- tomoko: removed the ability to change the frequency from the UI (but
it will display the frequency used)
- tomoko: removed the timing settings panel
- the goal is to work toward smooth video via adaptive sync
- the model is broken by not being in control of the audio frequency
anyway
- it's further broken by PAL running at 50hz and WSC running at 75hz
- it was always broken anyway by SNES interlace timing varying from
progressive timing
- higan: audio/ stub created (for now, it's just nall/dsp/ moved here
and included as a header)
- higan: video/ stub created
- higan/GNUmakefile: now includes build rules for essential components
(libco, emulator, audio, video)
The audio changes are in preparation to merge wareya's awesome WASAPI
work without the need for the nall/dsp resampler.
2016-04-09 03:40:12 +00:00
|
|
|
uint signature = 0x31545342;
|
|
|
|
uint version = Info::SerializerVersion;
|
|
|
|
char hash[64] = {0};
|
|
|
|
char description[512] = {0};
|
|
|
|
memory::copy(&hash, (const char*)cartridge.sha256(), 64);
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
s.integer(signature);
|
|
|
|
s.integer(version);
|
2012-04-29 06:16:44 +00:00
|
|
|
s.array(hash);
|
2010-08-09 13:28:56 +00:00
|
|
|
s.array(description);
|
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
serializeAll(s);
|
2010-08-09 13:28:56 +00:00
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto System::unserialize(serializer& s) -> bool {
|
Update to v098r01 release.
byuu says:
Changelog:
- SFC: balanced profile removed
- SFC: performance profile removed
- SFC: code for handling non-threaded CPU, SMP, DSP, PPU removed
- SFC: Coprocessor, Controller (and expansion port) shared Thread code
merged to SFC::Cothread
- Cothread here just means "Thread with CPU affinity" (couldn't think
of a better name, sorry)
- SFC: CPU now has vector<Thread*> coprocessors, peripherals;
- this is the beginning of work to allow expansion port devices to be
dynamically changed at run-time
- ruby: all audio drivers default to 48000hz instead of 22050hz now if
no frequency is assigned
- note: the WASAPI driver can default to whatever the native frequency
is; doesn't have to be 48000hz
- tomoko: removed the ability to change the frequency from the UI (but
it will display the frequency used)
- tomoko: removed the timing settings panel
- the goal is to work toward smooth video via adaptive sync
- the model is broken by not being in control of the audio frequency
anyway
- it's further broken by PAL running at 50hz and WSC running at 75hz
- it was always broken anyway by SNES interlace timing varying from
progressive timing
- higan: audio/ stub created (for now, it's just nall/dsp/ moved here
and included as a header)
- higan: video/ stub created
- higan/GNUmakefile: now includes build rules for essential components
(libco, emulator, audio, video)
The audio changes are in preparation to merge wareya's awesome WASAPI
work without the need for the nall/dsp resampler.
2016-04-09 03:40:12 +00:00
|
|
|
uint signature = 0;
|
|
|
|
uint version = 0;
|
|
|
|
char hash[64] = {0};
|
|
|
|
char description[512] = {0};
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
s.integer(signature);
|
|
|
|
s.integer(version);
|
2012-04-29 06:16:44 +00:00
|
|
|
s.array(hash);
|
2010-08-09 13:28:56 +00:00
|
|
|
s.array(description);
|
|
|
|
|
|
|
|
if(signature != 0x31545342) return false;
|
|
|
|
if(version != Info::SerializerVersion) return false;
|
|
|
|
|
2011-10-27 13:30:19 +00:00
|
|
|
power();
|
2015-11-10 11:02:29 +00:00
|
|
|
serializeAll(s);
|
2010-08-09 13:28:56 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
//internal
|
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto System::serialize(serializer& s) -> void {
|
2016-01-23 07:29:34 +00:00
|
|
|
s.integer((uint&)_region);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
auto System::serializeAll(serializer& s) -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
cartridge.serialize(s);
|
|
|
|
system.serialize(s);
|
2011-03-20 13:57:55 +00:00
|
|
|
random.serialize(s);
|
2010-08-09 13:28:56 +00:00
|
|
|
cpu.serialize(s);
|
|
|
|
smp.serialize(s);
|
|
|
|
ppu.serialize(s);
|
|
|
|
dsp.serialize(s);
|
|
|
|
|
2015-08-02 06:23:13 +00:00
|
|
|
if(cartridge.hasICD2()) icd2.serialize(s);
|
|
|
|
if(cartridge.hasMCC()) mcc.serialize(s);
|
|
|
|
if(cartridge.hasEvent()) event.serialize(s);
|
|
|
|
if(cartridge.hasSA1()) sa1.serialize(s);
|
|
|
|
if(cartridge.hasSuperFX()) superfx.serialize(s);
|
|
|
|
if(cartridge.hasARMDSP()) armdsp.serialize(s);
|
|
|
|
if(cartridge.hasHitachiDSP()) hitachidsp.serialize(s);
|
|
|
|
if(cartridge.hasNECDSP()) necdsp.serialize(s);
|
|
|
|
if(cartridge.hasEpsonRTC()) epsonrtc.serialize(s);
|
|
|
|
if(cartridge.hasSharpRTC()) sharprtc.serialize(s);
|
|
|
|
if(cartridge.hasSPC7110()) spc7110.serialize(s);
|
|
|
|
if(cartridge.hasSDD1()) sdd1.serialize(s);
|
|
|
|
if(cartridge.hasOBC1()) obc1.serialize(s);
|
|
|
|
if(cartridge.hasMSU1()) msu1.serialize(s);
|
|
|
|
|
|
|
|
if(cartridge.hasSufamiTurboSlots()) sufamiturboA.serialize(s), sufamiturboB.serialize(s);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
Update to v073r03 release.
byuu says:
Changelog:
- much tighter SGB integration, but this is still a work-in-progress
- memory::gb(rom,ram,rtc) is gone, uses GameBoy:: memory structures
directly (a big gain, no need to copy memory to save and load)
- UI-based cartridge loading works with GameBoy:: directly as well
- libsnes will need to be updated internally to reflect this
- games can save and load (even before bgameboy can, hah)
- save states hooked up, but they crash the DMG. I don't know why, as
if it was hard enough saving states with libco, try doing it for an
emulator inside an emulator >_<
- last remnants of old SGB stuff removed, <sueprgameboy> XML converted
to <icd2>
- looks like the XML list idea is looking pretty useless for
SNES::Cartridge now that bgameboy handles its own XML mapping
2011-01-08 10:06:09 +00:00
|
|
|
//perform dry-run state save:
|
2010-08-09 13:28:56 +00:00
|
|
|
//determines exactly how many bytes are needed to save state for this cartridge,
|
|
|
|
//as amount varies per game (eg different RAM sizes, special chips, etc.)
|
2015-11-10 11:02:29 +00:00
|
|
|
auto System::serializeInit() -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
serializer s;
|
|
|
|
|
Update to v098r01 release.
byuu says:
Changelog:
- SFC: balanced profile removed
- SFC: performance profile removed
- SFC: code for handling non-threaded CPU, SMP, DSP, PPU removed
- SFC: Coprocessor, Controller (and expansion port) shared Thread code
merged to SFC::Cothread
- Cothread here just means "Thread with CPU affinity" (couldn't think
of a better name, sorry)
- SFC: CPU now has vector<Thread*> coprocessors, peripherals;
- this is the beginning of work to allow expansion port devices to be
dynamically changed at run-time
- ruby: all audio drivers default to 48000hz instead of 22050hz now if
no frequency is assigned
- note: the WASAPI driver can default to whatever the native frequency
is; doesn't have to be 48000hz
- tomoko: removed the ability to change the frequency from the UI (but
it will display the frequency used)
- tomoko: removed the timing settings panel
- the goal is to work toward smooth video via adaptive sync
- the model is broken by not being in control of the audio frequency
anyway
- it's further broken by PAL running at 50hz and WSC running at 75hz
- it was always broken anyway by SNES interlace timing varying from
progressive timing
- higan: audio/ stub created (for now, it's just nall/dsp/ moved here
and included as a header)
- higan: video/ stub created
- higan/GNUmakefile: now includes build rules for essential components
(libco, emulator, audio, video)
The audio changes are in preparation to merge wareya's awesome WASAPI
work without the need for the nall/dsp resampler.
2016-04-09 03:40:12 +00:00
|
|
|
uint signature = 0;
|
|
|
|
uint version = 0;
|
|
|
|
char hash[64] = {0};
|
|
|
|
char description[512] = {0};
|
2010-08-09 13:28:56 +00:00
|
|
|
|
|
|
|
s.integer(signature);
|
|
|
|
s.integer(version);
|
2012-04-29 06:16:44 +00:00
|
|
|
s.array(hash);
|
2010-08-09 13:28:56 +00:00
|
|
|
s.array(description);
|
|
|
|
|
2015-11-10 11:02:29 +00:00
|
|
|
serializeAll(s);
|
2016-01-23 07:29:34 +00:00
|
|
|
_serializeSize = s.size();
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|