Update to v102r10 release.
byuu says:
Changelog:
- removed Emulator::Interface::Capabilities¹
- MS: improved the PSG emulation a bit
- MS: added cheat code support
- MS: added save state support²
- MD: emulated the PSG³
¹: there's really no point to it anymore. I intend to add cheat codes
to the GBA core, as well as both cheat codes and save states to the Mega
Drive core. I no longer intend to emulate any new systems, so these
values will always be true. Further, the GUI doesn't respond to these
values to disable those features anymore ever since the hiro rewrite, so
they're double useless.
²: right now, the Z80 core is using a pointer for HL-\>(IX,IY)
overrides. But I can't reliably serialize pointers, so I need to convert
the Z80 core to use an integer here. The save states still appear to
work fine, but there's the potential for an instruction to execute
incorrectly if you're incredibly unlucky, so this needs to be fixed as
soon as possible. Further, I still need a way to serialize
array<T, Size> objects, and I should also add nall::Boolean
serialization support.
³: I don't have a system in place to share identical sound chips. But
this chip is so incredibly simple that it's not really much trouble to
duplicate it. Further, I can strip out the stereo sound support code
from the Game Gear portion, so it's even tinier.
Note that the Mega Drive only just barely uses the PSG. Not at all in
Altered Beast, and only for a tiny part of the BGM music on Sonic 1,
plus his jump sound effect.
2017-02-22 21:25:01 +00:00
|
|
|
auto System::serializeInit() -> void {
|
|
|
|
serializer s;
|
|
|
|
|
|
|
|
uint signature = 0;
|
|
|
|
char version[16] = {0};
|
|
|
|
char hash[64] = {0};
|
|
|
|
char description[512] = {0};
|
|
|
|
|
|
|
|
s.integer(signature);
|
|
|
|
s.array(version);
|
|
|
|
s.array(hash);
|
|
|
|
s.array(description);
|
|
|
|
|
|
|
|
serializeAll(s);
|
|
|
|
information.serializeSize = s.size();
|
|
|
|
}
|
|
|
|
|
|
|
|
auto System::serialize() -> serializer {
|
|
|
|
serializer s{information.serializeSize};
|
|
|
|
|
|
|
|
uint signature = 0x31545342;
|
|
|
|
char version[16] = {0};
|
|
|
|
char hash[64] = {0};
|
|
|
|
char description[512] = {0};
|
|
|
|
memory::copy(&version, (const char*)Emulator::SerializerVersion, Emulator::SerializerVersion.size());
|
|
|
|
memory::copy(&hash, (const char*)cartridge.sha256(), 64);
|
|
|
|
|
|
|
|
s.integer(signature);
|
|
|
|
s.array(version);
|
|
|
|
s.array(hash);
|
|
|
|
s.array(description);
|
|
|
|
|
|
|
|
serializeAll(s);
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto System::unserialize(serializer& s) -> bool {
|
|
|
|
uint signature = 0;
|
|
|
|
char version[16] = {0};
|
|
|
|
char hash[64] = {0};
|
|
|
|
char description[512] = {0};
|
|
|
|
|
|
|
|
s.integer(signature);
|
|
|
|
s.array(version);
|
|
|
|
s.array(hash);
|
|
|
|
s.array(description);
|
|
|
|
|
|
|
|
if(signature != 0x31545342) return false;
|
|
|
|
if(string{version} != Emulator::SerializerVersion) return false;
|
|
|
|
|
|
|
|
power();
|
|
|
|
serializeAll(s);
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
auto System::serializeAll(serializer& s) -> void {
|
|
|
|
system.serialize(s);
|
|
|
|
cartridge.serialize(s);
|
|
|
|
cpu.serialize(s);
|
|
|
|
vdp.serialize(s);
|
|
|
|
psg.serialize(s);
|
Update to v103r05 release.
byuu says:
Changelog:
- fc/controller: added ControllerPort class; removed Peripherals class
- md/controller/gamepad: removed X,Y,Z buttons since this isn't a
6-button controller
- ms/controller: added ControllerPort class (not used in Game Gear
mode); removed Peripherals class
- pce/controller: added ControllerPort class; removed Peripherals
class
- processor/spc700: idle(address) is part of SMP class again, contains
flag to detect mov (x)+ edge case
- sfc/controller/super-scope,justifier: use CPU frequency instead of
hard-coding NTSC frequency
- sfc/cpu: move 4x8-bit SMP ports to SMP class
- sfc/smp: move APU RAM to DSP class
- sfc/smp: improved emulation of TEST registers bits 4-7 [information
from nocash]
- d4,d5 is RAM wait states (1,2,5,10)
- d6,d7 is ROM/IO wait states (1,2,5,10)
- sfc/smp: code cleanup to new style (order from lowest to highest
bits; use .bit(s) functions)
- sfc/smp: $00f8,$00f9 are P4/P5 auxiliary ports; named the registers
better
2017-07-01 06:15:27 +00:00
|
|
|
controllerPort1.serialize(s);
|
|
|
|
controllerPort2.serialize(s);
|
Update to v102r10 release.
byuu says:
Changelog:
- removed Emulator::Interface::Capabilities¹
- MS: improved the PSG emulation a bit
- MS: added cheat code support
- MS: added save state support²
- MD: emulated the PSG³
¹: there's really no point to it anymore. I intend to add cheat codes
to the GBA core, as well as both cheat codes and save states to the Mega
Drive core. I no longer intend to emulate any new systems, so these
values will always be true. Further, the GUI doesn't respond to these
values to disable those features anymore ever since the hiro rewrite, so
they're double useless.
²: right now, the Z80 core is using a pointer for HL-\>(IX,IY)
overrides. But I can't reliably serialize pointers, so I need to convert
the Z80 core to use an integer here. The save states still appear to
work fine, but there's the potential for an instruction to execute
incorrectly if you're incredibly unlucky, so this needs to be fixed as
soon as possible. Further, I still need a way to serialize
array<T, Size> objects, and I should also add nall::Boolean
serialization support.
³: I don't have a system in place to share identical sound chips. But
this chip is so incredibly simple that it's not really much trouble to
duplicate it. Further, I can strip out the stereo sound support code
from the Game Gear portion, so it's even tinier.
Note that the Mega Drive only just barely uses the PSG. Not at all in
Altered Beast, and only for a tiny part of the BGM music on Sonic 1,
plus his jump sound effect.
2017-02-22 21:25:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
auto System::serialize(serializer& s) -> void {
|
|
|
|
}
|