mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 22:52:34 +01:00
byuu says: This will be another massive diff from the previous version. All of higan was updated to use the new foo& bar syntax, and I also updated switch statements to be consistent as well (but not in the disassemblers, was starting to get an RSI just from what I already did.) phoenix/{windows, cocoa, qt} need to be updated to use "string foo" instead of "const string& foo", and after that, the major diffs should be finished. This archive is the first time I'm posting my copy-on-write, size+capacity nall::string class, so any feedback on that is welcome as well.
73 lines
1.4 KiB
C++
Executable File
73 lines
1.4 KiB
C++
Executable File
struct PPU : Thread, public PPUcounter {
|
|
uint8 vram[64 * 1024];
|
|
uint8 oam[544];
|
|
uint8 cgram[512];
|
|
|
|
enum : bool { Threaded = true };
|
|
alwaysinline void step(unsigned clocks);
|
|
alwaysinline void synchronize_cpu();
|
|
|
|
void latch_counters();
|
|
bool interlace() const;
|
|
bool overscan() const;
|
|
bool hires() const;
|
|
|
|
void enter();
|
|
void enable();
|
|
void power();
|
|
void reset();
|
|
|
|
void serialize(serializer&);
|
|
PPU();
|
|
~PPU();
|
|
|
|
privileged:
|
|
uint32* surface;
|
|
uint32* output;
|
|
|
|
uint8 ppu1_version;
|
|
uint8 ppu2_version;
|
|
|
|
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 void Enter();
|
|
void add_clocks(unsigned);
|
|
|
|
void scanline();
|
|
void frame();
|
|
|
|
friend class PPU::Background;
|
|
friend class PPU::Sprite;
|
|
friend class PPU::Window;
|
|
friend class PPU::Screen;
|
|
friend class Video;
|
|
|
|
struct Debugger {
|
|
hook<void (uint16)> vram_read;
|
|
hook<void (uint16)> oam_read;
|
|
hook<void (uint16)> cgram_read;
|
|
hook<void (uint16, uint8)> vram_write;
|
|
hook<void (uint16, uint8)> oam_write;
|
|
hook<void (uint16, uint8)> cgram_write;
|
|
} debugger;
|
|
};
|
|
|
|
extern PPU ppu;
|