1#ifndef YAZE_APP_EMU_PPU_H
2#define YAZE_APP_EMU_PPU_H
18using namespace PpuRegisters;
19using namespace memory;
26 virtual void Write(uint16_t address, uint8_t data) = 0;
27 virtual uint8_t
Read(uint16_t address)
const = 0;
287 int GetPixel(
int x,
int y,
bool sub,
int* r,
int* g,
int* b);
317 void HandleOPT(
int layer,
int* lx,
int* ly);
321 uint8_t
Read(uint8_t adr,
bool latch);
322 void Write(uint8_t adr, uint8_t val);
A class to hold a shared pointer to a Rom object.
virtual void UpdateClock(double delta)=0
virtual auto v_pos() const -> uint16_t=0
virtual auto h_pos() const -> uint16_t=0
virtual void Write(uint16_t address, uint8_t data)=0
virtual uint8_t Read(uint16_t address) const =0
virtual ~PpuInterface()=default
std::array< BackgroundLayer, 4 > bg_layers_
std::array< BGHOFS, 4 > bghofs_
Ppu(memory::Memory &memory, Clock &clock)
int GetPixelForBgLayer(int x, int y, int layer, bool priority)
const int cyclesPerScanline
WindowLayer windowLayer[6]
uint8_t pixelBuffer[512 *4 *239 *2]
std::vector< uint8_t > tile_data_
bool enable_forced_blanking_
uint8_t prevent_math_mode_
void HandlePixel(int x, int y)
std::vector< uint8_t > frame_buffer_
void EvaluateSprites(int line)
bool math_enabled_array_[6]
uint8_t mosaic_startline_
uint8_t Read(uint8_t adr, bool latch)
uint16_t tilemap_base_address_
uint16_t screen_brightness_
std::array< uint8_t, 256 > obj_priority_buffer_
void Write(uint8_t adr, uint8_t val)
void HandleOPT(int layer, int *lx, int *ly)
bool vram_increment_on_high_
void CalculateMode7Starts(int y)
std::vector< SpriteAttributes > sprites_
uint8_t pixelOutputFormat
void UpdateClock(double delta_time)
int GetPixel(int x, int y, bool sub, int *r, int *g, int *b)
bool oam_in_high_written_
uint16_t vram_read_buffer_
bool GetWindowState(int layer, int x)
const int visibleScanlines
uint16_t vram_base_address_
void PutPixels(uint8_t *pixel_data)
int GetPixelForMode7(int x, int layer, bool priority)
std::array< uint8_t, 256 > obj_pixel_buffer_
std::array< BGNBA, 4 > bgnba_
std::array< BGSC, 4 > bgsc_
uint16_t GetOffsetValue(int col, int row)
std::array< BGVOFS, 4 > bgvofs_
const std::vector< uint8_t > & GetFrameBuffer() const
struct yaze::app::emu::video::Layer Layer
struct yaze::app::emu::video::BgLayer BgLayer
struct yaze::app::emu::video::WindowLayer WindowLayer
uint16_t tile_data_base_address
std::vector< uint8_t > tile_data
uint16_t tilemap_base_address
std::vector< Tile > tilemap
uint16_t horizontalIrqTrigger
uint8_t softwareLatchHvCounter
uint16_t horizontalScanLocation
uint16_t verticalIrqTrigger
uint16_t verticalScanLocation
uint8_t statusRegisterIrq
uint8_t dmaDestinationAddress[8]
uint16_t bytesToTransfer[8]
uint32_t dmaSourceAddress[8]
uint16_t hdmaCountPointer[8]
uint8_t enableHDmaTransfer
uint8_t dmacontrol_register_ister[8]
uint8_t oldStyleJoypadRegisters[2]
uint8_t oam_priority_rotation
uint8_t general_screen_mode
std::vector< TilemapEntry > entries
uint8_t color_windows_clip_in_out
uint8_t color_windows_enable
uint8_t sprites_clip_in_out