summaryrefslogtreecommitdiffstatshomepage
path: root/src/mame/video
diff options
context:
space:
mode:
author Angelo Salese <angelosa@users.noreply.github.com>2011-08-06 14:43:21 +0000
committer Angelo Salese <angelosa@users.noreply.github.com>2011-08-06 14:43:21 +0000
commit3d124fec64b97c522efb4e8aa2942f9b894c0a25 (patch)
tree692b0216eb28df8db4605fa6888bc2f4e2fccbe8 /src/mame/video
parentb833ba5bcad39991521d517bc6a522570a1a7383 (diff)
Port from MESS, nw
Diffstat (limited to 'src/mame/video')
-rw-r--r--src/mame/video/stvvdp1.c34
-rw-r--r--src/mame/video/stvvdp2.c9
2 files changed, 36 insertions, 7 deletions
diff --git a/src/mame/video/stvvdp1.c b/src/mame/video/stvvdp1.c
index 8822789038d..37089a9a719 100644
--- a/src/mame/video/stvvdp1.c
+++ b/src/mame/video/stvvdp1.c
@@ -294,8 +294,6 @@ WRITE16_HANDLER( saturn_vdp1_regs_w )
case 0x00/2:
stv_set_framebuffer_config(space->machine());
if ( VDP1_LOG ) logerror( "VDP1: Access to register TVMR = %1X\n", STV_VDP1_TVMR );
- if ( STV_VDP1_VBE && get_vblank(space->machine()) )
- state->m_vdp1.framebuffer_clear_on_next_frame = 1;
break;
case 0x02/2:
@@ -364,7 +362,27 @@ WRITE32_HANDLER ( saturn_vdp1_framebuffer0_w )
if ( STV_VDP1_TVM & 1 )
{
/* 8-bit mode */
- printf("VDP1 8-bit mode %08x %02x\n",offset,data);
+ //printf("VDP1 8-bit mode %08x %02x\n",offset,data);
+ if ( ACCESSING_BITS_24_31 )
+ {
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2] &= 0x00ff;
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2] |= data & 0xff00;
+ }
+ if ( ACCESSING_BITS_16_23 )
+ {
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2] &= 0xff00;
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2] |= data & 0x00ff;
+ }
+ if ( ACCESSING_BITS_8_15 )
+ {
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2+1] &= 0x00ff;
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2+1] |= data & 0xff00;
+ }
+ if ( ACCESSING_BITS_0_7 )
+ {
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2+1] &= 0xff00;
+ state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2+1] |= data & 0x00ff;
+ }
}
else
{
@@ -388,7 +406,15 @@ READ32_HANDLER ( saturn_vdp1_framebuffer0_r )
if ( STV_VDP1_TVM & 1 )
{
/* 8-bit mode */
- printf("VDP1 8-bit mode %08x\n",offset);
+ //printf("VDP1 8-bit mode %08x\n",offset);
+ if ( ACCESSING_BITS_24_31 )
+ result |= ((state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2] & 0xff00) << 16);
+ if ( ACCESSING_BITS_16_23 )
+ result |= ((state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2] & 0x00ff) << 16);
+ if ( ACCESSING_BITS_8_15 )
+ result |= ((state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2+1] & 0xff00));
+ if ( ACCESSING_BITS_0_7 )
+ result |= ((state->m_vdp1.framebuffer[state->m_vdp1.framebuffer_current_draw][offset*2+1] & 0x00ff));
}
else
{
diff --git a/src/mame/video/stvvdp2.c b/src/mame/video/stvvdp2.c
index 6345203e52e..285fcb95d04 100644
--- a/src/mame/video/stvvdp2.c
+++ b/src/mame/video/stvvdp2.c
@@ -105,6 +105,7 @@ In other words,the first three types uses the offset and not the color allocated
#include "profiler.h"
#include "includes/stv.h"
+static UINT8 get_vblank(running_machine &machine);
static UINT8 get_hblank(running_machine &machine);
static int get_vblank_duration(running_machine &machine);
static int get_hblank_duration(running_machine &machine);
@@ -4357,12 +4358,14 @@ static void stv_vdp2_check_tilemap(running_machine &machine, bitmap_t *bitmap, c
/* Magical Drop III 0x200 -> color calculation window */
/* Ide Yousuke Meijin No Shin Jissen Mahjong 0x0303 */
- if(STV_VDP2_WCTLD & 0x2008)
+ /* Decathlete 0x088 */
+ if(STV_VDP2_WCTLD & 0x2000)
popmessage("Special window enabled %04x, contact MAMEdev",STV_VDP2_WCTLD);
/* Shining Force III, After Burner 2 (doesn't make a proper use tho?) */
- if(STV_VDP2_W0LWE || STV_VDP2_W1LWE)
- popmessage("Line Window %s %08x enabled, contact MAMEdev",STV_VDP2_W0LWE ? "0" : "1",STV_VDP2_W0LWTA);
+ /* Layer Section */
+ //if(STV_VDP2_W0LWE || STV_VDP2_W1LWE)
+ // popmessage("Line Window %s %08x enabled, contact MAMEdev",STV_VDP2_W0LWE ? "0" : "1",STV_VDP2_W0LWTA);
/* Akumajou Dracula, bits 2-4 */
/* Arcana Strikes bit 5*/