mb60553.cpp: improved zooming alignment, mostly noticeable in Tecmo World Cup '94 [Angelo Salese]

This commit is contained in:
angelosa 2017-08-29 10:00:06 +02:00
parent e1e3ba3bce
commit 3a9849a5b3

View File

@ -7,6 +7,11 @@
interestingly the chip seems to require doubled up ROMs (2 copies of each ROM) to draw just the single layer. interestingly the chip seems to require doubled up ROMs (2 copies of each ROM) to draw just the single layer.
*/ */
/*
Tecmo World Cup '94 "service mode" has an item for testing zooming, this is:
0xffdf12 target zoom code
0xffdf16 current zoom code
*/
#include "emu.h" #include "emu.h"
#include "mb60553.h" #include "mb60553.h"
@ -267,18 +272,21 @@ void mb60553_zooming_tilemap_device::draw( screen_device &screen, bitmap_ind16&
// int scrolly; // int scrolly;
uint32_t startx,starty; uint32_t startx,starty;
uint32_t incxx,incyy; uint32_t incxx,incyy;
float xoffset;
// x origin is offset by 384
startx = m_regs[0] + 384;
starty = m_regs[1];
// startx += (24<<4); // maybe not..
// startx -= m_lineram[(line)*8+7]/2;
incxx = m_lineram[(line)*8+0]<<4; incxx = m_lineram[(line)*8+0]<<4;
// startx has an offset based off current x zoom value
// This is confirmed by Tecmo World Cup '94 startx being 0xff40 (-192) when showing footballer pics on attract mode (incxx is 0x800)
xoffset = (float)incxx/(float)0x10000 * 384.0;
startx = m_regs[0] + (uint32_t)xoffset;
starty = m_regs[1];
// TODO: what's this? Used by Grand Striker playfield
// startx -= m_lineram[(line)*8+7]/2;
incyy = m_lineram[(line)*8+3]<<4; incyy = m_lineram[(line)*8+3]<<4;
clip.min_y = clip.max_y = line; clip.min_y = clip.max_y = line;