Implemented proper FG scroll latching in Kodure Ookami, fixing an offsetted layer at the gameplay intro screen [Angelo Salese]

This commit is contained in:
Angelo Salese 2011-04-21 18:34:28 +00:00
parent 927e6dc5c7
commit 80940f930d
2 changed files with 4 additions and 5 deletions

View File

@ -224,8 +224,8 @@ static WRITE16_HANDLER( kodure_io_w )
if(data & 0x4000 && ((state->m_vreg & 0x4000) == 0)) //0 -> 1 transition
{
/* latch fg scroll values */
//state->m_fg_scrollx = (state->m_text_videoram[0x0d] & 0xff) | ((state->m_text_videoram[0x0e] & 0x3) << 8);
//state->m_fg_scrolly = (state->m_text_videoram[0x0b] & 0xff) | ((state->m_text_videoram[0x0c] & 0x3) << 8);
state->m_fg_scrollx = (state->m_text_videoram[0x0d] & 0xff) | ((state->m_text_videoram[0x0e] & 0x3) << 8);
state->m_fg_scrolly = (state->m_text_videoram[0x0b] & 0xff) | ((state->m_text_videoram[0x0c] & 0x3) << 8);
/* process the command */
kodure_mcu_exec(space,(state->m_text_videoram[0] << 8) | (state->m_text_videoram[1] & 0xff));
@ -1587,7 +1587,7 @@ static DRIVER_INIT( armedf )
static DRIVER_INIT( kodure )
{
armedf_state *state = machine.driver_data<armedf_state>();
state->m_scroll_type = 2;
state->m_scroll_type = 0;
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_write_handler(0x07c000, 0x07c001, FUNC(kodure_io_w) );

View File

@ -367,7 +367,7 @@ SCREEN_UPDATE( armedf )
switch (state->m_scroll_type)
{
case 0: /* terra force */
case 0: /* terra force, kodure ookami */
tilemap_set_scrollx(state->m_fg_tilemap, 0, (state->m_fg_scrollx & 0x3ff));
tilemap_set_scrolly(state->m_fg_tilemap, 0, (state->m_fg_scrolly & 0x3ff));
break;
@ -381,7 +381,6 @@ SCREEN_UPDATE( armedf )
tilemap_set_scrollx(state->m_fg_tilemap, 0, (state->m_legion_cmd[13] & 0xff) | ((state->m_legion_cmd[14] & 0x3) << 8));
tilemap_set_scrolly(state->m_fg_tilemap, 0, (state->m_legion_cmd[11] & 0xff) | ((state->m_legion_cmd[12] & 0x3) << 8));
break;
case 2: /* kodure ookami */
case 3:
case 4: /* crazy climber 2 */
{