2015-12-05 05:44:49 +00:00
|
|
|
auto APU::serialize(serializer& s) -> void {
|
2012-03-23 10:43:39 +00:00
|
|
|
Thread::serialize(s);
|
2011-09-23 11:13:57 +00:00
|
|
|
|
Update to v082r33 release.
byuu says:
Added MMC2, MMC4, VRC4, VRC7 (no audio.)
Split NES audio code up into individual modules.
Fixed libsnes to compile: Themaister, can you please test to make sure
it works? I don't have a libsnes client on my work PC to test it.
Added about / license information to bottom of advanced settings screen
for now (better than nothing, I guess.)
Blocked PPU reads/writes while rendering for now, easier than coming up
with a bus address locking thing :/
I can't seem to fix MMC5 graphics during the intro to Uchuu Keibitai.
Without that, trying to implement vertical-split screen mode doesn't
make sense.
So as far as special audio chips go ...
* VRC6 is completed
* Sunsoft 5B has everything the only game to use it uses, but there are
more unused channels I'd like to support anyway (they aren't
documented, though.)
* MMC5 audio unsupported for now
* VRC7 audio unsupported, probably for a long time (hardest audio driver
of all. More complex than core NES APU.)
* audio PCM games (Moero Pro Yakyuu!) I probably won't ever support
(they require external WAV packs.)
2011-10-12 12:03:58 +00:00
|
|
|
pulse[0].serialize(s);
|
|
|
|
pulse[1].serialize(s);
|
2011-09-23 11:13:57 +00:00
|
|
|
triangle.serialize(s);
|
|
|
|
dmc.serialize(s);
|
|
|
|
frame.serialize(s);
|
|
|
|
|
2016-06-27 13:07:57 +00:00
|
|
|
s.integer(enabledChannels);
|
|
|
|
s.integer(cartridgeSample);
|
2011-09-23 11:13:57 +00:00
|
|
|
}
|
|
|
|
|
2016-06-27 13:07:57 +00:00
|
|
|
auto APU::Envelope::serialize(serializer& s) -> void {
|
|
|
|
s.integer(speed);
|
|
|
|
s.integer(useSpeedAsVolume);
|
|
|
|
s.integer(loopMode);
|
|
|
|
|
|
|
|
s.integer(reloadDecay);
|
|
|
|
s.integer(decayCounter);
|
|
|
|
s.integer(decayVolume);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto APU::Sweep::serialize(serializer& s) -> void {
|
|
|
|
s.integer(shift);
|
|
|
|
s.integer(decrement);
|
|
|
|
s.integer(period);
|
|
|
|
s.integer(counter);
|
|
|
|
s.integer(enable);
|
|
|
|
s.integer(reload);
|
|
|
|
s.integer(pulsePeriod);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto APU::Pulse::serialize(serializer& s) -> void {
|
|
|
|
s.integer(lengthCounter);
|
|
|
|
|
|
|
|
envelope.serialize(s);
|
|
|
|
sweep.serialize(s);
|
|
|
|
|
|
|
|
s.integer(duty);
|
|
|
|
s.integer(dutyCounter);
|
|
|
|
|
|
|
|
s.integer(period);
|
|
|
|
s.integer(periodCounter);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto APU::Triangle::serialize(serializer& s) -> void {
|
|
|
|
s.integer(lengthCounter);
|
|
|
|
|
|
|
|
s.integer(linearLength);
|
|
|
|
s.integer(haltLengthCounter);
|
|
|
|
|
|
|
|
s.integer(period);
|
|
|
|
s.integer(periodCounter);
|
|
|
|
|
|
|
|
s.integer(stepCounter);
|
|
|
|
s.integer(linearLengthCounter);
|
|
|
|
s.integer(reloadLinear);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto APU::Noise::serialize(serializer& s) -> void {
|
|
|
|
s.integer(lengthCounter);
|
|
|
|
|
|
|
|
envelope.serialize(s);
|
|
|
|
|
|
|
|
s.integer(period);
|
|
|
|
s.integer(periodCounter);
|
|
|
|
|
|
|
|
s.integer(shortMode);
|
|
|
|
s.integer(lfsr);
|
|
|
|
}
|
|
|
|
|
|
|
|
auto APU::DMC::serialize(serializer& s) -> void {
|
|
|
|
s.integer(lengthCounter);
|
|
|
|
s.integer(irqPending);
|
|
|
|
|
|
|
|
s.integer(period);
|
|
|
|
s.integer(periodCounter);
|
|
|
|
|
|
|
|
s.integer(irqEnable);
|
|
|
|
s.integer(loopMode);
|
|
|
|
|
|
|
|
s.integer(dacLatch);
|
|
|
|
s.integer(addrLatch);
|
|
|
|
s.integer(lengthLatch);
|
|
|
|
|
|
|
|
s.integer(readAddr);
|
|
|
|
s.integer(dmaDelayCounter);
|
|
|
|
|
|
|
|
s.integer(bitCounter);
|
|
|
|
s.integer(dmaBufferValid);
|
|
|
|
s.integer(dmaBuffer);
|
|
|
|
|
|
|
|
s.integer(sampleValid);
|
|
|
|
s.integer(sample);
|
|
|
|
}
|
|
|
|
|
2015-12-05 05:44:49 +00:00
|
|
|
auto APU::FrameCounter::serialize(serializer& s) -> void {
|
2016-06-27 13:07:57 +00:00
|
|
|
s.integer(irqPending);
|
2011-09-23 11:13:57 +00:00
|
|
|
|
|
|
|
s.integer(mode);
|
|
|
|
s.integer(counter);
|
|
|
|
s.integer(divider);
|
|
|
|
}
|