@@ -37,7 +37,7 @@ wswan_video_device::wswan_video_device(const machine_config &mconfig, const char
37
37
}
38
38
39
39
wswan_color_video_device::wswan_color_video_device (const machine_config &mconfig, const char *tag, device_t *owner, u32 clock)
40
- : wswan_video_device(mconfig, WSWAN_COLOR_VIDEO, tag, owner, clock, wswan_video_device:: VDP_TYPE_WSC)
40
+ : wswan_video_device(mconfig, WSWAN_COLOR_VIDEO, tag, owner, clock, VDP_TYPE_WSC)
41
41
{
42
42
}
43
43
@@ -307,7 +307,7 @@ inline void wswan_video_device::draw_pixel(int x_offset, u8 tile_palette, u8 pix
307
307
308
308
void wswan_video_device::draw_background ()
309
309
{
310
- const u16 map_addr = m_layer_bg_address + (((m_current_line + m_layer_bg_scroll_y) & 0xf8 ) << 2 );
310
+ const u16 map_addr = ( m_layer_bg_address & (m_color_mode ? 0x3fff : 0x1fff )) + (((m_current_line + m_layer_bg_scroll_y) & 0xf8 ) << 2 );
311
311
const u8 start_column = (m_layer_bg_scroll_x >> 3 );
312
312
313
313
for (int column = 0 ; column < 29 ; column++)
@@ -332,7 +332,7 @@ void wswan_video_device::draw_background()
332
332
333
333
void wswan_video_device::draw_foreground_0 ()
334
334
{
335
- const u16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8 ) << 2 );
335
+ const u16 map_addr = ( m_layer_fg_address & (m_color_mode ? 0x3fff : 0x1fff )) + (((m_current_line + m_layer_fg_scroll_y) & 0xf8 ) << 2 );
336
336
const u8 start_column = (m_layer_fg_scroll_x >> 3 );
337
337
338
338
for (int column = 0 ; column < 29 ; column++)
@@ -357,7 +357,7 @@ void wswan_video_device::draw_foreground_0()
357
357
358
358
void wswan_video_device::draw_foreground_2 ()
359
359
{
360
- const u16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8 ) << 2 );
360
+ const u16 map_addr = ( m_layer_fg_address & (m_color_mode ? 0x3fff : 0x1fff )) + (((m_current_line + m_layer_fg_scroll_y) & 0xf8 ) << 2 );
361
361
const u8 start_column = (m_layer_fg_scroll_x >> 3 );
362
362
363
363
for (int column = 0 ; column < 29 ; column++)
@@ -382,7 +382,7 @@ void wswan_video_device::draw_foreground_2()
382
382
383
383
void wswan_video_device::draw_foreground_3 ()
384
384
{
385
- const u16 map_addr = m_layer_fg_address + (((m_current_line + m_layer_fg_scroll_y) & 0xf8 ) << 2 );
385
+ const u16 map_addr = ( m_layer_fg_address & (m_color_mode ? 0x3fff : 0x1fff )) + (((m_current_line + m_layer_fg_scroll_y) & 0xf8 ) << 2 );
386
386
const u8 start_column = (m_layer_fg_scroll_x >> 3 );
387
387
388
388
for (int column = 0 ; column < 29 ; column++)
@@ -622,8 +622,8 @@ void wswan_video_device::reg_w(offs_t offset, u16 data, u16 mem_mask)
622
622
// Bit 12-15 - Determine foreground table base address 0xxxx000 00000000 (in bytes)
623
623
if (ACCESSING_BITS_8_15)
624
624
{
625
- m_layer_bg_address = (data & (m_vdp_type == wswan_video_device:: VDP_TYPE_WSC ? 0x0f00 : 0x0700 )) << 2 ;
626
- m_layer_fg_address = (data & (m_vdp_type == wswan_video_device:: VDP_TYPE_WSC ? 0xf000 : 0x7000 )) >> 2 ;
625
+ m_layer_bg_address = (data & (m_vdp_type == VDP_TYPE_WSC ? 0x0f00 : 0x0700 )) << 2 ;
626
+ m_layer_fg_address = (data & (m_vdp_type == VDP_TYPE_WSC ? 0xf000 : 0x7000 )) >> 2 ;
627
627
}
628
628
break ;
629
629
case 0x08 / 2 :
0 commit comments