Fixed text layer priority in Chouji Meikyuu Legion (both sets). No whatsnew

This commit is contained in:
Tomasz Slanina 2010-12-30 19:35:24 +00:00
parent b3806f775c
commit 25f1f2b6aa
2 changed files with 41 additions and 48 deletions

View File

@ -53,7 +53,7 @@ Stephh's notes (based on the games M68000 code and some tests) :
to find its purpose (any more infos are welcome)
1b) 'legiono'
1b) 'legiono' (bootleg set?)
- The ROM test (code at 0x000466) checks range 0x000102-0x03ffff
but NEVER reports an error if the checksum isn't correct due
@ -1165,7 +1165,6 @@ ROM_START( legiono )
ROM_LOAD( "legion.1k", 0x000000, 0x010000, CRC(ff5a0db9) SHA1(9308deb363d3b7686cc69485ec14201dd68f9a97) )
ROM_LOAD( "legion.1j", 0x010000, 0x010000, CRC(bae220c8) SHA1(392ae0fb0351dcad7b0e8e0ed4a1dc6e07f493df) )
/* should lg7.bin be loaded here too? The ROM wasn't included in this set */
ROM_END
ROM_START( terraf )
@ -1569,7 +1568,7 @@ static DRIVER_INIT( cclimbr2 )
/* YEAR, NAME, PARENT, MACHINE, INPUT, INIT, MONITOR, COMPANY, FULLNAME, FLAGS */
GAME( 1987, legion, 0, legion, legion, legion, ROT270, "Nichibutsu", "Chouji Meikyuu Legion (ver 2.03)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION )
GAME( 1987, legiono, legion, legiono, legion, legiono, ROT270, "Nichibutsu", "Chouji Meikyuu Legion (ver 1.05)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION )
GAME( 1987, legiono, legion, legiono, legion, legiono, ROT270, "Nichibutsu", "Chouji Meikyuu Legion (ver 1.05)", GAME_SUPPORTS_SAVE ) /* bootleg? */
GAME( 1987, terraf, 0, terraf, terraf, terraf, ROT0, "Nichibutsu", "Terra Force (set 1)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION )
GAME( 1987, terrafb, terraf, terrafb, terraf, terrafu, ROT0, "bootleg", "Terra Force (bootleg with additional Z80)", GAME_SUPPORTS_SAVE | GAME_NOT_WORKING )
GAME( 1987, terrafa, terraf, terraf, terraf, terrafu, ROT0, "Nichibutsu", "Terra Force (set 2)", GAME_SUPPORTS_SAVE | GAME_IMPERFECT_GRAPHICS | GAME_UNEMULATED_PROTECTION )

View File

@ -57,6 +57,14 @@ static TILE_GET_INFO( get_legion_tx_tile_info )
attributes = state->text_videoram[tile_index + 0x800] & 0xff;
else
attributes = state->text_videoram[tile_index + 0x400] & 0xff;
tileinfo->category = 0;
if((attributes & 0x3) == 3)
{
tileinfo->category = 1;
}
SET_TILE_INFO(
0,
@ -120,11 +128,8 @@ VIDEO_START( armedf )
break;
case 3: /* legion */
state->tx_tilemap = tilemap_create(machine, get_legion_tx_tile_info, armedf_scan_type3, 8, 8, 64, 32);
break;
case 6: /* legiono */
state->tx_tilemap = tilemap_create(machine, get_tx_tile_info, armedf_scan_type3, 8, 8, 64, 32);
state->tx_tilemap = tilemap_create(machine, get_legion_tx_tile_info, armedf_scan_type3, 8, 8, 64, 32);
break;
default:
@ -295,8 +300,8 @@ static void copy_textmap(running_machine *machine, int index)
2nd half of the MCu external ROM contains text tilemaps:
4 - title screen
5 - ??? - should be (when comapred with legiono set) displayed(? inivisble? different prority?) during game
6 - test mode screen
5 - bottom layer gfx, visible in later levels, during boss fight
6 - test mode screen (not hooked up)
7 - portraits (title)
*/
@ -307,24 +312,16 @@ static void copy_textmap(running_machine *machine, int index)
for(int i=0;i<0x400;++i)
{
if(i<0x10) continue;
if(index>0)
{
int tile=data[0x800*index+i];
int bank=data[0x800*index+i+0x400]&3;
int tile=data[0x800*index+i];
int bank=data[0x800*index+i+0x400]&3;
if( (tile|(bank<<8))!=0x20)
{
state->text_videoram[i]=tile;
state->text_videoram[i+0x400]=data[0x800*index+i+0x400];
}
}
else
if( (tile|(bank<<8))!=0x20)
{
//clear - not used
state->text_videoram[i]=0x20;
state->text_videoram[i+0x400]=0;
state->text_videoram[i]=tile;
state->text_videoram[i+0x400]=data[0x800*index+i+0x400];
}
}
tilemap_mark_all_tiles_dirty(state->tx_tilemap);
@ -401,6 +398,12 @@ VIDEO_UPDATE( armedf )
bitmap_fill(bitmap, cliprect , 0xff);
if(state->scroll_type == 3 || state->scroll_type == 6) /* legion / legiono */
{
tilemap_draw(bitmap, cliprect, state->tx_tilemap, 1, 0);
}
if (state->vreg & 0x0800)
tilemap_draw(bitmap, cliprect, state->bg_tilemap, 0, 0);
/*
@ -413,6 +416,8 @@ VIDEO_UPDATE( armedf )
bitmap_fill(bitmap, cliprect , get_black_pen(screen->machine) & 0x0f);
}*/
if ((state->mcu_mode & 0x0030) == 0x0030)
tilemap_draw(bitmap, cliprect, state->tx_tilemap, 0, 0);
@ -436,42 +441,31 @@ VIDEO_UPDATE( armedf )
if (sprite_enable)
draw_sprites(screen->machine, bitmap, cliprect, 0);
if(state->scroll_type == 3) /* legion */
{
/* Hack to clear the garbage draw in place of "GAME OVER" after
continue. Game code copies there '@ABCDEFG' (from location $13fad),
to fix tilemap (index 5) currently not displayed in game
(visible in legiono (unprotected) set - it covers the playfield,
but should be not visible? or draw under the tilemaps)
*/
if( (state->text_videoram[0]&0xff) == 0x0e &&
(state->text_videoram[0x40e/2]&0xff)==' ' &&
(state->text_videoram[0x410/2]&0xff)=='@' &&
(state->text_videoram[0x412/2]&0xff)=='A')
static int oldmode=-1;
int mode=state->text_videoram[1]&0xff;
if (mode != oldmode)
{
for(int i=0;i<16;++i)
oldmode=mode;
switch(mode)
{
state->text_videoram[0x410/2+i]=0x20;
state->text_videoram[0x410/2+i+0x400]=0;
case 0x01: copy_textmap(screen->machine, 4); break; /* title screen */
case 0x06: copy_textmap(screen->machine, 7); break; /* portraits on title screen */
case 0x1c: copy_textmap(screen->machine, 5); break; /* bottom, in-game layer */
default: logerror("unknown mode %d\n", mode); break;
}
tilemap_mark_all_tiles_dirty(state->tx_tilemap);
}
switch(state->text_videoram[1]&0xff)
{
case 1: copy_textmap(screen->machine, 4); break; /* title screen */
case 6: copy_textmap(screen->machine, 7); break; /* portraits on title screen */
/* display tilemap 5 during game .. but it makes the game unplayable */
}
}
return 0;
}
VIDEO_EOF( armedf )
{
address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM);