mirror of
https://github.com/holub/mame
synced 2025-05-15 18:32:02 +03:00
Figured out BIOS loading in Super Kaneko Nova System [Joerg Hartenberger]
This commit is contained in:
parent
905523b7d9
commit
fc747c1f51
@ -33,8 +33,6 @@ video: Sprite Zooming - the current algorithm is leaving gaps, most noticeable
|
||||
|
||||
video: Sprite positions still kludged slightly (see skns_sprite_kludge)
|
||||
|
||||
general: bios is still being skipped, gets stuck at last bios screen if we run it (see #define BIOS_SKIP)
|
||||
|
||||
------------------
|
||||
|
||||
SUPER-KANEKO-NOVA-SYSTEM
|
||||
@ -154,10 +152,6 @@ NEP-16
|
||||
#include "video/sknsspr.h"
|
||||
#include "includes/suprnova.h"
|
||||
|
||||
|
||||
#define BIOS_SKIP 1 // Skip Bios as it takes too long and doesn't complete atm.
|
||||
|
||||
|
||||
static void hit_calc_orig(UINT16 p, UINT16 s, UINT16 org, UINT16 *l, UINT16 *r)
|
||||
{
|
||||
switch(org & 3) {
|
||||
@ -299,10 +293,37 @@ static WRITE32_HANDLER ( skns_hit_w )
|
||||
|
||||
static WRITE32_HANDLER ( skns_hit2_w )
|
||||
{
|
||||
UINT32 *bios = (UINT32 *)space->machine().region("maincpu")->base();
|
||||
char biosid = (char)(bios[0x424>>2] >> 24);
|
||||
skns_state *state = space->machine().driver_data<skns_state>();
|
||||
hit_t &hit = state->m_hit;
|
||||
// log_event("HIT", "Set disconnect to %02x", data);
|
||||
hit.disconnect = data;
|
||||
|
||||
// Decide to unlock on country char of string "FOR xxxxx" in Bios ROM at offset 0x420
|
||||
// this code simulates behaviour of protection PLD
|
||||
data>>= 24;
|
||||
hit.disconnect = 1;
|
||||
switch (biosid)
|
||||
{
|
||||
case 'J':
|
||||
if (data == 0) hit.disconnect= 0;
|
||||
break;
|
||||
case 'U':
|
||||
if (data == 1) hit.disconnect= 0;
|
||||
break;
|
||||
case 'K':
|
||||
if (data == 2) hit.disconnect= 0;
|
||||
break;
|
||||
case 'E':
|
||||
if (data == 3) hit.disconnect= 0;
|
||||
break;
|
||||
case 'A':
|
||||
if (data < 2) hit.disconnect= 0;
|
||||
break;
|
||||
// unknow country id, unlock per default
|
||||
default:
|
||||
hit.disconnect= 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -407,6 +428,18 @@ static TIMER_DEVICE_CALLBACK( interrupt_callback )
|
||||
|
||||
static MACHINE_RESET(skns)
|
||||
{
|
||||
UINT32 *bios = (UINT32 *)machine.region("maincpu")->base();
|
||||
char biosid = (char)(bios[0x424>>2] >> 24);
|
||||
skns_state *state = machine.driver_data<skns_state>();
|
||||
hit_t &hit = state->m_hit;
|
||||
|
||||
if (biosid != 'A')
|
||||
{
|
||||
hit.disconnect= 1;
|
||||
} else
|
||||
{
|
||||
hit.disconnect= 0;
|
||||
}
|
||||
memory_set_bankptr(machine, "bank1",machine.region("user1")->base());
|
||||
}
|
||||
|
||||
@ -828,17 +861,6 @@ static MACHINE_CONFIG_START( skns, skns_state )
|
||||
MCFG_SOUND_ROUTE(1, "rspeaker", 1.0)
|
||||
MACHINE_CONFIG_END
|
||||
|
||||
/***** BIOS SKIPPING *****/
|
||||
|
||||
static READ32_HANDLER( bios_skip_r )
|
||||
{
|
||||
skns_state *state = space->machine().driver_data<skns_state>();
|
||||
#if BIOS_SKIP
|
||||
if ((cpu_get_pc(&space->device())==0x6f8) || (cpu_get_pc(&space->device())==0x6fa)) space->write_byte(0x06000029,1);
|
||||
#endif
|
||||
return state->m_main_ram[0x00028/4];
|
||||
}
|
||||
|
||||
/***** IDLE SKIPPING *****/
|
||||
|
||||
static READ32_HANDLER( gutsn_speedup_r )
|
||||
@ -969,9 +991,6 @@ static void init_skns(running_machine &machine)
|
||||
{
|
||||
// init DRC to fastest options
|
||||
sh2drc_set_options(machine.device("maincpu"), SH2DRC_FASTEST_OPTIONS);
|
||||
|
||||
sh2drc_add_pcflush(machine.device("maincpu"), 0x6f8);
|
||||
machine.device("maincpu")->memory().space(AS_PROGRAM)->install_legacy_read_handler(0x6000028, 0x600002b, FUNC(bios_skip_r) );
|
||||
}
|
||||
|
||||
static void set_drc_pcflush(running_machine &machine, UINT32 addr)
|
||||
|
Loading…
Reference in New Issue
Block a user