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 SuperFX : Processor::GSU, Cothread {
|
2012-07-09 11:40:23 +00:00
|
|
|
MappedRAM rom;
|
|
|
|
MappedRAM ram;
|
|
|
|
|
2015-06-27 02:38:47 +00:00
|
|
|
//superfx.cpp
|
|
|
|
static auto Enter() -> void;
|
2016-02-09 11:51:12 +00:00
|
|
|
auto main() -> void;
|
2015-06-27 02:38:47 +00:00
|
|
|
auto init() -> void;
|
|
|
|
auto load() -> void;
|
|
|
|
auto unload() -> void;
|
|
|
|
auto power() -> void;
|
|
|
|
auto reset() -> void;
|
|
|
|
|
2016-06-05 05:03:21 +00:00
|
|
|
//bus.cpp
|
|
|
|
struct CPUROM : Memory {
|
|
|
|
auto size() const -> uint;
|
|
|
|
auto read(uint24, uint8) -> uint8;
|
|
|
|
auto write(uint24, uint8) -> void;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CPURAM : Memory {
|
|
|
|
auto size() const -> uint;
|
|
|
|
auto read(uint24, uint8) -> uint8;
|
|
|
|
auto write(uint24, uint8) -> void;
|
|
|
|
};
|
|
|
|
|
|
|
|
//core.cpp
|
2016-06-05 22:10:01 +00:00
|
|
|
auto stop() -> void override;
|
|
|
|
auto color(uint8 source) -> uint8 override;
|
|
|
|
auto plot(uint8 x, uint8 y) -> void override;
|
|
|
|
auto rpix(uint8 x, uint8 y) -> uint8 override;
|
|
|
|
|
|
|
|
auto flushPixelCache(PixelCache& cache) -> void;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
|
|
|
//memory.cpp
|
2016-06-05 22:10:01 +00:00
|
|
|
auto read(uint24 addr, uint8 data = 0x00) -> uint8 override;
|
|
|
|
auto write(uint24 addr, uint8 data) -> void override;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto readOpcode(uint16 addr) -> uint8;
|
2016-06-05 05:03:21 +00:00
|
|
|
alwaysinline auto peekpipe() -> uint8;
|
2016-06-05 22:10:01 +00:00
|
|
|
alwaysinline auto pipe() -> uint8 override;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto flushCache() -> void override;
|
|
|
|
auto readCache(uint16 addr) -> uint8;
|
|
|
|
auto writeCache(uint16 addr, uint8 data) -> void;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
Update to v099r13 release.
byuu says:
Changelog:
- GB core code cleanup completed
- GBA core code cleanup completed
- some more cleanup on missed processor/arm functions/variables
- fixed FC loading icarus bug
- "Load ROM File" icarus functionality restored
- minor code unification efforts all around (not perfect yet)
- MMIO->IO
- mmio.cpp->io.cpp
- read,write->readIO,writeIO
It's been a very long work in progress ... starting all the way back with
v094r09, but the major part of the higan code cleanup is now completed! Of
course, it's very important to note that this is only for the basic style:
- under_score functions and variables are now camelCase
- return-type function-name() are now auto function-name() -> return-type
- Natural<T>/Integer<T> replace (u)intT_n types where possible
- signed/unsigned are now int/uint
- most of the x==true,x==false tests changed to x,!x
A lot of spot improvements to consistency, simplicity and quality have
gone in along the way, of course. But we'll probably never fully finishing
beautifying every last line of code in the entire codebase. Still,
this is a really great start. Going forward, WIP diffs should start
being smaller and of higher quality once again.
I know the joke is, "until my coding style changes again", but ... this
was way too stressful, way too time consuming, and way too risky. I'm
too old and tired now for extreme upheavel like this again. The only
major change I'm slowly mulling over would be renaming the using
Natural<T>/Integer<T> = (u)intT; shorthand to something that isn't as
easily confused with the (u)int_t types ... but we'll see. I'll definitely
continue to change small things all the time, but for the larger picture,
I need to just accept the style I have and live with it.
2016-06-29 11:10:28 +00:00
|
|
|
//io.cpp
|
2016-06-05 05:03:21 +00:00
|
|
|
auto readIO(uint24 addr, uint8 data) -> uint8;
|
|
|
|
auto writeIO(uint24 addr, uint8 data) -> void;
|
|
|
|
|
|
|
|
//timing.cpp
|
2016-06-05 22:10:01 +00:00
|
|
|
auto step(uint clocks) -> void override;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto syncROMBuffer() -> void override;
|
|
|
|
auto readROMBuffer() -> uint8 override;
|
|
|
|
auto updateROMBuffer() -> void;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
2016-06-05 22:10:01 +00:00
|
|
|
auto syncRAMBuffer() -> void override;
|
|
|
|
auto readRAMBuffer(uint16 addr) -> uint8 override;
|
|
|
|
auto writeRAMBuffer(uint16 addr, uint8 data) -> void override;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
2015-06-27 02:38:47 +00:00
|
|
|
//serialization.cpp
|
|
|
|
auto serialize(serializer&) -> void;
|
2016-06-05 05:03:21 +00:00
|
|
|
|
|
|
|
CPUROM cpurom;
|
|
|
|
CPURAM cpuram;
|
|
|
|
|
|
|
|
private:
|
2016-06-05 22:10:01 +00:00
|
|
|
uint romMask;
|
|
|
|
uint ramMask;
|
2010-08-09 13:28:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
extern SuperFX superfx;
|