summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author cracyc <cracyc@users.noreply.github.com>2016-05-21 19:17:03 -0500
committer cracyc <cracyc@users.noreply.github.com>2016-05-21 19:17:03 -0500
commit7b823b8891c61f96c26d7648e2bb5a67f944665b (patch)
tree89663a6fb30b449a175adfb70208679d513ebc22
parent50b4b0975c8f1211849bd51f5d01245c66373c69 (diff)
itt3030: scrolling (nw)
-rw-r--r--src/devices/video/tms9927.cpp6
-rw-r--r--src/mame/drivers/itt3030.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/devices/video/tms9927.cpp b/src/devices/video/tms9927.cpp
index e571499a399..c85876c9640 100644
--- a/src/devices/video/tms9927.cpp
+++ b/src/devices/video/tms9927.cpp
@@ -104,6 +104,7 @@ void tms9927_device::device_start()
void tms9927_device::device_reset()
{
+ m_start_datarow = 0;
}
//-------------------------------------------------
@@ -286,13 +287,14 @@ void tms9927_device::recompute_parameters(int postload)
/* determine the visible area, avoid division by 0 */
m_visible_hpix = CHARS_PER_DATA_ROW * m_hpixels_per_column;
- m_visible_vpix = (LAST_DISP_DATA_ROW + 1) * SCANS_PER_DATA_ROW;
+ m_visible_vpix = DATA_ROWS_PER_FRAME * SCANS_PER_DATA_ROW;
+ m_start_datarow = (LAST_DISP_DATA_ROW + 1) % DATA_ROWS_PER_FRAME;
/* determine the horizontal/vertical offsets */
offset_hpix = HSYNC_DELAY * m_hpixels_per_column;
offset_vpix = VERTICAL_DATA_START;
- osd_printf_debug("TMS9937: Total = %dx%d, Visible = %dx%d, Offset=%dx%d, Skew=%d\n", m_total_hpix, m_total_vpix, m_visible_hpix, m_visible_vpix, offset_hpix, offset_vpix, SKEW_BITS);
+ osd_printf_debug("TMS9937: Total = %dx%d, Visible = %dx%d, Offset=%dx%d, Skew=%d, Upscroll=%d\n", m_total_hpix, m_total_vpix, m_visible_hpix, m_visible_vpix, offset_hpix, offset_vpix, SKEW_BITS, m_start_datarow);
/* see if it all makes sense */
m_valid_config = TRUE;
diff --git a/src/mame/drivers/itt3030.cpp b/src/mame/drivers/itt3030.cpp
index 5877e4a71d6..966a5f9c3df 100644
--- a/src/mame/drivers/itt3030.cpp
+++ b/src/mame/drivers/itt3030.cpp
@@ -350,11 +350,13 @@ WRITE8_MEMBER(itt3030_state::bankh_w)
UINT32 itt3030_state::screen_update( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
+ int start = m_crtc->upscroll_offset();
for(int y = 0; y < 24; y++ )
{
+ int vramy = (start + y) % 24;
for(int x = 0; x < 80; x++ )
{
- UINT8 code = m_vram[x + y*128];
+ UINT8 code = m_vram[x + vramy*128];
m_gfxdecode->gfx(0)->opaque(bitmap,cliprect, code , 0, 0,0, x*8,y*12);
}
}
@@ -484,7 +486,7 @@ ADDRESS_MAP_END
static ADDRESS_MAP_START( itt3030_io, AS_IO, 8, itt3030_state )
ADDRESS_MAP_GLOBAL_MASK(0xff)
- AM_RANGE(0x20, 0x26) AM_DEVREADWRITE("crt5027", crt5027_device, read, write)
+ AM_RANGE(0x20, 0x2f) AM_DEVREADWRITE("crt5027", crt5027_device, read, write)
AM_RANGE(0x30, 0x31) AM_DEVREADWRITE("kbdmcu", i8741_device, upi41_master_r, upi41_master_w)
AM_RANGE(0x32, 0x32) AM_WRITE(beep_w)
AM_RANGE(0x35, 0x35) AM_READ(vsync_r)