(MESS) gameboy, gbcolor: added a configuration setting

(off by default) to skip BIOS checks at boot. This allows the 
recently dumped Rockman World Prototype to be played,
and the Rocket Games pirate GBC carts too. [Fabio Priuli]

(MESS) gba: added a configuration setting (off by default) 
to skip some BIOS checks at boot. This allows Tyrian 2000 
Prototype to be played. [Fabio Priuli]


out of whatsnew: for the Rocket Games pirates it is currently unclear how real carts were bypassing
the BIOS checks on a real unit, and it would be nice to emulate it properly. however, this trick allows 
to go on fixing the rest of mapper emulation until it's fully understood.
This commit is contained in:
Fabio Priuli 2014-10-05 09:12:16 +00:00
parent 28e4a813a4
commit 2a4d327e01
8 changed files with 93 additions and 80 deletions

View File

@ -17257,12 +17257,12 @@
</part>
</software>
<!-- does this fails the internal BIOS check? -->
<software name="rockmanp" cloneof="megaman" supported="no">
<software name="rockmanp" cloneof="megaman">
<description>Rockman World (Jpn, Prototype)</description>
<year>1991</year>
<publisher>Capcom</publisher>
<info name="alt_title" value="ロックマンワールド"/>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_mbc1" />
<dataarea name="rom" size="262144">

View File

@ -35036,6 +35036,7 @@ The cart also contained a non-empty SRAM save which we currently include in the
<year>2003</year>
<publisher>Empire Entertainment</publisher>
<part name="cart" interface="gba_cart">
<feature name="slot" value="gba_eeprom_4k" />
<dataarea name="rom" size="4231928">
<rom name="starsky &amp; hutch (usa) (beta).bin" size="4231928" crc="ab142d2e" sha1="861066ddf8b52be194b30cbb70e959989f0a2f76" offset="000000" />
</dataarea>
@ -38439,10 +38440,11 @@ The cart also contained a non-empty SRAM save which we currently include in the
</part>
</software>
<software name="tyrian2k" supported="no">
<software name="tyrian2k">
<description>Tyrian 2000 (USA, Prototype)</description>
<year>19??</year>
<publisher>Stealth Productions</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gba_cart">
<dataarea name="rom" size="2681544">
<rom name="tyrian 2000 (usa) (proto).bin" size="2681544" crc="e5acba28" sha1="5148f40a58bc3d4512aced0f052f64b8c883ba87" offset="000000" />

View File

