From 264a9d7a4fc8c86402ec9a582fccc718b74d1ee3 Mon Sep 17 00:00:00 2001 From: smf- Date: Fri, 9 Feb 2018 14:21:26 +0000 Subject: Soul Edge, fixed MT#03563 Li Long background colours [smf] --- src/devices/video/psx.cpp | 14 +++++++------- src/mame/machine/ns11prot.cpp | 9 +++++++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/devices/video/psx.cpp b/src/devices/video/psx.cpp index 69c0440c037..5a067590345 100644 --- a/src/devices/video/psx.cpp +++ b/src/devices/video/psx.cpp @@ -120,8 +120,8 @@ static inline void ATTR_PRINTF(3,4) verboselog( device_t& device, int n_level, c void psxgpu_device::DebugMeshInit() { - int width = screen().width(); - int height = screen().height(); + int width = m_screen->width(); + int height = m_screen->height(); m_debug.b_mesh = 0; m_debug.b_texture = 0; @@ -136,8 +136,8 @@ void psxgpu_device::DebugMesh( int n_coordx, int n_coordy ) { int n_coord; int n_colour; - int width = screen().width(); - int height = screen().height(); + int width = m_screen->width(); + int height = m_screen->height(); n_coordx += m_n_displaystartx; n_coordy += n_displaystarty; @@ -334,8 +334,8 @@ int psxgpu_device::DebugTextureDisplay( bitmap_ind16 &bitmap ) if( m_debug.b_texture ) { - int width = screen().width(); - int height = screen().height(); + int width = m_screen->width(); + int height = m_screen->height(); for( n_y = 0; n_y < height; n_y++ ) { @@ -363,7 +363,7 @@ int psxgpu_device::DebugTextureDisplay( bitmap_ind16 &bitmap ) } p_n_interleave[ n_x ] = p_p_vram[ n_yi ][ n_xi ]; } - draw_scanline16( bitmap, 0, n_y, width, p_n_interleave, screen().palette().pens() ); + draw_scanline16( bitmap, 0, n_y, width, p_n_interleave, m_screen->palette().pens() ); } } return m_debug.b_texture; diff --git a/src/mame/machine/ns11prot.cpp b/src/mame/machine/ns11prot.cpp index 6e0f711d795..cccaf05fba8 100644 --- a/src/mame/machine/ns11prot.cpp +++ b/src/mame/machine/ns11prot.cpp @@ -76,9 +76,14 @@ keycus_c409_device::keycus_c409_device(const machine_config &mconfig, const char READ16_MEMBER(keycus_c409_device::read) { - if( offset == 7 && m_p1 == 0x0006 && m_p2 == 0x0000 && m_p3 == 0x0013 ) + if( offset == 7 ) { - return 0x000f; + int a2 = (m_p1 - 0x01) & 0x1f; + int a3 = (0x20 - m_p1) & 0x1f; + int r = (((m_p2 & 0x1f) * a2) + ((m_p3 & 0x1f) * a3)) / 0x1f; + int g = ((((m_p2 >> 5) & 0x1f) * a2) + (((m_p3 >> 5) & 0x1f) * a3)) / 0x1f; + int b = ((((m_p2 >> 10) & 0x1f) * a2) + (((m_p3 >> 10) & 0x1f) * a3)) / 0x1f; + return r | (g << 5) | (b << 10); } logerror( "keycus_c409_device::read unexpected offset=%d m_p1=%04x m_p2=%04x m_p3=%04x\n", offset, m_p1, m_p2, m_p3 ); -- cgit v1.2.3