Previous 199869 Revisions Next

r32549 Sunday 5th October, 2014 at 09:12:16 UTC by Fabio Priuli
(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.
[hash]gameboy.xml gba.xml gbcolor.xml
[src/emu/bus/gameboy]gb_slot.c
[src/mess/drivers]gb.c gba.c
[src/mess/includes]gb.h gba.h

trunk/hash/gbcolor.xml
r32548r32549
2327323273These were produced between 2000 and 2001 by Rocket Games, run by Datel Design
2327423274-->
2327523275
23276   <software name="atvrackj" supported="no">
23276   <software name="atvrackj" supported="partial">
2327723277      <!-- Notes: GBC only -->
2327823278      <description>ATV Racing &amp; Karate Joe (Euro)</description>
2327923279      <year>200?</year>
2328023280      <publisher>Rocket Games</publisher>
23281      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2328123282      <part name="cart" interface="gameboy_cart">
2328223283         <feature name="slot" value="rom_atvrac" />
2328323284         <dataarea name="rom" size="524288">
r32548r32549
2328823289      </part>
2328923290   </software>
2329023291
23291   <software name="atvrackja" cloneof="atvrackj" supported="no">
23292   <software name="atvrackja" cloneof="atvrackj" supported="partial">
2329223293      <!-- Notes: GBC only -->
2329323294      <description>ATV Racing &amp; Karate Joe (Euro, Alt)</description>
2329423295      <year>200?</year>
2329523296      <publisher>Rocket Games</publisher>
23297      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2329623298      <part name="cart" interface="gameboy_cart">
2329723299         <feature name="slot" value="rom_atvrac" />
2329823300         <dataarea name="rom" size="524288">
r32548r32549
2330323305      </part>
2330423306   </software>
2330523307
23306   <software name="atvracin" supported="no">
23308   <software name="atvracin">
2330723309      <description>ATV Racing (Euro)</description>
2330823310      <year>2001</year>
2330923311      <publisher>Rocket Games</publisher>
23312      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2331023313      <part name="cart" interface="gameboy_cart">
2331123314         <feature name="slot" value="rom_atvrac" />
2331223315         <dataarea name="rom" size="262144">
r32548r32549
2331723320      </part>
2331823321   </software>
2331923322
23320   <software name="fullhang" supported="no">
23323   <software name="fullhang" supported="partial">
2332123324      <!-- Notes: GBC only -->
2332223325      <description>Full Time Soccer &amp; Hang Time Basketball (Euro)</description>
2332323326      <year>200?</year>
2332423327      <publisher>Rocket Games</publisher>
23328      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2332523329      <part name="cart" interface="gameboy_cart">
2332623330         <feature name="slot" value="rom_atvrac" />
2332723331         <dataarea name="rom" size="524288">
r32548r32549
2333223336      </part>
2333323337   </software>
2333423338
23335   <software name="fulltime" supported="no">
23339   <software name="fulltime">
2333623340      <description>Full Time Soccer (Euro)</description>
2333723341      <year>2000</year>
2333823342      <publisher>Rocket Games</publisher>
23343      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2333923344      <part name="cart" interface="gameboy_cart">
2334023345         <feature name="slot" value="rom_atvrac" />
2334123346         <dataarea name="rom" size="262144">
r32548r32549
2334623351      </part>
2334723352   </software>
2334823353
23349<!-- This has been hacked to run on MBC01 mapper -->
23350   <software name="fulltimeh" cloneof="fulltime">
23351      <description>Full Time Soccer (Euro, Hacked)</description>
23352      <year>2000</year>
23353      <publisher>Rocket Games</publisher>
23354      <part name="cart" interface="gameboy_cart">
23355         <feature name="slot" value="rom_mbc1" />
23356         <dataarea name="rom" size="262144">
23357            <rom name="full time soccer (hacked) (unl).bin" size="262144" crc="655476f9" sha1="0d6c5f931223ea393a3f6bc1ecd1a18c1f889273" offset="000000" />
23358         </dataarea>
23359      </part>
23360   </software>
23361
23362   <software name="hangtime" supported="no">
23354   <software name="hangtime">
2336323355      <!-- Notes: GBC only -->
2336423356      <description>Hang Time Basketball (Euro)</description>
2336523357      <year>200?</year>
2336623358      <publisher>Rocket Games</publisher>
23359      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2336723360      <part name="cart" interface="gameboy_cart">
2336823361         <feature name="slot" value="rom_atvrac" />
2336923362         <dataarea name="rom" size="262144">
r32548r32549
2337423367      </part>
2337523368   </software>
2337623369
23377   <software name="pocksmrt" supported="no">
23370   <software name="pocksmrt" supported="partial">
2337823371      <!-- Notes: GBC only -->
2337923372      <description>Pocket Smash Out &amp; Race Time (Euro)</description>
2338023373      <year>200?</year>
2338123374      <publisher>Rocket Games</publisher>
23375      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2338223376      <part name="cart" interface="gameboy_cart">
2338323377         <feature name="slot" value="rom_atvrac" />
2338423378         <dataarea name="rom" size="524288">
r32548r32549
2339223386      <description>Pocket Smash Out (Euro)</description>
2339323387      <year>200?</year>
2339423388      <publisher>Rocket Games</publisher>
23389      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2339523390      <part name="cart" interface="gameboy_cart">
2339623391         <feature name="slot" value="rom_atvrac" />
2339723392         <dataarea name="rom" size="262144">
r32548r32549
2340223397      </part>
2340323398   </software>
2340423399
23405   <software name="karatej" supported="no">
23400   <software name="karatej" supported="partial">
2340623401      <!-- Notes: GBC only -->
2340723402      <description>Karate Joe (Euro)</description>
2340823403      <year>200?</year>
2340923404      <publisher>Rocket Games</publisher>
23405      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2341023406      <part name="cart" interface="gameboy_cart">
2341123407         <feature name="slot" value="rom_atvrac" />
2341223408         <dataarea name="rom" size="262144">
r32548r32549
2341523411      </part>
2341623412   </software>
2341723413
23418   <software name="painter" supported="no">
23414   <software name="painter">
2341923415      <description>Painter (Euro)</description>
2342023416      <year>200?</year>
2342123417      <publisher>Rocket Games</publisher>
23418      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2342223419      <part name="cart" interface="gameboy_cart">
2342323420         <feature name="slot" value="rom_atvrac" />
2342423421         <dataarea name="rom" size="262144">
r32548r32549
2342723424      </part>
2342823425   </software>
2342923426
23430   <software name="racetime" supported="no">
23427   <software name="racetime">
2343123428      <!-- Notes: GBC only -->
2343223429      <description>Race Time (Euro)</description>
2343323430      <year>200?</year>
2343423431      <publisher>Rocket Games</publisher>
23432      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2343523433      <part name="cart" interface="gameboy_cart">
2343623434         <feature name="slot" value="rom_atvrac" />
2343723435         <dataarea name="rom" size="262144">
r32548r32549
2344023438      </part>
2344123439   </software>
2344223440
23443<!-- This has been hacked to run on MBC01 mapper -->
23444   <software name="racetimeh" cloneof="racetime">
23441   <software name="sinkj" supported="partial">
2344523442      <!-- Notes: GBC only -->
23446      <description>Race Time (Euro, Hacked)</description>
23447      <year>200?</year>
23448      <publisher>Rocket Games</publisher>
23449      <part name="cart" interface="gameboy_cart">
23450         <feature name="slot" value="rom_mbc1" />
23451         <dataarea name="rom" size="262144">
23452            <rom name="race time (hacked) (unl).bin" size="262144" crc="8a5fa98c" sha1="8d8d6c3f5545edbd50813a22fb666c106ceb140b" offset="000000" />
23453         </dataarea>
23454      </part>
23455   </software>
23456
23457   <software name="sinkj" supported="no">
23458      <!-- Notes: GBC only -->
2345923443      <description>Space Invasion &amp; Karate Joe (Euro)</description>
2346023444      <year>200?</year>
2346123445      <publisher>Rocket Games</publisher>
23446      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2346223447      <part name="cart" interface="gameboy_cart">
2346323448         <feature name="slot" value="rom_atvrac" />
2346423449         <dataarea name="rom" size="524288">
r32548r32549
2346923454      </part>
2347023455   </software>
2347123456
23472   <software name="sinpntr" supported="no">
23457   <software name="sinpntr" supported="partial">
2347323458      <!-- Notes: GBC only -->
2347423459      <description>Space Invasion &amp; Painter (Euro)</description>
2347523460      <year>200?</year>
2347623461      <publisher>Rocket Games</publisher>
23462      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2347723463      <part name="cart" interface="gameboy_cart">
2347823464         <feature name="slot" value="rom_atvrac" />
2347923465         <dataarea name="rom" size="524288">
r32548r32549
2348423470      </part>
2348523471   </software>
2348623472
23487   <software name="sinvasn" supported="no">
23473   <software name="sinvasn" supported="partial">
2348823474      <!-- Notes: GBC only -->
2348923475      <description>Space Invasion (Euro)</description>
2349023476      <year>200?</year>
2349123477      <publisher>Rocket Games</publisher>
23478      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2349223479      <part name="cart" interface="gameboy_cart">
2349323480         <feature name="slot" value="rom_atvrac" />
2349423481         <dataarea name="rom" size="131072">
r32548r32549
2405824045      </part>
2405924046   </software>
2406024047
24061   <software name="iceage2a" cloneof="iceage2" supported="no">
24048   <software name="iceage2a" cloneof="iceage2">
2406224049      <description>Ice Age II (Chi)</description>
2406324050      <year>20??</year>
2406424051      <publisher>Sintax</publisher>
24052      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2406524053      <part name="cart" interface="gameboy_cart">
2406624054         <feature name="slot" value="rom_mbc5" />
2406724055         <!-- cartridge ram -->
r32548r32549
2548725475      </part>
2548825476   </software>
2548925477
25490<!-- works on gbpocket -->
2549125478   <software name="sqsd">
2549225479      <!-- Alt. Title: 石器時代 精靈王誕生 (Stone Age - Birth of the Goblin King) -->
2549325480      <description>Shi Qi Shi Dai - Jing Ling Wang Dan Sheng (Chi)</description>
2549425481      <year>20??</year>
2549525482      <publisher>GOWIN</publisher>
25483      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
2549625484      <part name="cart" interface="gameboy_cart">
2549725485         <feature name="slot" value="rom_yong" />
2549825486         <!-- cartridge ram -->
2549925487         <dataarea name="rom" size="4194304">
2550025488            <rom name="stone age (unl).bin" size="4194304" crc="e7d9d377" sha1="f88f605960c1573aa8bc5fafab19014b0d987729" offset="000000" />
2550125489         </dataarea>
25502         <dataarea name="nvram" size="8192">
25490         <dataarea name="nvram" size="8192"> <!-- or 65536 ? -->
2550325491         </dataarea>
2550425492      </part>
2550525493   </software>
2550625494
25507<!-- works on gbpocket -->
25508   <software name="sqsdh" cloneof="sqsd">
25509      <!-- Alt. Title: 石器時代 精靈王誕生 (Stone Age - Birth of the Goblin King) -->
25510      <description>Shi Qi Shi Dai - Jing Ling Wang Dan Sheng (Chi, Hacked?)</description>
25511      <year>20??</year>
25512      <publisher>GOWIN</publisher>
25513      <part name="cart" interface="gameboy_cart">
25514         <feature name="slot" value="rom_yong" />
25515         <!-- cartridge ram -->
25516         <dataarea name="rom" size="4194304">
25517            <rom name="stone age (unl)(hacked).bin" size="4194304" crc="2ffe697c" sha1="b992f280b5dd2095c8f430282c5dba69c6a10eb4" offset="000000" />
25518         </dataarea>
25519         <dataarea name="nvram" size="65536">
25520         </dataarea>
25521      </part>
25522   </software>
25523
2552425495   <software name="dquest4">
2552525496      <description>Dragon Quest 4 - Yongzhe Dou E Long 4 (Chi)</description>
2552625497      <year>20??</year>
trunk/hash/gameboy.xml
r32548r32549
1725717257      </part>
1725817258   </software>
1725917259
17260<!-- does this fails the internal BIOS check? -->
17261   <software name="rockmanp" cloneof="megaman" supported="no">
17260   <software name="rockmanp" cloneof="megaman">
1726217261      <description>Rockman World (Jpn, Prototype)</description>
1726317262      <year>1991</year>
1726417263      <publisher>Capcom</publisher>
1726517264      <info name="alt_title" value="ロックマンワールド"/>
17265      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
1726617266      <part name="cart" interface="gameboy_cart">
1726717267         <feature name="slot" value="rom_mbc1" />
1726817268         <dataarea name="rom" size="262144">
trunk/hash/gba.xml
r32548r32549
3503635036      <year>2003</year>
3503735037      <publisher>Empire Entertainment</publisher>
3503835038      <part name="cart" interface="gba_cart">
35039         <feature name="slot" value="gba_eeprom_4k" />
3503935040         <dataarea name="rom" size="4231928">
3504035041            <rom name="starsky &amp; hutch (usa) (beta).bin" size="4231928" crc="ab142d2e" sha1="861066ddf8b52be194b30cbb70e959989f0a2f76" offset="000000" />
3504135042         </dataarea>
r32548r32549
3843938440      </part>
3844038441   </software>
3844138442
38442   <software name="tyrian2k" supported="no">
38443   <software name="tyrian2k">
3844338444      <description>Tyrian 2000 (USA, Prototype)</description>
3844438445      <year>19??</year>
3844538446      <publisher>Stealth Productions</publisher>
38447      <info name="usage" value="Enable 'Skip BIOS check' configuration setting to boot"/>
3844638448      <part name="cart" interface="gba_cart">
3844738449         <dataarea name="rom" size="2681544">
3844838450            <rom name="tyrian 2000 (usa) (proto).bin" size="2681544" crc="e5acba28" sha1="5148f40a58bc3d4512aced0f052f64b8c883ba87" offset="000000" />
trunk/src/emu/bus/gameboy/gb_slot.c
r32548r32549
294294      offset = 0;
295295      if (get_mmm01_candidate(ROM, len))
296296         offset = len - 0x8000;
297      int type;
298297
299298      if (software_entry() != NULL)
300         type = gb_get_pcb_id(get_feature("slot") ? get_feature("slot") : "rom");
299         m_type = gb_get_pcb_id(get_feature("slot") ? get_feature("slot") : "rom");
301300      else
302         type = get_cart_type(ROM + offset, len - offset);
301         m_type = get_cart_type(ROM + offset, len - offset);
303302
304
305303      // setup RAM/NVRAM/RTC/RUMBLE
306304      if (software_entry() != NULL)
307305      {
r32548r32549
371369               break;
372370         }
373371
374         if (type == GB_MBC_MBC2 ||  type == GB_MBC_MBC7)
372         if (m_type == GB_MBC_MBC2 ||  m_type == GB_MBC_MBC7)
375373            rambanks = 1;
376374      }
377375
r32548r32549
384382      if (m_cart->get_ram_size() && m_cart->get_has_battery())
385383         battery_load(m_cart->get_ram_base(), m_cart->get_ram_size(), 0xff);
386384
387      //printf("Type: %s\n", gb_get_slot(type));
385      //printf("Type: %s\n", gb_get_slot(m_type));
388386
389387      internal_header_logging(ROM + offset, len);
390388
r32548r32549
566564
567565   return type;
568566}
567
569568/*-------------------------------------------------
570569 get default card software
571570 -------------------------------------------------*/
trunk/src/mess/drivers/gba.c
r32548r32549
894894      case 0x0130/4:
895895         if( (mem_mask) & 0x0000ffff )   // KEYINPUT
896896         {
897            retval = m_io_in0->read();
897            retval = m_io_inputs->read();
898898         }
899899         else if( (mem_mask) & 0xffff0000 )
900900         {
r32548r32549
18861886READ32_MEMBER(gba_state::gba_bios_r)
18871887{
18881888   UINT32 *rom = (UINT32 *)(*m_region_maincpu);
1889   if (m_bios_hack->read())
1890   {
1891      // partially patch out logo and checksum checks
1892      // (useful to run some protos + to test homebrew)
1893      if (ACCESSING_BITS_0_15 && (offset == 0x6fc/4))
1894         return 0;
1895   }
1896
18891897   if (m_bios_protected != 0)
1890   {
18911898      offset = (m_bios_last_address + 8) / 4;
1892   }
1893   return rom[offset&0x3fff];
1899   
1900   return rom[offset & 0x3fff];
18941901}
18951902
18961903READ32_MEMBER(gba_state::gba_10000000_r)
r32548r32549
19251932ADDRESS_MAP_END
19261933
19271934static INPUT_PORTS_START( gbadv )
1928   PORT_START("IN0")
1935   PORT_START("INPUTS")
19291936   PORT_BIT( 0xfc00, IP_ACTIVE_HIGH, IPT_BUTTON5) PORT_UNUSED
19301937   PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON3 ) PORT_NAME("P1 L") PORT_PLAYER(1) // L
19311938   PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_BUTTON4 ) PORT_NAME("P1 R") PORT_PLAYER(1) // R
r32548r32549
19371944   PORT_BIT( 0x0004, IP_ACTIVE_LOW, IPT_SELECT ) PORT_PLAYER(1)    // SELECT
19381945   PORT_BIT( 0x0002, IP_ACTIVE_LOW, IPT_BUTTON1 ) PORT_NAME("B") PORT_PLAYER(1)    // B
19391946   PORT_BIT( 0x0001, IP_ACTIVE_LOW, IPT_BUTTON2 ) PORT_NAME("A") PORT_PLAYER(1)    // A
1947
1948   PORT_START("SKIP_CHECK")
1949   PORT_CONFNAME( 0x01, 0x00, "[HACK] Skip BIOS Logo check" )
1950   PORT_CONFSETTING(    0x00, DEF_STR( Off ) )
1951   PORT_CONFSETTING(    0x01, DEF_STR( On ) )
19401952INPUT_PORTS_END
19411953
19421954
r32548r32549
21212133   // install the cart ROM & SRAM into the address map, if present
21222134   if (m_cart->exists())
21232135   {
2124      address_space &space = machine().device<cpu_device>("maincpu")->space(AS_PROGRAM);
2125      space.install_read_bank(0x08000000, 0x09ffffff, 0, 0, "rom1");
2126      space.install_read_bank(0x0a000000, 0x0bffffff, 0, 0, "rom2");
2127      space.install_read_bank(0x0c000000, 0x0cffffff, 0, 0, "rom3");
2136      m_maincpu->space(AS_PROGRAM).install_read_bank(0x08000000, 0x09ffffff, 0, 0, "rom1");
2137      m_maincpu->space(AS_PROGRAM).install_read_bank(0x0a000000, 0x0bffffff, 0, 0, "rom2");
2138      m_maincpu->space(AS_PROGRAM).install_read_bank(0x0c000000, 0x0cffffff, 0, 0, "rom3");
21282139
21292140      astring region_tag;
21302141      memory_region *cart_rom = memregion(region_tag.cpy(m_cart->tag()).cat(GBASLOT_ROM_REGION_TAG));
trunk/src/mess/drivers/gb.c
r32548r32549
436436      if (offset < 0x100)
437437      {
438438         UINT8 *ROM = m_region_maincpu->base();
439         if (m_bios_hack->read())
440         {
441            // patch out logo and checksum checks
442            // (useful to run some pirate carts until we implement
443            // their complete functionalities + to test homebrew)
444            if (offset == 0xe9 || offset == 0xea)
445               return 0x00;
446            if (offset == 0xfa || offset == 0xfb)
447               return 0x00;
448         }
439449         return ROM[offset];
440450      }
441451      else if (m_cartslot)
r32548r32549
456466      if (offset < 0x100)
457467      {
458468         UINT8 *ROM = m_region_maincpu->base();
469         if (m_bios_hack->read())
470         {
471            // patch out logo and checksum checks
472            // (useful to run some pirate carts until we implement
473            // their complete functionalities + to test homebrew)
474            if (offset == 0xdb || offset == 0xdc)
475               return 0x00;
476            if (offset == 0xed || offset == 0xee)
477               return 0x00;
478         }
459479         return ROM[offset];
460480      }
461481      else if (offset >= 0x200 && offset < 0x900)
r32548r32549
607627   PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_NAME("Button B")
608628   PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_START) PORT_NAME("Start")
609629   PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SELECT) PORT_NAME("Select")
630
631   PORT_START("SKIP_CHECK")
632   PORT_CONFNAME( 0x01, 0x00, "[HACK] Skip BIOS Logo check" )
633   PORT_CONFSETTING(    0x00, DEF_STR( Off ) )
634   PORT_CONFSETTING(    0x01, DEF_STR( On ) )
635
610636INPUT_PORTS_END
611637
612638static SLOT_INTERFACE_START(gb_cart)
trunk/src/mess/includes/gb.h
r32548r32549
5252      m_region_maincpu(*this, "maincpu"),
5353      m_rambank(*this, "cgb_ram"),
5454      m_inputs(*this, "INPUTS"),
55      m_bios_hack(*this, "SKIP_CHECK"),
5556      m_ram(*this, RAM_TAG),
5657      m_lcd(*this, "lcd") { }
5758
r32548r32549
119120   required_memory_region m_region_maincpu;
120121   optional_memory_bank m_rambank;   // cgb
121122   required_ioport m_inputs;
123   required_ioport m_bios_hack;
122124   optional_device<ram_device> m_ram;
123125   required_device<gb_lcd_device> m_lcd;
124126
trunk/src/mess/includes/gba.h
r32548r32549
140140      m_gbsound(*this, "custom"),
141141      m_cart(*this, "cartslot"),
142142      m_region_maincpu(*this, "maincpu"),
143      m_io_in0(*this, "IN0")
143      m_io_inputs(*this, "INPUTS"),
144      m_bios_hack(*this, "SKIP_CHECK")
144145   { }
145146
146147   required_device<cpu_device> m_maincpu;
r32548r32549
268269
269270protected:
270271   required_memory_region m_region_maincpu;
271   required_ioport m_io_in0;
272   required_ioport m_io_inputs;
273   required_ioport m_bios_hack;
272274};
273275
274276

Previous 199869 Revisions Next


© 1997-2024 The MAME Team