Path: blob/master/libsnes/bsnes/snes/alt/ppu-performance/ppu.hpp
2 views
class PPU : public Processor, public PPUcounter {1public:2uint8 *vram; //[64 * 1024];3uint8 *oam; //[544];4uint8 *cgram; //[512];56enum : bool { Threaded = true };7alwaysinline void step(unsigned clocks);8alwaysinline void synchronize_cpu();910void latch_counters();11bool interlace() const;12bool overscan() const;13bool hires() const;1415void enter();16void enable();17void power();18void reset();19void scanline();20void frame();2122void layer_enable(unsigned layer, unsigned priority, bool enable);23void set_frameskip(unsigned frameskip);2425void serialize(serializer&);26PPU();27~PPU();28void initialize();2930private:31uint32 *surface;32uint32 *output;3334#include "mmio/mmio.hpp"35#include "window/window.hpp"36#include "cache/cache.hpp"37#include "background/background.hpp"38#include "sprite/sprite.hpp"39#include "screen/screen.hpp"4041Cache cache;42Background bg1;43Background bg2;44Background bg3;45Background bg4;46Sprite sprite;47Screen screen;4849struct Display {50bool interlace;51bool overscan;52unsigned width;53unsigned height;54unsigned frameskip;55unsigned framecounter;56} display;5758static void Enter();59void add_clocks(unsigned clocks);60void render_scanline();6162friend class PPU::Cache;63friend class PPU::Background;64friend class PPU::Sprite;65friend class PPU::Screen;66friend class Video;67};6869extern PPU ppu;707172