Fix Racin' Force crash at POST, "fixed" text tilemap offsets, nw

This commit is contained in:
angelosa 2015-12-17 01:50:12 +01:00
parent f5b5f30f9c
commit c73dd3f8ef
5 changed files with 13 additions and 18 deletions

View File

@ -184,7 +184,7 @@ void k053252_device::res_change()
if (m_slave_screen)
m_slave_screen->configure(m_hc, m_vc, visarea, refresh);
#if 1
#if 0
attoseconds_t hsync = HZ_TO_ATTOSECONDS(clock()) * (m_hc);
printf("H %d HFP %d HSW %d HBP %d\n",m_hc,m_hfp,m_hsw*8,m_hbp);
printf("V %d VFP %d VSW %d VBP %d\n",m_vc,m_vfp,m_vsw,m_vbp);

View File

@ -1777,7 +1777,7 @@ static MACHINE_CONFIG_DERIVED( racinfrc, konamigx )
MCFG_VIDEO_START_OVERRIDE(konamigx_state, racinfrc)
MCFG_DEVICE_MODIFY("k053252")
MCFG_K053252_OFFSETS(24-8+16, 16-16)
MCFG_K053252_OFFSETS(24-8+16, 0)
MCFG_DEVICE_MODIFY("k056832")
MCFG_K056832_CONFIG("gfx1", 0, K056832_BPP_6, 0, 0, "none")

View File

@ -1087,10 +1087,6 @@ void k053247_device::static_set_palette_tag(device_t &device, const char *tag)
void k053247_device::device_start()
{
// bitmap_rgb32* blah;
// if (0)
// k053247_draw_single_sprite_gxcore(blah,
UINT32 total;
static const gfx_layout spritelayout =
{

View File

@ -114,6 +114,7 @@ static void K053936_zoom_draw(int chip,UINT16 *ctrl,UINT16 *linectrl, screen_dev
maxy = ctrl[0x0b] + K053936_offset[chip][1]-2 - 1;
if (maxy > cliprect.max_y)
maxy = cliprect.max_y;
}
else
{
@ -129,8 +130,6 @@ static void K053936_zoom_draw(int chip,UINT16 *ctrl,UINT16 *linectrl, screen_dev
UINT16 *lineaddr = linectrl + 4*((y - K053936_offset[chip][1]) & 0x1ff);
my_clip.min_y = my_clip.max_y = y;
startx = 256 * (INT16)(lineaddr[0] + ctrl[0x00]);
starty = 256 * (INT16)(lineaddr[1] + ctrl[0x01]);
incxx = (INT16)(lineaddr[2]);

View File

@ -1318,10 +1318,10 @@ VIDEO_START_MEMBER(konamigx_state, racinfrc)
{
common_init();
m_k056832->set_layer_offs(0, -2+1, 0);
m_k056832->set_layer_offs(1, 0+1, 0);
m_k056832->set_layer_offs(2, 2+1, 0);
m_k056832->set_layer_offs(3, 3+1, 0);
m_k056832->set_layer_offs(0, -2+1, -16);
m_k056832->set_layer_offs(1, 0+1, -16);
m_k056832->set_layer_offs(2, 2+1, -16);
m_k056832->set_layer_offs(3, 3+1, -16);
m_gx_psac_tilemap = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(konamigx_state::get_gx_psac1a_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 128, 128);
m_gx_psac_tilemap2 = &machine().tilemap().create(m_gfxdecode, tilemap_get_info_delegate(FUNC(konamigx_state::get_gx_psac1b_tile_info),this), TILEMAP_SCAN_COLS, 16, 16, 128, 128);
@ -1405,7 +1405,7 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
// Type-1
if (m_gx_specialrozenable == 1)
{
K053936_0_zoom_draw(screen, *m_gxtype1_roz_dstbitmap, m_gxtype1_roz_dstbitmapclip,m_gx_psac_tilemap, 0,0,0); // height data
//K053936_0_zoom_draw(screen, *m_gxtype1_roz_dstbitmap, m_gxtype1_roz_dstbitmapclip,m_gx_psac_tilemap, 0,0,0); // height data
K053936_0_zoom_draw(screen, *m_gxtype1_roz_dstbitmap2,m_gxtype1_roz_dstbitmapclip,m_gx_psac_tilemap2,0,0,0); // colour data (+ some voxel height data?)
}
@ -1415,7 +1415,6 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
{
konamigx_mixer(screen, bitmap, cliprect, m_gx_psac_tilemap, GXSUB_8BPP,nullptr,0, 0, nullptr, m_gx_rushingheroes_hack);
}
// hack, draw the roz tilemap if W is held
// todo: fix so that it works with the mixer without crashing(!)
else if (m_gx_specialrozenable == 2)
{
@ -1441,7 +1440,8 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
if (m_gx_specialrozenable == 1)
{
const pen_t *paldata = m_palette->pens();
// hack, draw the roz tilemap if W is held
if ( machine().input().code_pressed(KEYCODE_W) )
{
int y,x;
@ -1451,12 +1451,12 @@ UINT32 konamigx_state::screen_update_konamigx(screen_device &screen, bitmap_rgb3
{
for (y=0;y<256;y++)
{
//UINT16* src = &m_gxtype1_roz_dstbitmap->pix16(y);
//UINT32* dst = &bitmap.pix32(y);
// ths K053936 rendering should probably just be flipped
// this is just kludged to align the racing force 2d logo
UINT16* src = &m_gxtype1_roz_dstbitmap2->pix16(y+30);
UINT16* src = &m_gxtype1_roz_dstbitmap2->pix16(y);
//UINT16* src = &m_gxtype1_roz_dstbitmap->pix16(y);
UINT32* dst = &bitmap.pix32(256-y);
for (x=0;x<512;x++)