bsnes/higan/gba/apu/serialization.cpp

111 lines
3.0 KiB
C++
Raw Normal View History

auto APU::serialize(serializer& s) -> void {
Thread::serialize(s);
Update to v102r22 release. byuu says: Changelog: - higan: Emulator::Interface::videoSize() renamed to videoResolution() - higan: Emulator::Interface::rtcsync() renamed to rtcSynchronize() - higan: added video display rotation support to Video - GBA: substantially improved audio mixing - fixed bug with FIFO 50%/100% volume setting - now properly using SOUNDBIAS amplitude to control output frequencies - reduced quantization noise - corrected relative volumes between PSG and FIFO channels - both PSG and FIFO values cached based on amplitude; resulting in cleaner PCM samples - treating PSG volume=3 as 200% volume instead of 0% volume now (unverified: to match mGBA) - GBA: properly initialize ALL CPU state; including the vital prefetch.wait=1 (fixes Classic NES series games) - GBA: added video rotation with automatic key translation support - PCE: reduced output resolution scalar from 285x242 to 285x240 - the extra two scanlines won't be visible on most TVs; and they make all other cores look worse - this is because all other cores output at 240p or less; so they were all receiving black bars in windowed mode - tomoko: added "Rotate Display" hotkey setting - tomoko: changed hotkey multi-key logic to OR instead of AND - left support for flipping it back inside the core; for those so inclined; by uncommenting one line in input.hpp - tomoko: when choosing Settings→Configuration, it will automatically select the currently loaded system - for instance, if you're playing a Game Gear game, it'll take you to the Game Gear input settings - if no games are loaded, it will take you to the hotkeys panel instead - WS(C): merged "Hardware-Vertical", "Hardware-Horizontal" controls into combined "Hardware" - WS(C): converted rotation support from being inside the core to using Emulator::Video - this lets WS(C) video content scale larger now that it's not bounded by a 224x224 square box - WS(C): added automatic key rotation support - WS(C): removed emulator "Rotate" key (use the general hotkey instead; I recommend F8 for this) - nall: added serializer support for nall::Boolean (boolean) types - although I will probably prefer the usage of uint1 in most cases
2017-06-08 14:05:48 +00:00
s.integer(clock);
s.integer(regs.bias.level);
s.integer(regs.bias.amplitude);
s.integer(square1.sweep.shift);
s.integer(square1.sweep.direction);
s.integer(square1.sweep.frequency);
s.integer(square1.sweep.enable);
s.integer(square1.sweep.negate);
s.integer(square1.sweep.period);
s.integer(square1.envelope.frequency);
s.integer(square1.envelope.direction);
s.integer(square1.envelope.volume);
s.integer(square1.envelope.period);
s.integer(square1.enable);
s.integer(square1.length);
s.integer(square1.duty);
s.integer(square1.frequency);
s.integer(square1.counter);
s.integer(square1.initialize);
s.integer(square1.shadowfrequency);
s.integer(square1.signal);
s.integer(square1.output);
s.integer(square1.period);
s.integer(square1.phase);
s.integer(square1.volume);
s.integer(square2.envelope.frequency);
s.integer(square2.envelope.direction);
s.integer(square2.envelope.volume);
s.integer(square2.envelope.period);
s.integer(square2.enable);
s.integer(square2.length);
s.integer(square2.duty);
s.integer(square2.frequency);
s.integer(square2.counter);
s.integer(square2.initialize);
s.integer(square2.shadowfrequency);
s.integer(square2.signal);
s.integer(square2.output);
s.integer(square2.period);
s.integer(square2.phase);
s.integer(square2.volume);
s.integer(wave.mode);
s.integer(wave.bank);
s.integer(wave.dacenable);
s.integer(wave.length);
s.integer(wave.volume);
s.integer(wave.frequency);
s.integer(wave.counter);
s.integer(wave.initialize);
for(auto& value : wave.pattern) s.integer(value);
s.integer(wave.enable);
s.integer(wave.output);
s.integer(wave.patternaddr);
s.integer(wave.patternbank);
s.integer(wave.patternsample);
s.integer(wave.period);
s.integer(noise.envelope.frequency);
s.integer(noise.envelope.direction);
s.integer(noise.envelope.volume);
s.integer(noise.envelope.period);
s.integer(noise.length);
s.integer(noise.divisor);
s.integer(noise.narrowlfsr);
s.integer(noise.frequency);
s.integer(noise.counter);
s.integer(noise.initialize);
s.integer(noise.enable);
s.integer(noise.lfsr);
s.integer(noise.output);
s.integer(noise.period);
s.integer(noise.volume);
s.integer(sequencer.volume);
s.integer(sequencer.lvolume);
s.integer(sequencer.rvolume);
for(auto& flag : sequencer.lenable) s.integer(flag);
for(auto& flag : sequencer.renable) s.integer(flag);
s.integer(sequencer.masterenable);
s.integer(sequencer.base);
s.integer(sequencer.step);
s.integer(sequencer.lsample);
s.integer(sequencer.rsample);
Update to v102r22 release. byuu says: Changelog: - higan: Emulator::Interface::videoSize() renamed to videoResolution() - higan: Emulator::Interface::rtcsync() renamed to rtcSynchronize() - higan: added video display rotation support to Video - GBA: substantially improved audio mixing - fixed bug with FIFO 50%/100% volume setting - now properly using SOUNDBIAS amplitude to control output frequencies - reduced quantization noise - corrected relative volumes between PSG and FIFO channels - both PSG and FIFO values cached based on amplitude; resulting in cleaner PCM samples - treating PSG volume=3 as 200% volume instead of 0% volume now (unverified: to match mGBA) - GBA: properly initialize ALL CPU state; including the vital prefetch.wait=1 (fixes Classic NES series games) - GBA: added video rotation with automatic key translation support - PCE: reduced output resolution scalar from 285x242 to 285x240 - the extra two scanlines won't be visible on most TVs; and they make all other cores look worse - this is because all other cores output at 240p or less; so they were all receiving black bars in windowed mode - tomoko: added "Rotate Display" hotkey setting - tomoko: changed hotkey multi-key logic to OR instead of AND - left support for flipping it back inside the core; for those so inclined; by uncommenting one line in input.hpp - tomoko: when choosing Settings→Configuration, it will automatically select the currently loaded system - for instance, if you're playing a Game Gear game, it'll take you to the Game Gear input settings - if no games are loaded, it will take you to the hotkeys panel instead - WS(C): merged "Hardware-Vertical", "Hardware-Horizontal" controls into combined "Hardware" - WS(C): converted rotation support from being inside the core to using Emulator::Video - this lets WS(C) video content scale larger now that it's not bounded by a 224x224 square box - WS(C): added automatic key rotation support - WS(C): removed emulator "Rotate" key (use the general hotkey instead; I recommend F8 for this) - nall: added serializer support for nall::Boolean (boolean) types - although I will probably prefer the usage of uint1 in most cases
2017-06-08 14:05:48 +00:00
s.integer(sequencer.loutput);
s.integer(sequencer.routput);
for(auto& f : fifo) {
Update to v102r22 release. byuu says: Changelog: - higan: Emulator::Interface::videoSize() renamed to videoResolution() - higan: Emulator::Interface::rtcsync() renamed to rtcSynchronize() - higan: added video display rotation support to Video - GBA: substantially improved audio mixing - fixed bug with FIFO 50%/100% volume setting - now properly using SOUNDBIAS amplitude to control output frequencies - reduced quantization noise - corrected relative volumes between PSG and FIFO channels - both PSG and FIFO values cached based on amplitude; resulting in cleaner PCM samples - treating PSG volume=3 as 200% volume instead of 0% volume now (unverified: to match mGBA) - GBA: properly initialize ALL CPU state; including the vital prefetch.wait=1 (fixes Classic NES series games) - GBA: added video rotation with automatic key translation support - PCE: reduced output resolution scalar from 285x242 to 285x240 - the extra two scanlines won't be visible on most TVs; and they make all other cores look worse - this is because all other cores output at 240p or less; so they were all receiving black bars in windowed mode - tomoko: added "Rotate Display" hotkey setting - tomoko: changed hotkey multi-key logic to OR instead of AND - left support for flipping it back inside the core; for those so inclined; by uncommenting one line in input.hpp - tomoko: when choosing Settings→Configuration, it will automatically select the currently loaded system - for instance, if you're playing a Game Gear game, it'll take you to the Game Gear input settings - if no games are loaded, it will take you to the hotkeys panel instead - WS(C): merged "Hardware-Vertical", "Hardware-Horizontal" controls into combined "Hardware" - WS(C): converted rotation support from being inside the core to using Emulator::Video - this lets WS(C) video content scale larger now that it's not bounded by a 224x224 square box - WS(C): added automatic key rotation support - WS(C): removed emulator "Rotate" key (use the general hotkey instead; I recommend F8 for this) - nall: added serializer support for nall::Boolean (boolean) types - although I will probably prefer the usage of uint1 in most cases
2017-06-08 14:05:48 +00:00
for(auto& value : f.samples) s.integer(value);
s.integer(f.active);
s.integer(f.output);
s.integer(f.rdoffset);
s.integer(f.wroffset);
s.integer(f.size);
s.integer(f.volume);
s.integer(f.lenable);
s.integer(f.renable);
s.integer(f.timer);
}
}