2016-06-05 05:03:21 +00:00
|
|
|
auto SuperFX::step(uint clocks) -> void {
|
2010-08-09 13:28:56 +00:00
|
|
|
if(regs.romcl) {
|
|
|
|
regs.romcl -= min(clocks, regs.romcl);
|
|
|
|
if(regs.romcl == 0) {
|
|
|
|
regs.sfr.r = 0;
|
2016-06-05 22:10:01 +00:00
|
|
|
regs.romdr = read((regs.rombr << 16) + regs.r[14]);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if(regs.ramcl) {
|
|
|
|
regs.ramcl -= min(clocks, regs.ramcl);
|
|
|
|
if(regs.ramcl == 0) {
|
2016-06-05 22:10:01 +00:00
|
|
|
write(0x700000 + (regs.rambr << 16) + regs.ramar, regs.ramdr);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
Update to v098r01 release.
byuu says:
Changelog:
- SFC: balanced profile removed
- SFC: performance profile removed
- SFC: code for handling non-threaded CPU, SMP, DSP, PPU removed
- SFC: Coprocessor, Controller (and expansion port) shared Thread code
merged to SFC::Cothread
- Cothread here just means "Thread with CPU affinity" (couldn't think
of a better name, sorry)
- SFC: CPU now has vector<Thread*> coprocessors, peripherals;
- this is the beginning of work to allow expansion port devices to be
dynamically changed at run-time
- ruby: all audio drivers default to 48000hz instead of 22050hz now if
no frequency is assigned
- note: the WASAPI driver can default to whatever the native frequency
is; doesn't have to be 48000hz
- tomoko: removed the ability to change the frequency from the UI (but
it will display the frequency used)
- tomoko: removed the timing settings panel
- the goal is to work toward smooth video via adaptive sync
- the model is broken by not being in control of the audio frequency
anyway
- it's further broken by PAL running at 50hz and WSC running at 75hz
- it was always broken anyway by SNES interlace timing varying from
progressive timing
- higan: audio/ stub created (for now, it's just nall/dsp/ moved here
and included as a header)
- higan: video/ stub created
- higan/GNUmakefile: now includes build rules for essential components
(libco, emulator, audio, video)
The audio changes are in preparation to merge wareya's awesome WASAPI
work without the need for the nall/dsp resampler.
2016-04-09 03:40:12 +00:00
|
|
|
Cothread::step(clocks);
|
2015-12-14 09:41:06 +00:00
|
|
|
synchronizeCPU();
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto SuperFX::syncROMBuffer() -> void {
|
2012-04-29 06:16:44 +00:00
|
|
|
if(regs.romcl) step(regs.romcl);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto SuperFX::readROMBuffer() -> uint8 {
|
|
|
|
syncROMBuffer();
|
|
|
|
return regs.romdr;
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto SuperFX::updateROMBuffer() -> void {
|
|
|
|
regs.sfr.r = 1;
|
|
|
|
regs.romcl = regs.clsr ? 5 : 6;
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto SuperFX::syncRAMBuffer() -> void {
|
2012-04-29 06:16:44 +00:00
|
|
|
if(regs.ramcl) step(regs.ramcl);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto SuperFX::readRAMBuffer(uint16 addr) -> uint8 {
|
|
|
|
syncRAMBuffer();
|
|
|
|
return read(0x700000 + (regs.rambr << 16) + addr);
|
2010-08-09 13:28:56 +00:00
|
|
|
}
|
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto SuperFX::writeRAMBuffer(uint16 addr, uint8 data) -> void {
|
|
|
|
syncRAMBuffer();
|
2015-06-28 08:44:56 +00:00
|
|
|
regs.ramcl = regs.clsr ? 5 : 6;
|
2010-08-09 13:28:56 +00:00
|
|
|
regs.ramar = addr;
|
|
|
|
regs.ramdr = data;
|
|
|
|
}
|