Cross Shooter crashes are actually related to the ROM bank, fixed

This commit is contained in:
Angelo Salese 2013-07-17 21:20:04 +00:00
parent c3b40f8607
commit c614a29886
2 changed files with 18 additions and 6 deletions

View File

@ -218,6 +218,8 @@ conventional RAM. See the memory map for sprite data format.
****************************************************************************
TODO:
- MCU is identical between Empire City and Cross Shooter, I guess it's coinage
related.
- palette is incorporated - fix!!!
- handle transparency in text layer properly (how?)
- second bank of sf02 is this used? (probably NOT)
@ -262,9 +264,10 @@ static ADDRESS_MAP_START( cshooter_cpu1_map, AS_PROGRAM, 8, stfight_state )
AM_RANGE(0x0007, 0x0007) AM_READ(cshooter_mcu_unk1_r)
AM_RANGE(0xc203, 0xc203) AM_READ_PORT("DSW1")
AM_RANGE(0xc204, 0xc204) AM_READ_PORT("DSW0")
AM_RANGE(0xc801, 0xc801) AM_WRITE(stfight_bank_w)
AM_RANGE(0xd000, 0xd7ff) AM_RAM_WRITE(cshooter_text_w) AM_SHARE("tx_vram")
AM_RANGE(0xd809, 0xd809) AM_WRITE(stfight_bank_w)
AM_RANGE(0xd818, 0xd818) AM_WRITE(cshooter_mcu_w)
AM_RANGE(0xe000, 0xfdff) AM_RAM
AM_RANGE(0xfe00, 0xffff) AM_RAM AM_SHARE("sprite_ram")
AM_IMPORT_FROM(cpu1_map)
ADDRESS_MAP_END
@ -971,8 +974,8 @@ ROM_START( cshooter )
ROM_REGION( 0x20000, "gfx3", ROMREGION_ERASEFF ) // background tiles
ROM_REGION( 0x20000, "gfx4", ROMREGION_ERASEFF ) // sprites
ROM_LOAD( "graphics.1a", 0x00000, 0x10000, NO_DUMP )
ROM_REGION( 0x20000, "gfx4", 0 ) // sprites
ROM_LOAD( "graphics.1a", 0x00000, 0x20000, NO_DUMP )
ROM_REGION( 0x10000, "gfx5", ROMREGION_ERASEFF ) /* foreground map data */

View File

@ -109,8 +109,17 @@ void stfight_state::machine_reset()
WRITE8_MEMBER(stfight_state::stfight_bank_w)
{
UINT8 *ROM2 = memregion("maincpu")->base() + 0x10000;
UINT16 bank_num;
membank("bank1")->set_base(&ROM2[0x4000*((data>>4)&3)] );
bank_num = 0;
if(data & 0x80)
bank_num |= 0x8000;
if(data & 0x04)
bank_num |= 0x4000;
membank("bank1")->set_base(&ROM2[bank_num] );
}
/*
@ -267,7 +276,7 @@ READ8_MEMBER(stfight_state::stfight_fm_r)
/*
* Cross Shooter MCU communications
*
* TODO: everything, especially MCU to main comms
* TODO: everything, especially MCU to main comms (tied with coinage ports?)
*/
WRITE8_MEMBER(stfight_state::cshooter_68705_ddr_a_w)