mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-22 22:22:42 +01:00
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.
73 lines
1.5 KiB
C++
73 lines
1.5 KiB
C++
#include "video.hpp"
|
|
|
|
struct PPU : Thread, public PPUcounter {
|
|
PPU();
|
|
~PPU();
|
|
|
|
alwaysinline auto step(uint clocks) -> void;
|
|
alwaysinline auto synchronizeCPU() -> void;
|
|
|
|
auto latch_counters() -> void;
|
|
auto interlace() const -> bool;
|
|
auto overscan() const -> bool;
|
|
|
|
auto main() -> void;
|
|
auto enable() -> void;
|
|
auto power() -> void;
|
|
auto reset() -> void;
|
|
|
|
auto serialize(serializer&) -> void;
|
|
|
|
uint8 vram[64 * 1024];
|
|
uint8 oam[544];
|
|
uint8 cgram[512];
|
|
|
|
privileged:
|
|
uint ppu1_version = 1; //allowed: 1
|
|
uint ppu2_version = 3; //allowed: 1, 2, 3
|
|
|
|
uint32* output = nullptr;
|
|
|
|
struct {
|
|
bool interlace;
|
|
bool overscan;
|
|
} display;
|
|
|
|
#include "background/background.hpp"
|
|
#include "mmio/mmio.hpp"
|
|
#include "screen/screen.hpp"
|
|
#include "sprite/sprite.hpp"
|
|
#include "window/window.hpp"
|
|
|
|
Background bg1;
|
|
Background bg2;
|
|
Background bg3;
|
|
Background bg4;
|
|
Sprite sprite;
|
|
Window window;
|
|
Screen screen;
|
|
|
|
static auto Enter() -> void;
|
|
alwaysinline auto add_clocks(uint) -> void;
|
|
|
|
auto scanline() -> void;
|
|
auto frame() -> void;
|
|
|
|
friend class PPU::Background;
|
|
friend class PPU::Sprite;
|
|
friend class PPU::Window;
|
|
friend class PPU::Screen;
|
|
friend class Video;
|
|
|
|
struct Debugger {
|
|
hook<auto (uint16, uint8) -> void> vram_read;
|
|
hook<auto (uint16, uint8) -> void> oam_read;
|
|
hook<auto (uint16, uint8) -> void> cgram_read;
|
|
hook<auto (uint16, uint8) -> void> vram_write;
|
|
hook<auto (uint16, uint8) -> void> oam_write;
|
|
hook<auto (uint16, uint8) -> void> cgram_write;
|
|
} debugger;
|
|
};
|
|
|
|
extern PPU ppu;
|