diff options
Diffstat (limited to 'src/mame/video/ms32_sprite.cpp')
-rw-r--r-- | src/mame/video/ms32_sprite.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mame/video/ms32_sprite.cpp b/src/mame/video/ms32_sprite.cpp index 88526a0780e..12fffc0139b 100644 --- a/src/mame/video/ms32_sprite.cpp +++ b/src/mame/video/ms32_sprite.cpp @@ -4,24 +4,25 @@ Jaleco Megasystem 32 sprite hardware TODO: - verify hardware configuration + - verify hardware configuration; + - suchie2: on attract gals background display is cut off on the right side; used by: ms32.cpp bnstars.cpp (Dual screen configuration) - tetrisp2.cpp (Slightly different - no zoom, etc) + tetrisp2.cpp (Slightly different - no zoom, stepstag with YUV) Sprite format (16 byte per each sprite): Offset Bits Description fedcba98 76543210 - 00 -xxxxxxx -------- Palette Select (some hardwares with YUV color format) + 00 -xxxxxxx -------- stepstage only: Palette Select for YUV format -------- xxxx---- Priority -------- -----x-- Visible -------- ------x- Flip Y -------- -------x Flip X 02 xxxxxxxx -------- Source Y offset (1 pixel each) -------- xxxxxxxx Source X offset (1 pixel each) - 04 xxxx---- -------- Palette Select (most of hardwares) + 04 xxxx---- -------- Palette Select (normal) ----xxxx xxxxxxxx Source Texture Select (each texture is 256 x 256 pixels) 06 xxxxxxxx -------- Source Width - 1 (1 pixel each) -------- xxxxxxxx Source Height - 1 (1 pixel each) @@ -44,6 +45,8 @@ ms32_sprite_device::ms32_sprite_device(const machine_config &mconfig, const char , device_gfx_interface(mconfig, *this, nullptr) , m_color_base(0) , m_color_entries(0x10) + , m_has_zoom(true) + , m_has_yuv(false) { } @@ -101,7 +104,7 @@ void ms32_sprite_device::device_start() gfx(0)->set_colors(m_color_entries); } -void ms32_sprite_device::extract_parameters(bool has_zoom, bool is_yuv, const u16 *ram, bool &disable, u8 &pri, bool &flipx, bool &flipy, u32 &code, u32 &color, u8 &tx, u8 &ty, u16 &srcwidth, u16 &srcheight, s32 &sx, s32 &sy, u16 &incx, u16 &incy) +void ms32_sprite_device::extract_parameters(const u16 *ram, bool &disable, u8 &pri, bool &flipx, bool &flipy, u32 &code, u32 &color, u8 &tx, u8 &ty, u16 &srcwidth, u16 &srcheight, s32 &sx, s32 &sy, u16 &incx, u16 &incy) { const u16 attr = ram[0]; pri = ( attr & 0x00f0); @@ -116,7 +119,7 @@ void ms32_sprite_device::extract_parameters(bool has_zoom, bool is_yuv, const u1 code = (color & 0x0fff); // encoded to first word when YUV sprites are used - if (is_yuv) + if (m_has_yuv) color = (attr & 0x7f00) >> 8; else color = (color >> 12) & 0xf; @@ -128,7 +131,7 @@ void ms32_sprite_device::extract_parameters(bool has_zoom, bool is_yuv, const u1 sx = (ram[5] & 0x3ff) - (ram[5] & 0x400); sy = (ram[4] & 0x1ff) - (ram[4] & 0x200); - if (has_zoom) + if (m_has_zoom) { incx = (ram[6] & 0xffff); incy = (ram[7] & 0xffff); |