summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices/video/ppu2c0x_sh6578.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/devices/video/ppu2c0x_sh6578.cpp')
-rw-r--r--src/devices/video/ppu2c0x_sh6578.cpp26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/devices/video/ppu2c0x_sh6578.cpp b/src/devices/video/ppu2c0x_sh6578.cpp
index 5cad4d628b5..dc8721c31f8 100644
--- a/src/devices/video/ppu2c0x_sh6578.cpp
+++ b/src/devices/video/ppu2c0x_sh6578.cpp
@@ -23,6 +23,8 @@ ppu_sh6578_device::ppu_sh6578_device(const machine_config& mconfig, device_type
{
m_paletteram_in_ppuspace = false;
m_line_write_increment_large = 32;
+ m_videoram_addr_mask = 0xffff;
+ m_global_refresh_mask = 0xffff;
}
ppu_sh6578_device::ppu_sh6578_device(const machine_config& mconfig, const char* tag, device_t* owner, uint32_t clock) :
@@ -85,6 +87,11 @@ void ppu_sh6578_device::scanline_increment_fine_ycounter()
}
}
+void ppu_sh6578_device::draw_sprite_pixel(int sprite_xpos, int color, int pixel, uint8_t pixel_data, bitmap_rgb32& bitmap)
+{
+ uint8_t palval = m_palette_ram[(pixel_data | color << 2)] & 0x3f;
+ bitmap.pix32(m_scanline, sprite_xpos + pixel) = this->pen(palval);
+}
void ppu_sh6578_device::read_tile_plane_data(int address, int color)
{
@@ -134,7 +141,8 @@ void ppu_sh6578_device::draw_tile(uint8_t* line_priority, int color_byte, int co
}
else
{
- pen = back_pen;
+ uint8_t palval = m_palette_ram[0x0] & 0x3f;
+ pen = this->pen(palval);
}
*dest = pen;
@@ -245,10 +253,24 @@ void ppu_sh6578_device::draw_background(uint8_t* line_priority)
}
}
-void ppu_sh6578_device::draw_sprites(uint8_t* line_priority)
+void ppu_sh6578_device::read_sprite_plane_data(int address)
{
+ m_planebuf[0] = readbyte((address + 0) & 0x3fff);
+ m_planebuf[1] = readbyte((address + 8) & 0x3fff);
+}
+
+int ppu_sh6578_device::apply_sprite_pattern_page(int index1, int size)
+{
+ index1 += (((m_colsel_pntstart >> 2) & 0x3) * 0x1000);
+ return index1;
+}
+
+/*
+void ppu_sh6578_device::draw_sprites(uint8_t* line_priority)
+{
}
+*/
void ppu_sh6578_device::write(offs_t offset, uint8_t data)
{