bsnes/higan/sfc/expansion/superdisc/superdisc.hpp

44 lines
827 B
C++
Raw Normal View History

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
struct SuperDisc : Cothread, Memory {
static auto Enter() -> void;
auto main() -> void;
auto init() -> void;
auto load() -> void;
auto unload() -> void;
auto power() -> void;
auto reset() -> void;
auto read(uint24 addr, uint8 data) -> uint8;
auto write(uint24 addr, uint8 data) -> void;
//nec.cpp
auto necPollIRQ() -> uint8;
auto necReadData() -> uint8;
auto necWriteCommand(uint4 data) -> void;
//sony.cpp
auto sonyPollIRQ() -> uint8;
auto sonyReadData() -> uint8;
auto sonyWriteCommand(uint8 data) -> void;
auto sonyWriteData(uint8 data) -> void;
private:
struct Registers {
uint8 irqEnable;
} r;
//NEC
struct NEC {
vector<uint4> command;
uint8 data;
} nec;
//Sony
struct Sony {
uint8 command;
uint8 data;
} sony;
};
extern SuperDisc superdisc;