Updated to 20100813 release.
byuu says:
Since we're now talking about three splits, that's getting a bit out of
hand.
This WIP combines everything back into one project again. Added the
src/fast folder that has all the speed-oriented cores.
A slight slowdown to csnes from what it was before, I'm using blargg's
accurate DSP. I just don't like the idea of releasing a less accurate
DSP core than Snes9X v1.52 has. Plus the fast DSP core doesn't serialize
yet.
I moved back to snes_spc 0.9.0 because I care more about Tales and Star
Ocean than I do about Earthworm Jim 2. So if you try EWJ2 on csnes,
expect it to sound like it does on Snes9X. In other words, don't wear
headphones if you value your hearing.
The middle-of-the-road bsnes core uses blargg's accurate DSP, because
it's about 3% faster than mine which removes all of blargg's
optimizations. There is absolutely no accuracy loss here. bsnes v067.20
that is included should be equal to v067 official.
Performance:
Code:
asnes = 58fps
bsnes = 172fps +2.97x
csnes = 274fps +1.59x +4.72x
The binaries are not profiled, so that's an additional 15% slower from
the previous builds.
Save states only work on asnes, as I don't know how to serialize
blargg's cores yet. The copy_func thing is very confusing to me for some
reason. The debugger won't work anywhere.
Outside of that, please go ahead and bug test. Once I get the debugger
and save states working, I'll build some profiled v1.0 releases for all
three, and we can test that for a bit and then release.
2010-10-20 11:20:39 +00:00
|
|
|
#ifdef DSP_CPP
|
|
|
|
|
|
|
|
void DSP::serialize(serializer &s) {
|
|
|
|
Processor::serialize(s);
|
Updated to v067r25 release.
byuu says:
Removed snes_spc, and the fast/smp + fast/dsp wrappers around it.
Cloned dsp to fast/dsp, and re-added the state machine, affects
Compatibility and Performance cores.
Added debugger support to fast/cpu, with full properties list and Qt
debugger functionality.
Rewrote all debugger property functions to return data directly:
- this avoids some annoying conflicts where ChipDebugger::foo()
overshadows Chip::foo()
- this removes the need for an extra 20-200 functions per debugger
core
- this makes the overall code size a good bit smaller
- this currently makes PPU::oam_basesize() inaccessible, so the OAM
viewer will show wrong sprite sizes
Used an evil trick to simplify MMIO read/write address decoding:
- MMIO *mmio[0x8000], where only 0x2000-5fff are used, allows direct
indexing without -0x2000 adjust
So end result: both save states and debugger support work on all three
cores now. Dual Orb II sound is fixed. The speed hit was worse than
I thought, -7% for compatibility, and -10% for performance. At this
point, the compatibility core is the exact same code and speed as v067
official, and the performance core is now only ~36-40% faster than the
compatibility core. Sigh, so much for my dream of using this on my
netbook. At 53fps average now, compared to 39fps before. Profiling will
only get that to ~58fps, and that's way too low for the more intensive
scenes (Zelda 3 rain, CT black omen, etc.)
It would probably be a good idea to find out why my DSP is so much
slower than blargg's, given that it's based upon the same code. The
simple ring buffer stuff can't possibly slow things down that much.
More precisely, it would probably be best to leave blargg's DSP in the
performance core since it's a pretty minor issue, but then I'd have to
have three DSPs: accuracy=threaded, compatibility=state-machine,
performance=blargg. Too much hassle.
Only code in the core emulator now that wasn't at the very least
rewritten for bsnes would be the DSP-3 and DSP-4 modules, which are
really, really lazily done #define hacks around the original C code.
2010-08-19 06:54:15 +00:00
|
|
|
s.integer(phase);
|
|
|
|
|
|
|
|
s.array(state.regs, 128);
|
|
|
|
state.echo_hist[0].serialize(s);
|
|
|
|
state.echo_hist[1].serialize(s);
|
|
|
|
s.integer(state.echo_hist_pos);
|
|
|
|
|
|
|
|
s.integer(state.every_other_sample);
|
|
|
|
s.integer(state.kon);
|
|
|
|
s.integer(state.noise);
|
|
|
|
s.integer(state.counter);
|
|
|
|
s.integer(state.echo_offset);
|
|
|
|
s.integer(state.echo_length);
|
|
|
|
|
|
|
|
s.integer(state.new_kon);
|
|
|
|
s.integer(state.endx_buf);
|
|
|
|
s.integer(state.envx_buf);
|
|
|
|
s.integer(state.outx_buf);
|
|
|
|
|
|
|
|
s.integer(state.t_pmon);
|
|
|
|
s.integer(state.t_non);
|
|
|
|
s.integer(state.t_eon);
|
|
|
|
s.integer(state.t_dir);
|
|
|
|
s.integer(state.t_koff);
|
|
|
|
|
|
|
|
s.integer(state.t_brr_next_addr);
|
|
|
|
s.integer(state.t_adsr0);
|
|
|
|
s.integer(state.t_brr_header);
|
|
|
|
s.integer(state.t_brr_byte);
|
|
|
|
s.integer(state.t_srcn);
|
|
|
|
s.integer(state.t_esa);
|
|
|
|
s.integer(state.t_echo_disabled);
|
|
|
|
|
|
|
|
s.integer(state.t_dir_addr);
|
|
|
|
s.integer(state.t_pitch);
|
|
|
|
s.integer(state.t_output);
|
|
|
|
s.integer(state.t_looped);
|
|
|
|
s.integer(state.t_echo_ptr);
|
|
|
|
|
|
|
|
s.integer(state.t_main_out[0]);
|
|
|
|
s.integer(state.t_main_out[1]);
|
|
|
|
s.integer(state.t_echo_out[0]);
|
|
|
|
s.integer(state.t_echo_out[1]);
|
|
|
|
s.integer(state.t_echo_in [0]);
|
|
|
|
s.integer(state.t_echo_in [1]);
|
|
|
|
|
|
|
|
for(unsigned n = 0; n < 8; n++) {
|
|
|
|
voice[n].buffer.serialize(s);
|
|
|
|
s.integer(voice[n].buf_pos);
|
|
|
|
s.integer(voice[n].interp_pos);
|
|
|
|
s.integer(voice[n].brr_addr);
|
|
|
|
s.integer(voice[n].brr_offset);
|
|
|
|
s.integer(voice[n].vbit);
|
|
|
|
s.integer(voice[n].vidx);
|
|
|
|
s.integer(voice[n].kon_delay);
|
|
|
|
s.integer(voice[n].env_mode);
|
|
|
|
s.integer(voice[n].env);
|
|
|
|
s.integer(voice[n].t_envx_out);
|
|
|
|
s.integer(voice[n].hidden_env);
|
Updated to v067r21 release.
byuu says:
This moves toward a profile-selection mode. Right now, it is incomplete.
There are three binaries, one for each profile. The GUI selection
doesn't actually do anything yet. There will be a launcher in a future
release that loads each profile's respective binary.
I reverted away from blargg's SMP library for the time being, in favor
of my own. This will fix most of the csnes/bsnes-performance bugs. This
causes a 10% speed hit on 64-bit platforms, and a 15% speed hit on
32-bit platforms. I hope to be able to regain that speed in the future,
I may also experiment with creating my own fast-SMP core which drops bus
hold delays and TEST register support (never used by anything, ever.)
Save states now work in all three cores, but they are not
cross-compatible. The profile name is stored in the description field of
the save states, and it won't load a state if the profile name doesn't
match.
The debugger only works on the research target for now. Give it time and
it will return for the other targets.
Other than that, let's please resume testing on all three once again.
See how far we get this time :)
I can confirm the following games have issues on the performance
profile:
- Armored Police Metal Jacket (minor logo flickering, not a big deal)
- Chou Aniki (won't start, so obviously unplayable)
- Robocop vs The Terminator (major in-game flickering, unplayable)
Anyone still have that gigantic bsnes thread archive from the ZSNES
forum? Maybe I posted about how to fix those two broken games in there,
heh.
I really want to release this as v1.0, but my better judgment says we
need to give it another week. Damn.
2010-10-20 11:22:44 +00:00
|
|
|
}
|
Updated to 20100813 release.
byuu says:
Since we're now talking about three splits, that's getting a bit out of
hand.
This WIP combines everything back into one project again. Added the
src/fast folder that has all the speed-oriented cores.
A slight slowdown to csnes from what it was before, I'm using blargg's
accurate DSP. I just don't like the idea of releasing a less accurate
DSP core than Snes9X v1.52 has. Plus the fast DSP core doesn't serialize
yet.
I moved back to snes_spc 0.9.0 because I care more about Tales and Star
Ocean than I do about Earthworm Jim 2. So if you try EWJ2 on csnes,
expect it to sound like it does on Snes9X. In other words, don't wear
headphones if you value your hearing.
The middle-of-the-road bsnes core uses blargg's accurate DSP, because
it's about 3% faster than mine which removes all of blargg's
optimizations. There is absolutely no accuracy loss here. bsnes v067.20
that is included should be equal to v067 official.
Performance:
Code:
asnes = 58fps
bsnes = 172fps +2.97x
csnes = 274fps +1.59x +4.72x
The binaries are not profiled, so that's an additional 15% slower from
the previous builds.
Save states only work on asnes, as I don't know how to serialize
blargg's cores yet. The copy_func thing is very confusing to me for some
reason. The debugger won't work anywhere.
Outside of that, please go ahead and bug test. Once I get the debugger
and save states working, I'll build some profiled v1.0 releases for all
three, and we can test that for a bit and then release.
2010-10-20 11:20:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|