mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-02-24 07:02:27 +01:00
byuu says: Changelog: - added Cocoa target: higan can now be compiled for OS X Lion [Cydrak, byuu] - SNES/accuracy profile hires color blending improvements - fixes Marvelous text [AWJ] - fixed a slight bug in SNES/SA-1 VBR support caused by a typo - added support for multi-pass shaders that can load external textures (requires OpenGL 3.2+) - added game library path (used by ananke->Import Game) to Settings->Advanced - system profiles, shaders and cheats database can be stored in "all users" shared folders now (eg /usr/share on Linux) - all configuration files are in BML format now, instead of XML (much easier to read and edit this way) - main window supports drag-and-drop of game folders (but not game files / ZIP archives) - audio buffer clears when entering a modal loop on Windows (prevents audio repetition with DirectSound driver) - a substantial amount of code clean-up (probably the biggest refactoring to date) One highly desired target for this release was to default to the optimal drivers instead of the safest drivers, but because AMD drivers don't seem to like my OpenGL 3.2 driver, I've decided to postpone that. AMD has too big a market share. Hopefully with v093 officially released, we can get some public input on what AMD doesn't like.
98 lines
1.8 KiB
C++
98 lines
1.8 KiB
C++
struct PPU : Thread, MMIO {
|
|
struct Status {
|
|
unsigned lx;
|
|
unsigned wyc;
|
|
|
|
//$ff40 LCDC
|
|
bool display_enable;
|
|
bool window_tilemap_select;
|
|
bool window_display_enable;
|
|
bool bg_tiledata_select;
|
|
bool bg_tilemap_select;
|
|
bool ob_size;
|
|
bool ob_enable;
|
|
bool bg_enable;
|
|
|
|
//$ff41 STAT
|
|
bool interrupt_lyc;
|
|
bool interrupt_oam;
|
|
bool interrupt_vblank;
|
|
bool interrupt_hblank;
|
|
|
|
//$ff42 SCY
|
|
uint8 scy;
|
|
|
|
//$ff43 SCX
|
|
uint8 scx;
|
|
|
|
//$ff44 LY
|
|
uint8 ly;
|
|
|
|
//$ff45 LYC
|
|
uint8 lyc;
|
|
|
|
//$ff4a WY
|
|
uint8 wy;
|
|
|
|
//$ff4b WX
|
|
uint8 wx;
|
|
|
|
//$ff4f VBK
|
|
bool vram_bank;
|
|
|
|
//$ff68 BGPI
|
|
bool bgpi_increment;
|
|
uint6 bgpi;
|
|
|
|
//$ff6a OBPI
|
|
bool obpi_increment;
|
|
uint8 obpi;
|
|
} status;
|
|
|
|
uint32 screen[160 * 144];
|
|
uint16 line[160];
|
|
struct Origin { enum : unsigned { None, BG, BGP, OB }; };
|
|
uint8 origin[160];
|
|
|
|
uint8 vram[16384]; //GB = 8192, GBC = 16384
|
|
uint8 oam[160];
|
|
uint8 bgp[4];
|
|
uint8 obp[2][4];
|
|
uint8 bgpd[64];
|
|
uint8 obpd[64];
|
|
|
|
static void Main();
|
|
void main();
|
|
void add_clocks(unsigned clocks);
|
|
void scanline();
|
|
void frame();
|
|
|
|
unsigned hflip(unsigned data) const;
|
|
|
|
//mmio.cpp
|
|
unsigned vram_addr(uint16 addr) const;
|
|
uint8 mmio_read(uint16 addr);
|
|
void mmio_write(uint16 addr, uint8 data);
|
|
|
|
//dmg.cpp
|
|
void dmg_render();
|
|
uint16 dmg_read_tile(bool select, unsigned x, unsigned y);
|
|
void dmg_render_bg();
|
|
void dmg_render_window();
|
|
void dmg_render_ob();
|
|
|
|
//cgb.cpp
|
|
void cgb_render();
|
|
void cgb_read_tile(bool select, unsigned x, unsigned y, unsigned& tile, unsigned& attr, unsigned& data);
|
|
void cgb_render_bg();
|
|
void cgb_render_window();
|
|
void cgb_render_ob();
|
|
|
|
void power();
|
|
|
|
void serialize(serializer&);
|
|
PPU();
|
|
};
|
|
|
|
extern PPU ppu;
|