summaryrefslogtreecommitdiffstatshomepage
path: root/src/devices
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2018-05-16 21:56:39 +1000
committer Vas Crabb <vas@vastheman.com>2018-05-16 21:56:39 +1000
commit166638ce8093e04884166296469bda82882890fd (patch)
tree6dedcf3bde5d05843695efaf4949ab285d3193f1 /src/devices
parent8e796a2075415427491a541b75884aea6e21f6a9 (diff)
Revert "- Removed MACHINE/SOUND/VIDEO _START/_RESET macros. This has the side effect of making machine-config overrides of these much"
This reverts commit c83e2a853d4e1643fcc85b68ada3c6f7f33adea4. Revert "fix compile. (nw)" This reverts commit a259ba3e366f442a22a9341755ff58163869860c. GCC is being bad and allowing invalid C++ that other compilers reject.
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/video/stvvdp2.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/devices/video/stvvdp2.cpp b/src/devices/video/stvvdp2.cpp
index 453aec12aa4..7ea66ddac90 100644
--- a/src/devices/video/stvvdp2.cpp
+++ b/src/devices/video/stvvdp2.cpp
@@ -2251,7 +2251,7 @@ uint8_t saturn_state::stv_vdp2_is_rotation_applied(void)
RP.dx == _FIXED_1 &&
RP.dy == _FIXED_0 &&
RP.kx == _FIXED_1 &&
- RP.ky == _FIXED_1 &&
+ RP.ky == _FIXED_1 &&
STV_VDP2_RPMD < 2) // disable optimizations if roz mode is 2 or 3
{
return 0;
@@ -4449,7 +4449,7 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
if ( stv2_current_tilemap.linescroll_enable ||
stv2_current_tilemap.vertical_linescroll_enable ||
- stv2_current_tilemap.linezoom_enable ||
+ stv2_current_tilemap.linezoom_enable ||
stv2_current_tilemap.vertical_cell_scroll_enable)
{
// check for vertical cell scroll enable (Sonic Jam)
@@ -4462,11 +4462,11 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
int16_t base_scrollx, base_scrolly;
//uint32_t base_incx, base_incy;
int cur_char = 0;
-
+
base_mask = STV_VDP2_VRAMSZ ? 0x7ffff : 0x3ffff;
vcsc_address = (((STV_VDP2_VCSTAU << 16) | STV_VDP2_VCSTAL) & base_mask) * 2;
vcsc_address >>= 2;
-
+
base_offset = 0;
base_multiplier = 1;
// offset for both enabled
@@ -4475,26 +4475,26 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
// NBG1
if(stv2_current_tilemap.layer_name & 1)
base_offset = 1;
-
+
base_multiplier = 2;
}
-
+
base_scrollx = stv2_current_tilemap.scrollx;
base_scrolly = stv2_current_tilemap.scrolly;
//base_incx = stv2_current_tilemap.incx;
//base_incy = stv2_current_tilemap.incy;
-
+
while(cur_char <= cliprect.max_x)
{
mycliprect.min_x = cur_char;
mycliprect.max_x = cur_char + 8 - 1;
-
+
uint32_t cur_address;
int16_t char_scroll;
-
+
cur_address = vcsc_address;
cur_address += ((cur_char >> 3) * base_multiplier) + base_offset;
-
+
char_scroll = m_vdp2_vram[ cur_address ] >> 16;
char_scroll &= 0x07ff;
if ( char_scroll & 0x0400 ) char_scroll |= 0xf800;
@@ -4504,7 +4504,7 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
//stv2_current_tilemap.incy = base_incy;
stv_vdp2_check_tilemap_with_linescroll(bitmap, mycliprect);
-
+
// TODO: + 16 for tilemap and char size = 16?
cur_char += 8;
@@ -4512,10 +4512,10 @@ void saturn_state::stv_vdp2_check_tilemap(bitmap_rgb32 &bitmap, const rectangle
}
else
stv_vdp2_check_tilemap_with_linescroll(bitmap, cliprect);
-
+
return;
}
-
+
if (stv2_current_tilemap.bitmap_enable) // this layer is a bitmap
{
stv_vdp2_draw_basic_bitmap(bitmap, mycliprect);
@@ -5047,7 +5047,7 @@ inline bool saturn_state::stv_vdp2_roz_mode3_window(int x, int y, int rot_parame
uint8_t w1_enable = STV_VDP2_RPW1E;
uint8_t w0_area = STV_VDP2_RPW0A;
uint8_t w1_area = STV_VDP2_RPW1A;
-
+
if (w0_enable == 0 &&
w1_enable == 0)
return rot_parameter ^ 1;
@@ -6359,7 +6359,7 @@ int saturn_state::stv_vdp2_start ( void )
}
/* maybe we should move this to video/stv.c */
-void saturn_state::video_start_stv_vdp2()
+VIDEO_START_MEMBER(saturn_state,stv_vdp2)
{
int i;
m_screen->register_screen_bitmap(m_tmpbitmap);
@@ -6508,7 +6508,7 @@ void saturn_state::stv_vdp2_get_window0_coordinates(int *s_x, int *e_x, int *s_y
// double density makes the line window to fetch data every two lines
uint8_t interlace = (STV_VDP2_LSMD == 3);
uint32_t vram_data = m_vdp2_vram[(address >> 2)+(y >> interlace)];
-
+
*s_x = (vram_data >> 16) & 0x3ff;
*e_x = (vram_data & 0x3ff);
}
@@ -6568,7 +6568,7 @@ void saturn_state::stv_vdp2_get_window1_coordinates(int *s_x, int *e_x, int *s_y
// double density makes the line window to fetch data every two lines
uint8_t interlace = (STV_VDP2_LSMD == 3);
uint32_t vram_data = m_vdp2_vram[(address >> 2)+(y >> interlace)];
-
+
*s_x = (vram_data >> 16) & 0x3ff;
*e_x = (vram_data & 0x3ff);
}
@@ -6865,7 +6865,7 @@ void saturn_state::draw_sprites(bitmap_rgb32 &bitmap, const rectangle &cliprect,
pix &= 0x7ff;
pix += color_offset_pal;
bitmap_line[x] = m_palette->pen( pix );
-
+
}
}