mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-23 14:42:33 +01:00
byuu says: Changelog: - restructured the project and removed a whole bunch of old/dead directives from higan/GNUmakefile - huge amounts of work on hiro/cocoa (compiles but ~70% of the functionality is commented out) - fixed a masking error in my ARM CPU disassembler [Lioncash] - SFC: decided to change board cic=(411,413) back to board region=(ntsc,pal) ... the former was too obtuse If you rename Boolean (it's a problem with an include from ruby, not from hiro) and disable all the ruby drivers, you can compile an OS X binary, but obviously it's not going to do anything. It's a boring WIP, I just wanted to push out the project structure change now at the start of this WIP cycle.
75 lines
1.6 KiB
C++
75 lines
1.6 KiB
C++
struct PPU : Thread, public PPUcounter {
|
|
enum : bool { Threaded = true };
|
|
|
|
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 hires() const -> bool;
|
|
|
|
auto enter() -> void;
|
|
auto enable() -> void;
|
|
auto power() -> void;
|
|
auto reset() -> void;
|
|
|
|
auto serialize(serializer&) -> void;
|
|
|
|
uint8 vram[64 * 1024] = {0};
|
|
uint8 oam[544] = {0};
|
|
uint8 cgram[512] = {0};
|
|
|
|
privileged:
|
|
uint ppu1_version = 1; //allowed: 1
|
|
uint ppu2_version = 3; //allowed: 1, 2, 3
|
|
|
|
uint32* surface = nullptr;
|
|
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<void (uint16, uint8)> vram_read;
|
|
hook<void (uint16, uint8)> oam_read;
|
|
hook<void (uint16, uint8)> cgram_read;
|
|
hook<void (uint16, uint8)> vram_write;
|
|
hook<void (uint16, uint8)> oam_write;
|
|
hook<void (uint16, uint8)> cgram_write;
|
|
} debugger;
|
|
};
|
|
|
|
extern PPU ppu;
|