@ -23273,11 +23273,12 @@ Rocket Games
These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
-->
<software name="atvrackj" supported="no">
<software name="atvrackj" supported="partial">
<!-- Notes: GBC only -->
<description>ATV Racing &amp; Karate Joe (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="524288">
@ -23288,11 +23289,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="atvrackja" cloneof="atvrackj" supported="no">
<software name="atvrackja" cloneof="atvrackj" supported="partial">
<!-- Notes: GBC only -->
<description>ATV Racing &amp; Karate Joe (Euro, Alt)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="524288">
@ -23303,10 +23305,11 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="atvracin" supported="no">
<software name="atvracin">
<description>ATV Racing (Euro)</description>
<year>2001</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="262144">
@ -23317,11 +23320,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="fullhang" supported="no">
<software name="fullhang" supported="partial">
<!-- Notes: GBC only -->
<description>Full Time Soccer &amp; Hang Time Basketball (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="524288">
@ -23332,10 +23336,11 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="fulltime" supported="no">
<software name="fulltime">
<description>Full Time Soccer (Euro)</description>
<year>2000</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="262144">
@ -23346,24 +23351,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<!-- This has been hacked to run on MBC01 mapper -->
<software name="fulltimeh" cloneof="fulltime">
<description>Full Time Soccer (Euro, Hacked)</description>
<year>2000</year>
<publisher>Rocket Games</publisher>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_mbc1" />
<dataarea name="rom" size="262144">
<rom name="full time soccer (hacked) (unl).bin" size="262144" crc="655476f9" sha1="0d6c5f931223ea393a3f6bc1ecd1a18c1f889273" offset="000000" />
</dataarea>
</part>
</software>
<software name="hangtime" supported="no">
<software name="hangtime">
<!-- Notes: GBC only -->
<description>Hang Time Basketball (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="262144">
@ -23374,11 +23367,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="pocksmrt" supported="no">
<software name="pocksmrt" supported="partial">
<!-- Notes: GBC only -->
<description>Pocket Smash Out &amp; Race Time (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="524288">
@ -23392,6 +23386,7 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
<description>Pocket Smash Out (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="262144">
@ -23402,11 +23397,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="karatej" supported="no">
<software name="karatej" supported="partial">
<!-- Notes: GBC only -->
<description>Karate Joe (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="262144">
@ -23415,10 +23411,11 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="painter" supported="no">
<software name="painter">
<description>Painter (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="262144">
@ -23427,11 +23424,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="racetime" supported="no">
<software name="racetime">
<!-- Notes: GBC only -->
<description>Race Time (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="262144">
@ -23440,25 +23438,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<!-- This has been hacked to run on MBC01 mapper -->
<software name="racetimeh" cloneof="racetime">
<!-- Notes: GBC only -->
<description>Race Time (Euro, Hacked)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_mbc1" />
<dataarea name="rom" size="262144">
<rom name="race time (hacked) (unl).bin" size="262144" crc="8a5fa98c" sha1="8d8d6c3f5545edbd50813a22fb666c106ceb140b" offset="000000" />
</dataarea>
</part>
</software>
<software name="sinkj" supported="no">
<software name="sinkj" supported="partial">
<!-- Notes: GBC only -->
<description>Space Invasion &amp; Karate Joe (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="524288">
@ -23469,11 +23454,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="sinpntr" supported="no">
<software name="sinpntr" supported="partial">
<!-- Notes: GBC only -->
<description>Space Invasion &amp; Painter (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="524288">
@ -23484,11 +23470,12 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="sinvasn" supported="no">
<software name="sinvasn" supported="partial">
<!-- Notes: GBC only -->
<description>Space Invasion (Euro)</description>
<year>200?</year>
<publisher>Rocket Games</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_atvrac" />
<dataarea name="rom" size="131072">
@ -24058,10 +24045,11 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<software name="iceage2a" cloneof="iceage2" supported="no">
<software name="iceage2a" cloneof="iceage2">
<description>Ice Age II (Chi)</description>
<year>20??</year>
<publisher>Sintax</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_mbc5" />
<!-- cartridge ram -->
@ -25487,36 +25475,19 @@ These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
</part>
</software>
<!-- works on gbpocket -->
<software name="sqsd">
<!-- Alt. Title: 石器時代 精靈王誕生 (Stone Age - Birth of the Goblin King) -->
<description>Shi Qi Shi Dai - Jing Ling Wang Dan Sheng (Chi)</description>
<year>20??</year>
<publisher>GOWIN</publisher>
<info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_yong" />
<!-- cartridge ram -->
<dataarea name="rom" size="4194304">
<rom name="stone age (unl).bin" size="4194304" crc="e7d9d377" sha1="f88f605960c1573aa8bc5fafab19014b0d987729" offset="000000" />
</dataarea>
<dataarea name="nvram" size="8192">
</dataarea>
</part>
</software>
<!-- works on gbpocket -->
<software name="sqsdh" cloneof="sqsd">
<!-- Alt. Title: 石器時代 精靈王誕生 (Stone Age - Birth of the Goblin King) -->
<description>Shi Qi Shi Dai - Jing Ling Wang Dan Sheng (Chi, Hacked?)</description>
<year>20??</year>
<publisher>GOWIN</publisher>
<part name="cart" interface="gameboy_cart">
<feature name="slot" value="rom_yong" />
<!-- cartridge ram -->
<dataarea name="rom" size="4194304">
<rom name="stone age (unl)(hacked).bin" size="4194304" crc="2ffe697c" sha1="b992f280b5dd2095c8f430282c5dba69c6a10eb4" offset="000000" />
</dataarea>
<dataarea name="nvram" size="65536">
<dataarea name="nvram" size="8192"> <!-- or 65536 ? -->
</dataarea>
</part>
</software>

View File

@ -294,13 +294,11 @@ bool base_gb_cart_slot_device::call_load()
offset = 0;
if (get_mmm01_candidate(ROM, len))
offset = len - 0x8000;
int type;
if (software_entry() != NULL)
type = gb_get_pcb_id(get_feature("slot") ? get_feature("slot") : "rom");
m_type = gb_get_pcb_id(get_feature("slot") ? get_feature("slot") : "rom");
else
type = get_cart_type(ROM + offset, len - offset);
m_type = get_cart_type(ROM + offset, len - offset);
// setup RAM/NVRAM/RTC/RUMBLE
if (software_entry() != NULL)
@ -371,7 +369,7 @@ bool base_gb_cart_slot_device::call_load()
break;
}
if (type == GB_MBC_MBC2 || type == GB_MBC_MBC7)
if (m_type == GB_MBC_MBC2 || m_type == GB_MBC_MBC7)
rambanks = 1;
}
@ -384,7 +382,7 @@ bool base_gb_cart_slot_device::call_load()
if (m_cart->get_ram_size() && m_cart->get_has_battery())
battery_load(m_cart->get_ram_base(), m_cart->get_ram_size(), 0xff);
//printf("Type: %s\n", gb_get_slot(type));
//printf("Type: %s\n", gb_get_slot(m_type));
internal_header_logging(ROM + offset, len);
@ -566,6 +564,7 @@ int base_gb_cart_slot_device::get_cart_type(UINT8 *ROM, UINT32 len)
return type;
}
/*-------------------------------------------------
get default card software
-------------------------------------------------*/

View File

@ -436,6 +436,16 @@ READ8_MEMBER(gb_state::gb_cart_r)
if (offset < 0x100)
{
UINT8 *ROM = m_region_maincpu->base();
if (m_bios_hack->read())
{
// patch out logo and checksum checks
// (useful to run some pirate carts until we implement
// their complete functionalities + to test homebrew)
if (offset == 0xe9 || offset == 0xea)
return 0x00;
if (offset == 0xfa || offset == 0xfb)
return 0x00;
}
return ROM[offset];
}
else if (m_cartslot)
@ -456,6 +466,16 @@ READ8_MEMBER(gb_state::gbc_cart_r)
if (offset < 0x100)
{
UINT8 *ROM = m_region_maincpu->base();
if (m_bios_hack->read())
{
// patch out logo and checksum checks
// (useful to run some pirate carts until we implement
// their complete functionalities + to test homebrew)
if (offset == 0xdb || offset == 0xdc)
return 0x00;
if (offset == 0xed || offset == 0xee)
return 0x00;
}
return ROM[offset];
}
else if (offset >= 0x200 && offset < 0x900)
@ -607,6 +627,12 @@ static INPUT_PORTS_START( gameboy )
PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Button B")
PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START) PORT_NAME("Start")
PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("Select")
PORT_START("SKIP_CHECK")
PORT_CONFNAME( 0x01, 0x00, "[HACK] Skip BIOS Logo check" )
PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
PORT_CONFSETTING( 0x01, DEF_STR( On ) )
INPUT_PORTS_END
static SLOT_INTERFACE_START(gb_cart)

View File

@ -894,7 +894,7 @@ READ32_MEMBER(gba_state::gba_io_r)
case 0x0130/4:
if( (mem_mask) & 0x0000ffff ) // KEYINPUT
{
retval = m_io_in0->read();
retval = m_io_inputs->read();
}
else if( (mem_mask) & 0xffff0000 )
{
@ -1886,11 +1886,18 @@ WRITE32_MEMBER(gba_state::gba_oam_w)
READ32_MEMBER(gba_state::gba_bios_r)
{
UINT32 *rom = (UINT32 *)(*m_region_maincpu);
if (m_bios_protected != 0)
if (m_bios_hack->read())
{
offset = (m_bios_last_address + 8) / 4;
// partially patch out logo and checksum checks
// (useful to run some protos + to test homebrew)
if (ACCESSING_BITS_0_15 && (offset == 0x6fc/4))
return 0;
}
return rom[offset&0x3fff];
if (m_bios_protected != 0)
offset = (m_bios_last_address + 8) / 4;
return rom[offset & 0x3fff];
}
READ32_MEMBER(gba_state::gba_10000000_r)
@ -1925,7 +1932,7 @@ static ADDRESS_MAP_START( gba_map, AS_PROGRAM, 32, gba_state )
ADDRESS_MAP_END
static INPUT_PORTS_START( gbadv )
PORT_START("IN0")
PORT_START("INPUTS")
PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_UNUSED
PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 L") PORT_PLAYER(1) // L
PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 R") PORT_PLAYER(1) // R
@ -1937,6 +1944,11 @@ static INPUT_PORTS_START( gbadv )
PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_PLAYER(1) // SELECT
PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("B") PORT_PLAYER(1) // B
PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("A") PORT_PLAYER(1) // A
PORT_START("SKIP_CHECK")
PORT_CONFNAME( 0x01, 0x00, "[HACK] Skip BIOS Logo check" )
PORT_CONFSETTING( 0x00, DEF_STR( Off ) )
PORT_CONFSETTING( 0x01, DEF_STR( On ) )
INPUT_PORTS_END
@ -2121,10 +2133,9 @@ void gba_state::machine_start()
// install the cart ROM & SRAM into the address map, if present
if (m_cart->exists())
{
address_space &space = machine().device<cpu_device>("maincpu")->space(AS_PROGRAM);
space.install_read_bank(0x08000000, 0x09ffffff, 0, 0, "rom1");
space.install_read_bank(0x0a000000, 0x0bffffff, 0, 0, "rom2");
space.install_read_bank(0x0c000000, 0x0cffffff, 0, 0, "rom3");
m_maincpu->space(AS_PROGRAM).install_read_bank(0x08000000, 0x09ffffff, 0, 0, "rom1");
m_maincpu->space(AS_PROGRAM).install_read_bank(0x0a000000, 0x0bffffff, 0, 0, "rom2");
m_maincpu->space(AS_PROGRAM).install_read_bank(0x0c000000, 0x0cffffff, 0, 0, "rom3");
astring region_tag;
memory_region *cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GBASLOT_ROM_REGION_TAG));

View File

@ -52,6 +52,7 @@ public:
m_region_maincpu(*this, "maincpu"),
m_rambank(*this, "cgb_ram"),
m_inputs(*this, "INPUTS"),
m_bios_hack(*this, "SKIP_CHECK"),
m_ram(*this, RAM_TAG),
m_lcd(*this, "lcd") { }
@ -119,6 +120,7 @@ protected:
required_memory_region m_region_maincpu;
optional_memory_bank m_rambank; // cgb
required_ioport m_inputs;
required_ioport m_bios_hack;
optional_device<ram_device> m_ram;
required_device<gb_lcd_device> m_lcd;

View File

@ -140,7 +140,8 @@ public:
m_gbsound(*this, "custom"),
m_cart(*this, "cartslot"),
m_region_maincpu(*this, "maincpu"),
m_io_in0(*this, "IN0")
m_io_inputs(*this, "INPUTS"),
m_bios_hack(*this, "SKIP_CHECK")
{ }
required_device<cpu_device> m_maincpu;
@ -268,7 +269,8 @@ public:
protected:
required_memory_region m_region_maincpu;
required_ioport m_io_in0;
required_ioport m_io_inputs;
required_ioport m_bios_hack;
};