add proper internal rom to 'svg' parent set, it resets on coin now, need to investigate [rtw, iq_132, David Haywood]

This commit is contained in:
David Haywood 2014-01-15 16:06:20 +00:00
parent e49e89bebd
commit 5dff500e5b
3 changed files with 17 additions and 76 deletions

View File

@ -3614,9 +3614,8 @@ ROM_START( svg )
ROM_LOAD16_WORD_SWAP( "u30.bin", 0x100000, 0x080000, CRC(34c18f3f) SHA1(42d1edd0dcfaa5e44861c6a1d4cb24f51ba23de8) )
ROM_REGION( 0x4000, "prot", 0 ) /* ARM protection ASIC - internal rom */
// ROM_LOAD( "svg_igs027a.bin", 0x000000, 0x04000, NO_DUMP ) // different from PCB version..
ROM_LOAD( "svg_igs027a_execute_only_area", 0x0000, 0x00188, NO_DUMP )
ROM_LOAD( "svg_igs027a.bin", 0x0188, 0x3e78, BAD_DUMP CRC(7a59da5d) SHA1(d67ba465db40ca716b4b901b1c8e762716fb954e) ) // taken from svgpcb
ROM_LOAD( "svg_igs027a_v200_china.bin", 0x0188, 0x3e78, CRC(72b73169) SHA1(ffc0caea855ab4b01beb3aebd0bf17187c66c22c) )
ROM_REGION( 0x800000, "user1", 0 ) /* Protection Data (encrypted external ARM data) */
ROM_LOAD( "u26.bin", 0x000000, 0x400000, CRC(46826ec8) SHA1(ad1daf6f615fb8d748ce7f98f19dd3bf22f79fba) )
@ -4271,5 +4270,5 @@ GAME( 2004, kovlsjba, kovshp, pgm_arm_type1, kovsh, pgm_arm_type1_sta
// this is kludged to boot but isn't really going to work properly without the real internal ROM
GAME( 2005, svg, pgm, pgm_arm_type3, pgm, pgm_arm_type3_state, svg, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation (M68k label V200) (ARM label V200, ROM 10/11/05 S.V.G V201)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // label was 200, but it's code rev 201? // ARM time: 10:07:20
// needs improved sim of EO area
GAME( 2005, svg, pgm, pgm_arm_type3, svg, pgm_arm_type3_state, svg, ROT0, "IGS / Idea Factory", "S.V.G. - Spectral vs Generation (M68k label V200) (ARM label V200, ROM 10/11/05 S.V.G V201)", GAME_IMPERFECT_SOUND | GAME_UNEMULATED_PROTECTION | GAME_NOT_WORKING | GAME_SUPPORTS_SAVE ) /* need internal rom of IGS027A */ // label was 200, but it's code rev 201? // ARM time: 10:07:20

View File

@ -344,7 +344,6 @@ public:
void svg_basic_init();
void pgm_create_dummy_internal_arm_region(int size);
void pgm_patch_external_arm_rom_jumptable_theglada(int base);
void pgm_patch_external_arm_rom_jumptable_svg(int base);
void pgm_create_dummy_internal_arm_region_theglad(int is_svg);
void pgm_descramble_happy6(UINT8* src);
void pgm_descramble_happy6_2(UINT8* src);
@ -355,6 +354,7 @@ public:
DECLARE_READ32_MEMBER( theglad_speedup_r );
DECLARE_READ32_MEMBER( happy6_speedup_r );
DECLARE_READ32_MEMBER( svg_speedup_r );
DECLARE_READ32_MEMBER( svgpcb_speedup_r );
DECLARE_MACHINE_RESET(pgm_arm_type3_reset);
};

View File

@ -144,9 +144,6 @@ static ADDRESS_MAP_START( 55857G_arm7_map, AS_PROGRAM, 32, pgm_arm_type3_state )
AM_RANGE(0x48000000, 0x48000003) AM_READWRITE(svg_latch_arm_r, svg_latch_arm_w) /* 68k Latch */
AM_RANGE(0x40000018, 0x4000001b) AM_WRITE(svg_arm7_ram_sel_w) /* RAM SEL */
AM_RANGE(0x50000000, 0x500003ff) AM_RAM
// AM_RANGE(0xc0000000, 0xffffffff) AM_RAM
ADDRESS_MAP_END
@ -164,6 +161,7 @@ MACHINE_RESET_MEMBER(pgm_arm_type3_state, pgm_arm_type3_reset)
if (!strcmp(machine().system().name, "happy6")) base = 0x3586;
if (!strcmp(machine().system().name, "happy6101")) base = 0x3586;
if (!strcmp(machine().system().name, "svgpcb")) base = 0x3a8e;
if (!strcmp(machine().system().name, "svg")) base = 0x3c3e;
if (base != -1)
{
@ -267,10 +265,16 @@ READ32_MEMBER(pgm_arm_type3_state::happy6_speedup_r )
// installed over rom
READ32_MEMBER(pgm_arm_type3_state::svg_speedup_r )
{
int pc = space.device().safe_pc();
if (pc == 0xb90) space.device().execute().eat_cycles(500);
return m_armrom[0xb90/4];
}
READ32_MEMBER(pgm_arm_type3_state::svgpcb_speedup_r )
{
int pc = space.device().safe_pc();
if (pc == 0x9e0) space.device().execute().eat_cycles(500);
// else printf("killbldp_speedup_r %08x\n", pc);
return m_armrom[0x9e0/4];
}
@ -407,37 +411,8 @@ void pgm_arm_type3_state::pgm_create_dummy_internal_arm_region_theglad(int is_sv
temp16[(base) /2] = 0xE121; base += 2;
if (is_svg == 0)
{
temp16[(base) / 2] = 0x0028; base += 2; // jump to 0x184
temp16[(base) / 2] = 0xEA00; base += 2;
}
else
{
temp16[(base) / 2] = 0x001c; base += 2; // jump to 0x154
temp16[(base) / 2] = 0xEA00; base += 2;
base = 0x154;
// this actually makes matters worse here
// temp16[(base) / 2] = 0x1010; base += 2;
// temp16[(base) / 2] = 0xe59f; base += 2;
// temp16[(base) / 2] = 0x0001; base += 2;
// temp16[(base) / 2] = 0xe3a0; base += 2;
// temp16[(base) / 2] = 0x0000; base += 2;
// temp16[(base) / 2] = 0xe581; base += 2;
temp16[(base) / 2] = 0xf000; base += 2;
temp16[(base) / 2] = 0xe59f; base += 2;
temp16[(base) / 2] = 0x0028; base += 2;
temp16[(base) / 2] = 0x0800; base += 2;
temp16[(base) / 2] = 0x0028; base += 2;
temp16[(base) / 2] = 0x0800; base += 2;
// temp16[(base) / 2] = 0x003c; base += 2;
// temp16[(base) / 2] = 0x1000; base += 2;
}
temp16[(base) / 2] = 0x0028; base += 2; // jump to 0x184
temp16[(base) / 2] = 0xEA00; base += 2;
base = 0;
@ -535,39 +510,6 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state,theglad)
machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0x1000000c, 0x1000000f, read32_delegate(FUNC(pgm_arm_type3_state::theglad_speedup_r),this));
}
void pgm_arm_type3_state::pgm_patch_external_arm_rom_jumptable_svg(int base)
{
// we don't have the correct internal ROM for this version, so insead we use the one we have and patch the jump table in the external ROM
int subroutine_addresses[] =
{
0,0,0,0,0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,
0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0,0x1B0
};
UINT16 *extprot = (UINT16 *)memregion("user1")->base();
for (int i = 0; i < 135; i++)
{
UINT32 addr = extprot[(base/2)] | (extprot[(base/2) + 1] << 16);
extprot[(base / 2)] = addr - subroutine_addresses[i];
base += 4;
}
}
void pgm_arm_type3_state::pgm_patch_external_arm_rom_jumptable_theglada(int base)
{
@ -668,9 +610,9 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state,svg)
pgm_svg_decrypt(machine());
svg_latch_init();
pgm_create_dummy_internal_arm_region_theglad(1);
pgm_patch_external_arm_rom_jumptable_svg(0x53f10);
m_armrom = (UINT32 *)memregion("prot")->base();
machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0x9e0, 0x9e3, read32_delegate(FUNC(pgm_arm_type3_state::svg_speedup_r),this));
machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0xB90, 0xB93, read32_delegate(FUNC(pgm_arm_type3_state::svg_speedup_r),this));
}
@ -681,7 +623,7 @@ DRIVER_INIT_MEMBER(pgm_arm_type3_state,svgpcb)
svg_latch_init();
pgm_create_dummy_internal_arm_region_theglad(0);
m_armrom = (UINT32 *)memregion("prot")->base();
machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0x9e0, 0x9e3, read32_delegate(FUNC(pgm_arm_type3_state::svg_speedup_r),this));
machine().device("prot")->memory().space(AS_PROGRAM).install_read_handler(0x9e0, 0x9e3, read32_delegate(FUNC(pgm_arm_type3_state::svgpcb_speedup_r),this));
}