mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-04-02 10:42:14 -04:00
byuu says: Changelog: - Game Boy (Color): STAT OAM+HBlank IRQs only trigger during LY=0-143 with display enabled - fixes backgrounds and text in Wacky Races - Game Boy (Color): fixed underflow in window clamping - fixes Wacky Races, Prehistorik Man, Alleyway, etc - Game Boy (Color): LCD OAM DMA was running too slow - fixes Shin Megami Tensei - Devichil - Kuro no Sho - Game Boy Advance: removed built-in frame blending; display emulation shaders will handle this going forward - Game Boy Advance: added Game Boy Player emulation - currently the screen is tinted red during rumble, no actual gamepad rumble support yet - this is going to be slow, as we have to hash the frame to detect the GBP logo, it'll be optional later on - Emulator::Interface::Palette can now output a raw palette (for Display Emulation shaders only) - color channels are not yet split up, it's just the raw packed value
50 lines
1.2 KiB
C++
50 lines
1.2 KiB
C++
struct PPU : Thread, MMIO {
|
|
uint8 vram[96 * 1024];
|
|
uint16 pram[512];
|
|
#include "registers.hpp"
|
|
#include "state.hpp"
|
|
uint32* output;
|
|
|
|
static void Enter();
|
|
void main();
|
|
void step(unsigned clocks);
|
|
|
|
void power();
|
|
void scanline();
|
|
void frame();
|
|
|
|
uint8 read(uint32 addr);
|
|
void write(uint32 addr, uint8 byte);
|
|
|
|
uint32 vram_read(uint32 addr, uint32 size);
|
|
void vram_write(uint32 addr, uint32 size, uint32 word);
|
|
|
|
uint32 pram_read(uint32 addr, uint32 size);
|
|
void pram_write(uint32 addr, uint32 size, uint32 word);
|
|
|
|
uint32 oam_read(uint32 addr, uint32 size);
|
|
void oam_write(uint32 addr, uint32 size, uint32 word);
|
|
|
|
void render_backgrounds();
|
|
void render_background_linear(Registers::Background&);
|
|
void render_background_affine(Registers::Background&);
|
|
void render_background_bitmap(Registers::Background&);
|
|
|
|
void render_objects();
|
|
void render_object(Object&);
|
|
uint8 object_vram_read(unsigned addr) const;
|
|
|
|
void render_mosaic_background(unsigned id);
|
|
void render_mosaic_object();
|
|
|
|
void render_forceblank();
|
|
void render_screen();
|
|
void render_window(unsigned window);
|
|
unsigned blend(unsigned above, unsigned eva, unsigned below, unsigned evb);
|
|
|
|
void serialize(serializer&);
|
|
PPU();
|
|
~PPU();
|
|
};
|
|
|
|
extern PPU ppu;
|