2013-05-05 09:21:30 +00:00
|
|
|
void APU::serialize(serializer& s) {
|
Update to v087r26 release.
byuu says:
Changelog:
- fixed FIFO[1] reset behavior (fixes audio in Sword of Mana)
- added FlashROM emulation (both sizes)
- GBA parses RAM settings from manifest.xml now
- save RAM is written to disk now
- added save state support (it's currently broken, though)
- fixed ROM/RAM access timings
- open bus should mostly work (we don't do the PC+12 stuff yet)
- emulated the undocumented memory control register (mirror IWRAM,
disable I+EWRAM, EWRAM wait state count)
- emulated keypad interrupts
- emulated STOP (freezes video, audio, DMA and timers; only breaks on
keypad IRQs)
- probably a lot more, it was a long night ...
Show stoppers, missing things, broken things, etc:
- ST018 is still completely broken
- GBC audio sequencer apparently needs work
- GBA audio FIFO buffer seems too quiet
- PHI / ROM prefetch needs to be emulated (no idea on how to do this,
especially PHI)
- SOUNDBIAS 64/128/256khz modes should output at that resolution
(really, we need to simulate PWM properly, no idea on how to do this)
- object mosaic top-left coordinates are wrong (minor, fixing will
actually make the effect look worse)
- need to emulate PPU greenswap and color palette distortion (no idea on
how do this)
- need GBA save type database (I would also LIKE to blacklist
/ patch-out trainers, but that's a discussion for another day.)
- some ARM ops advance the prefetch buffer, so you can read PC+12 in
some cases
2012-04-16 12:19:39 +00:00
|
|
|
Thread::serialize(s);
|
|
|
|
|
|
|
|
s.integer(regs.bias.level);
|
|
|
|
s.integer(regs.bias.amplitude);
|
|
|
|
s.integer(regs.clock);
|
|
|
|
|
|
|
|
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);
|
2013-05-05 09:21:30 +00:00
|
|
|
for(auto& value : wave.pattern) s.integer(value);
|
Update to v087r26 release.
byuu says:
Changelog:
- fixed FIFO[1] reset behavior (fixes audio in Sword of Mana)
- added FlashROM emulation (both sizes)
- GBA parses RAM settings from manifest.xml now
- save RAM is written to disk now
- added save state support (it's currently broken, though)
- fixed ROM/RAM access timings
- open bus should mostly work (we don't do the PC+12 stuff yet)
- emulated the undocumented memory control register (mirror IWRAM,
disable I+EWRAM, EWRAM wait state count)
- emulated keypad interrupts
- emulated STOP (freezes video, audio, DMA and timers; only breaks on
keypad IRQs)
- probably a lot more, it was a long night ...
Show stoppers, missing things, broken things, etc:
- ST018 is still completely broken
- GBC audio sequencer apparently needs work
- GBA audio FIFO buffer seems too quiet
- PHI / ROM prefetch needs to be emulated (no idea on how to do this,
especially PHI)
- SOUNDBIAS 64/128/256khz modes should output at that resolution
(really, we need to simulate PWM properly, no idea on how to do this)
- object mosaic top-left coordinates are wrong (minor, fixing will
actually make the effect look worse)
- need to emulate PPU greenswap and color palette distortion (no idea on
how do this)
- need GBA save type database (I would also LIKE to blacklist
/ patch-out trainers, but that's a discussion for another day.)
- some ARM ops advance the prefetch buffer, so you can read PC+12 in
some cases
2012-04-16 12:19:39 +00:00
|
|
|
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);
|
2012-04-17 12:16:54 +00:00
|
|
|
|
Update to v087r26 release.
byuu says:
Changelog:
- fixed FIFO[1] reset behavior (fixes audio in Sword of Mana)
- added FlashROM emulation (both sizes)
- GBA parses RAM settings from manifest.xml now
- save RAM is written to disk now
- added save state support (it's currently broken, though)
- fixed ROM/RAM access timings
- open bus should mostly work (we don't do the PC+12 stuff yet)
- emulated the undocumented memory control register (mirror IWRAM,
disable I+EWRAM, EWRAM wait state count)
- emulated keypad interrupts
- emulated STOP (freezes video, audio, DMA and timers; only breaks on
keypad IRQs)
- probably a lot more, it was a long night ...
Show stoppers, missing things, broken things, etc:
- ST018 is still completely broken
- GBC audio sequencer apparently needs work
- GBA audio FIFO buffer seems too quiet
- PHI / ROM prefetch needs to be emulated (no idea on how to do this,
especially PHI)
- SOUNDBIAS 64/128/256khz modes should output at that resolution
(really, we need to simulate PWM properly, no idea on how to do this)
- object mosaic top-left coordinates are wrong (minor, fixing will
actually make the effect look worse)
- need to emulate PPU greenswap and color palette distortion (no idea on
how do this)
- need GBA save type database (I would also LIKE to blacklist
/ patch-out trainers, but that's a discussion for another day.)
- some ARM ops advance the prefetch buffer, so you can read PC+12 in
some cases
2012-04-16 12:19:39 +00:00
|
|
|
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);
|
2013-05-05 09:21:30 +00:00
|
|
|
for(auto& flag : sequencer.lenable) s.integer(flag);
|
|
|
|
for(auto& flag : sequencer.renable) s.integer(flag);
|
|
|
|
for(auto& flag : sequencer.enable) s.integer(flag);
|
Update to v087r26 release.
byuu says:
Changelog:
- fixed FIFO[1] reset behavior (fixes audio in Sword of Mana)
- added FlashROM emulation (both sizes)
- GBA parses RAM settings from manifest.xml now
- save RAM is written to disk now
- added save state support (it's currently broken, though)
- fixed ROM/RAM access timings
- open bus should mostly work (we don't do the PC+12 stuff yet)
- emulated the undocumented memory control register (mirror IWRAM,
disable I+EWRAM, EWRAM wait state count)
- emulated keypad interrupts
- emulated STOP (freezes video, audio, DMA and timers; only breaks on
keypad IRQs)
- probably a lot more, it was a long night ...
Show stoppers, missing things, broken things, etc:
- ST018 is still completely broken
- GBC audio sequencer apparently needs work
- GBA audio FIFO buffer seems too quiet
- PHI / ROM prefetch needs to be emulated (no idea on how to do this,
especially PHI)
- SOUNDBIAS 64/128/256khz modes should output at that resolution
(really, we need to simulate PWM properly, no idea on how to do this)
- object mosaic top-left coordinates are wrong (minor, fixing will
actually make the effect look worse)
- need to emulate PPU greenswap and color palette distortion (no idea on
how do this)
- need GBA save type database (I would also LIKE to blacklist
/ patch-out trainers, but that's a discussion for another day.)
- some ARM ops advance the prefetch buffer, so you can read PC+12 in
some cases
2012-04-16 12:19:39 +00:00
|
|
|
s.integer(sequencer.masterenable);
|
|
|
|
s.integer(sequencer.base);
|
|
|
|
s.integer(sequencer.step);
|
|
|
|
s.integer(sequencer.lsample);
|
|
|
|
s.integer(sequencer.rsample);
|
|
|
|
|
2013-05-05 09:21:30 +00:00
|
|
|
for(auto& f : fifo) {
|
|
|
|
for(auto& value : f.sample) s.integer(value);
|
Update to v087r26 release.
byuu says:
Changelog:
- fixed FIFO[1] reset behavior (fixes audio in Sword of Mana)
- added FlashROM emulation (both sizes)
- GBA parses RAM settings from manifest.xml now
- save RAM is written to disk now
- added save state support (it's currently broken, though)
- fixed ROM/RAM access timings
- open bus should mostly work (we don't do the PC+12 stuff yet)
- emulated the undocumented memory control register (mirror IWRAM,
disable I+EWRAM, EWRAM wait state count)
- emulated keypad interrupts
- emulated STOP (freezes video, audio, DMA and timers; only breaks on
keypad IRQs)
- probably a lot more, it was a long night ...
Show stoppers, missing things, broken things, etc:
- ST018 is still completely broken
- GBC audio sequencer apparently needs work
- GBA audio FIFO buffer seems too quiet
- PHI / ROM prefetch needs to be emulated (no idea on how to do this,
especially PHI)
- SOUNDBIAS 64/128/256khz modes should output at that resolution
(really, we need to simulate PWM properly, no idea on how to do this)
- object mosaic top-left coordinates are wrong (minor, fixing will
actually make the effect look worse)
- need to emulate PPU greenswap and color palette distortion (no idea on
how do this)
- need GBA save type database (I would also LIKE to blacklist
/ patch-out trainers, but that's a discussion for another day.)
- some ARM ops advance the prefetch buffer, so you can read PC+12 in
some cases
2012-04-16 12:19:39 +00:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|