trunk/hash/gameboy.xml
r245666 | r245667 | |
8 | 8 | |
9 | 9 | Undumped pirate carts: |
10 | 10 | - 4B-003: Sachen 4-in-1 version 3 (Taiwan's Mahjong, Japan's Mahjong, Hong Kong's Mahjong, Store Tris) |
11 | | - 4B-004: Sachen 4-in-1 version 4 (Pile Wonder, Snake Roy, Suleiman's Treasure, Puppet Knight) |
12 | 11 | - GOWIN carts (see below the list of known games) |
13 | 12 | |
14 | 13 | --> |
r245666 | r245667 | |
23428 | 23427 | |
23429 | 23428 | <!-- Sachen carts --> |
23430 | 23429 | |
23431 | | <!-- This should contain Virus Attack, Electron World, Dice, Trouble Zone, but it currently does not work --> |
23432 | | <software name="4in1" supported="no"> |
23433 | | <description>4 in 1 (Euro, 4B-002)</description> |
| 23430 | <software name="4in1_001"> |
| 23431 | <description>4 in 1 (Euro, 4B-001)</description> |
23434 | 23432 | <year>19??</year> |
23435 | | <publisher><unlicensed></publisher> |
23436 | | <info name="serial" value="4B-002"/> |
| 23433 | <publisher>Sachen</publisher> |
| 23434 | <info name="serial" value="4B-001"/> |
23437 | 23435 | <part name="cart" interface="gameboy_cart"> |
23438 | | <feature name="slot" value="rom_mbc1" /> |
23439 | | <dataarea name="rom" size="65536"> |
23440 | | <rom name="4 in 1 (europe) (4b-002) (unl).bin" size="65536" crc="5e438db8" sha1="d9cb1721854709be7667f5dbce0adf2488c0919b" offset="000000" /> |
| 23436 | <feature name="slot" value="rom_sachen1" /> |
| 23437 | <dataarea name="rom" size="262144"> |
| 23438 | <rom name="4b-001.bin" size="262144" crc="82f06e93" sha1="7506c75fdfa29935afb1e85f5b6013516b2e9f92" offset="0" /> |
23441 | 23439 | </dataarea> |
23442 | 23440 | </part> |
23443 | 23441 | </software> |
23444 | 23442 | |
23445 | | <!-- Below we list the ripped games from Sachen multicarts (I assumed they come from a 4-in-1 cart, but they could come as well from a 8-in-1 cart). |
23446 | | They should be removed as soon as the carts are properly dumped and emulated --> |
23447 | | <software name="srider"> |
23448 | | <description>Street Rider (ripped from 4-in-1 4B-001)</description> |
| 23443 | <software name="4in1_002"> |
| 23444 | <description>4 in 1 (Euro, 4B-002)</description> |
23449 | 23445 | <year>19??</year> |
23450 | 23446 | <publisher>Sachen</publisher> |
| 23447 | <info name="serial" value="4B-002"/> |
23451 | 23448 | <part name="cart" interface="gameboy_cart"> |
23452 | | <dataarea name="rom" size="32768"> |
23453 | | <rom name="street rider (unl).bin" size="32768" crc="7751e066" sha1="b545cc60952176841590db7350479af8ec9d650e" offset="000000" /> |
| 23449 | <feature name="slot" value="rom_sachen1" /> |
| 23450 | <dataarea name="rom" size="65536"> |
| 23451 | <rom name="4 in 1 (europe) (4b-002) (unl).bin" size="65536" crc="5e438db8" sha1="d9cb1721854709be7667f5dbce0adf2488c0919b" offset="000000" /> |
23454 | 23452 | </dataarea> |
23455 | 23453 | </part> |
23456 | 23454 | </software> |
23457 | 23455 | |
23458 | | <software name="vexblock"> |
23459 | | <description>Vex Block (ripped from 4-in-1 4B-001)</description> |
| 23456 | <software name="4in1_004"> |
| 23457 | <description>4 in 1 (Euro, 4B-004)</description> |
23460 | 23458 | <year>19??</year> |
23461 | 23459 | <publisher>Sachen</publisher> |
| 23460 | <info name="serial" value="4B-004"/> |
23462 | 23461 | <part name="cart" interface="gameboy_cart"> |
23463 | | <dataarea name="rom" size="32768"> |
23464 | | <rom name="vex block (unl).bin" size="32768" crc="642aee97" sha1="869a81dbb555b2f815da5abb75304c70ce27b41c" offset="000000" /> |
| 23462 | <feature name="slot" value="rom_sachen1" /> |
| 23463 | <dataarea name="rom" size="262144"> |
| 23464 | <rom name="4b-004.bin" size="262144" crc="c69a19f6" sha1="ca7990dc03a3b3ada1dce37afc4490deaf872402" offset="0" /> |
23465 | 23465 | </dataarea> |
23466 | 23466 | </part> |
23467 | 23467 | </software> |
23468 | 23468 | |
23469 | | <software name="trapturn"> |
23470 | | <description>Trap & Turn (ripped from 4-in-1 4B-001)</description> |
| 23469 | <software name="4in1_005"> |
| 23470 | <description>4 in 1 (Euro, 4B-005)</description> |
23471 | 23471 | <year>19??</year> |
23472 | 23472 | <publisher>Sachen</publisher> |
| 23473 | <info name="serial" value="4B-005"/> |
23473 | 23474 | <part name="cart" interface="gameboy_cart"> |
23474 | | <dataarea name="rom" size="32768"> |
23475 | | <rom name="trap & turn (unl).bin" size="32768" crc="1c2fc6bf" sha1="822ab29560118eaa65586bbbef4ab7d64cbc9fae" offset="000000" /> |
| 23475 | <feature name="slot" value="rom_sachen1" /> |
| 23476 | <dataarea name="rom" size="262144"> |
| 23477 | <rom name="4b-005.bin" size="262144" crc="f4310eb3" sha1="2107979104cff88bcd635215a936bbc44354ea7c" offset="0" /> |
23476 | 23478 | </dataarea> |
23477 | 23479 | </part> |
23478 | 23480 | </software> |
23479 | 23481 | |
23480 | | <software name="duckadv"> |
23481 | | <description>Duck Adventures (ripped from 4-in-1 4B-001)</description> |
23482 | | <year>1993</year> |
| 23482 | <software name="4in1_006"> |
| 23483 | <description>4 in 1 (Euro, 4B-006)</description> |
| 23484 | <year>19??</year> |
23483 | 23485 | <publisher>Sachen</publisher> |
| 23486 | <info name="serial" value="4B-006"/> |
23484 | 23487 | <part name="cart" interface="gameboy_cart"> |
23485 | | <feature name="slot" value="rom_mbc1" /> |
23486 | | <dataarea name="rom" size="131072"> |
23487 | | <rom name="duck adventures (unl).bin" size="131072" crc="d25f3b3c" sha1="eae872c3f3e0d29dd18bc5c82f248e09af7a5888" offset="000000" /> |
| 23488 | <feature name="slot" value="rom_sachen1" /> |
| 23489 | <dataarea name="rom" size="262144"> |
| 23490 | <rom name="4b-006.bin" size="262144" crc="95398da5" sha1="2e856de768c7cb442a206de8c94a23548027bb60" offset="0" /> |
23488 | 23491 | </dataarea> |
23489 | 23492 | </part> |
23490 | 23493 | </software> |
23491 | 23494 | |
23492 | | <software name="azone"> |
23493 | | <description>Arctic Zone (ripped from 4-in-1 4B-005)</description> |
23494 | | <year>1993</year> |
23495 | | <publisher>Sachen</publisher> |
23496 | | <part name="cart" interface="gameboy_cart"> |
23497 | | <dataarea name="rom" size="32768"> |
23498 | | <rom name="arctic zone (unl).bin" size="32768" crc="eefe1001" sha1="0c1bf2e1aa03d9b856abc2f6d0f5ac8ced4c44e1" offset="000000" /> |
23499 | | </dataarea> |
23500 | | </part> |
23501 | | </software> |
23502 | | |
23503 | | <software name="mtower"> |
23504 | | <description>Magical Tower (ripped from 4-in-1 4B-005)</description> |
| 23495 | <software name="4in1_007" supported="no"> |
| 23496 | <description>4 in 1 (Euro, 4B-007)</description> |
23505 | 23497 | <year>19??</year> |
23506 | 23498 | <publisher>Sachen</publisher> |
| 23499 | <info name="serial" value="4B-007"/> |
23507 | 23500 | <part name="cart" interface="gameboy_cart"> |
23508 | | <feature name="slot" value="rom_mbc1" /> |
23509 | | <dataarea name="rom" size="65536"> |
23510 | | <rom name="magical tower (unl).bin" size="65536" crc="f157ae9e" sha1="c240182aef0ce365df3a61f0e0c417b7ea906200" offset="000000" /> |
| 23501 | <feature name="slot" value="rom_sachen1" /> |
| 23502 | <dataarea name="rom" size="262144"> |
| 23503 | <rom name="4b-007.bin" size="262144" crc="62d9350e" sha1="0eef7f3934508ab79e1cad4ddf3bfdb3216b6b4f" offset="0" /> |
23511 | 23504 | </dataarea> |
23512 | 23505 | </part> |
23513 | 23506 | </software> |
23514 | 23507 | |
23515 | | <software name="railway"> |
23516 | | <description>Railway (ripped from 4-in-1 4B-005)</description> |
| 23508 | <software name="4in1_008" supported="no"> |
| 23509 | <description>4 in 1 (Euro, 4B-008)</description> |
23517 | 23510 | <year>19??</year> |
23518 | 23511 | <publisher>Sachen</publisher> |
| 23512 | <info name="serial" value="4B-008"/> |
23519 | 23513 | <part name="cart" interface="gameboy_cart"> |
23520 | | <feature name="slot" value="rom_mbc1" /> |
23521 | | <dataarea name="rom" size="65536"> |
23522 | | <rom name="railway (unl).bin" size="65536" crc="a19ca3c1" sha1="6706d1da551ace91cedeb8a14f932c8e49ec87e6" offset="000000" /> |
| 23514 | <feature name="slot" value="rom_sachen1" /> |
| 23515 | <dataarea name="rom" size="262144"> |
| 23516 | <rom name="4b-008.bin" size="262144" crc="740e9bc8" sha1="d7c11d56a42ed7c4ef2fe3c752931a63160d7429" offset="0" /> |
23523 | 23517 | </dataarea> |
23524 | 23518 | </part> |
23525 | 23519 | </software> |
23526 | 23520 | |
23527 | | <software name="wormvis"> |
23528 | | <description>Worm Visitor (ripped from 4-in-1 4B-005)</description> |
| 23521 | <software name="4in1_009" supported="no"> |
| 23522 | <description>4 in 1 (Euro, 4B-009)</description> |
23529 | 23523 | <year>19??</year> |
23530 | 23524 | <publisher>Sachen</publisher> |
| 23525 | <info name="serial" value="4B-009"/> |
23531 | 23526 | <part name="cart" interface="gameboy_cart"> |
23532 | | <feature name="slot" value="rom_mbc1" /> |
23533 | | <dataarea name="rom" size="65536"> |
23534 | | <rom name="worm visitor (unl).bin" size="65536" crc="66130a7a" sha1="96819e9941ffa1bb8118df8ff4b57709a9c597e1" offset="000000" /> |
| 23527 | <feature name="slot" value="rom_sachen1" /> |
| 23528 | <dataarea name="rom" size="262144"> |
| 23529 | <rom name="4b-009.bin" size="262144" crc="114e1f1e" sha1="39743e21935a9115fcb4ee86d67d51bdb4b5f6d6" offset="0" /> |
23535 | 23530 | </dataarea> |
23536 | 23531 | </part> |
23537 | 23532 | </software> |
23538 | 23533 | |
23539 | | <software name="bombdisp"> |
23540 | | <description>Bomb Disposer (ripped from 4-in-1 4B-006)</description> |
23541 | | <year>1993</year> |
23542 | | <publisher>Sachen</publisher> |
23543 | | <part name="cart" interface="gameboy_cart"> |
23544 | | <dataarea name="rom" size="32768"> |
23545 | | <rom name="bomb disposer (unl).bin" size="32768" crc="c2a85d91" sha1="f39beb0cddceab0067cb468edca60cacd5ee5a37" offset="000000" /> |
23546 | | </dataarea> |
23547 | | </part> |
23548 | | </software> |
23549 | | |
23550 | | <software name="aforce"> |
23551 | | <description>A-Force (ripped from 4-in-1 4B-006)</description> |
23552 | | <year>1993</year> |
23553 | | <publisher>Sachen</publisher> |
23554 | | <part name="cart" interface="gameboy_cart"> |
23555 | | <feature name="slot" value="rom_mbc1" /> |
23556 | | <dataarea name="rom" size="65536"> |
23557 | | <rom name="a-force (unl).bin" size="65536" crc="776d03dc" sha1="b8fe29112be8108cf087a5a90f347c736ad38a39" offset="000000" /> |
23558 | | </dataarea> |
23559 | | </part> |
23560 | | </software> |
23561 | | |
23562 | | <software name="bftale"> |
23563 | | <description>Black Forest Tale (ripped from 4-in-1 4B-006)</description> |
23564 | | <year>1993</year> |
23565 | | <publisher>Sachen</publisher> |
23566 | | <part name="cart" interface="gameboy_cart"> |
23567 | | <feature name="slot" value="rom_mbc1" /> |
23568 | | <dataarea name="rom" size="65536"> |
23569 | | <rom name="black forest tale (unl).bin" size="65536" crc="3d4e1779" sha1="f5b46d061498b37e0c6eb0513c63720db17b5e52" offset="000000" /> |
23570 | | </dataarea> |
23571 | | </part> |
23572 | | </software> |
23573 | | |
23574 | | <software name="2ndspace"> |
23575 | | <description>2nd Space (ripped from 4-in-1 4B-006)</description> |
23576 | | <year>1993</year> |
23577 | | <publisher>Sachen</publisher> |
23578 | | <part name="cart" interface="gameboy_cart"> |
23579 | | <feature name="slot" value="rom_mbc1" /> |
23580 | | <dataarea name="rom" size="131072"> |
23581 | | <rom name="2nd space (unl).bin" size="131072" crc="1d0f279c" sha1="9424aa6b2d12b3729d1bf0e8602632fd780f9090" offset="000000" /> |
23582 | | </dataarea> |
23583 | | </part> |
23584 | | </software> |
23585 | | |
| 23534 | <!-- Below we list the ripped games from Sachen multicarts (I assumed they come from a 4-in-1 cart, but they could come as well from a 8-in-1 cart). |
| 23535 | They should be removed as soon as the carts are properly dumped and emulated --> |
23586 | 23536 | <software name="antsoldr" supported="partial"> |
23587 | 23537 | <description>Ant Soldier (ripped from 4-in-1 4B-007)</description> |
23588 | 23538 | <year>1993</year> |
trunk/hash/gbcolor.xml
r245666 | r245667 | |
12 | 12 | Undumped GBC protos: |
13 | 13 | - Jet Force Gemini |
14 | 14 | |
15 | | |
16 | | Undumped Pirates: |
17 | | - Sachen EB-004 Street Hero |
18 | | |
19 | 15 | Unreleased (music source code exists, possibly no prototypes exist) |
20 | 16 | - Crimson |
21 | 17 | - Hard Truck |
r245666 | r245667 | |
23541 | 23537 | </part> |
23542 | 23538 | </software> |
23543 | 23539 | |
| 23540 | |
| 23541 | <!-- also data from ThunderBlast Man --> |
| 23542 | <software name="jboy2a" cloneof="jboy2"> |
| 23543 | <description>Jurassic Boy II</description> |
| 23544 | <year>19??</year> |
| 23545 | <publisher>Sachen</publisher> |
| 23546 | <part name="cart" interface="gameboy_cart"> |
| 23547 | <feature name="slot" value="rom_mbc1" /> |
| 23548 | <dataarea name="rom" size="524288"> |
| 23549 | <rom name="jurassicboyii.bin" size="524288" crc="497be52b" sha1="4d7f15ed30dcc6ddeea1863ee8d786e3933ca92f" offset="0" /> |
| 23550 | </dataarea> |
| 23551 | </part> |
| 23552 | </software> |
| 23553 | |
| 23554 | <software name="rocmanx" supported="no"> |
| 23555 | <description>Rocman-X (Tw)</description> |
| 23556 | <year>19??</year> |
| 23557 | <publisher>Sachen</publisher> |
| 23558 | <part name="cart" interface="gameboy_cart"> |
| 23559 | <feature name="slot" value="rom_sachen2" /> |
| 23560 | <dataarea name="rom" size="524288"> |
| 23561 | <rom name="rocmanx.bin" size="524288" crc="7e1351cf" sha1="7e62472c13b5a6a933aa93dc5b239f11a664f337" offset="0" /> |
| 23562 | </dataarea> |
| 23563 | </part> |
| 23564 | </software> |
| 23565 | |
| 23566 | <software name="shero" supported="no"> |
| 23567 | <description>Street Hero (Tw)</description> |
| 23568 | <year>19??</year> |
| 23569 | <publisher>Sachen</publisher> |
| 23570 | <info name="serial" value="1B-004" /> |
| 23571 | <part name="cart" interface="gameboy_cart"> |
| 23572 | <feature name="slot" value="rom_sachen2" /> |
| 23573 | <dataarea name="rom" size="393216"> |
| 23574 | <rom name="1b-004.bin" size="393216" crc="b580cb1f" sha1="f80ffcaf0757f16ce0e6940a2ec786ebd7549458" offset="0" /> |
| 23575 | </dataarea> |
| 23576 | </part> |
| 23577 | </software> |
| 23578 | |
| 23579 | <software name="thundbmna" cloneof="thundbmn" supported="no"> |
| 23580 | <description>Thunder Blast Man (Euro)</description> |
| 23581 | <year>19??</year> |
| 23582 | <publisher>Sachen</publisher> |
| 23583 | <info name="serial" value="SA-114" /> |
| 23584 | <part name="cart" interface="gameboy_cart"> |
| 23585 | <feature name="slot" value="rom_sachen2" /> |
| 23586 | <dataarea name="rom" size="262144"> |
| 23587 | <rom name="thunderblastman_sa-114.bin" size="262144" crc="1a719ead" sha1="676b5f0a304fb83bc04921bc617b7485af529b38" offset="0" /> |
| 23588 | </dataarea> |
| 23589 | </part> |
| 23590 | </software> |
| 23591 | |
| 23592 | |
| 23593 | |
| 23594 | <software name="mc31t" supported="no"> |
| 23595 | <description>31 in 1 Mighty Mix (Tw)</description> |
| 23596 | <year>19??</year> |
| 23597 | <publisher><unknown></publisher> |
| 23598 | <part name="cart" interface="gameboy_cart"> |
| 23599 | <feature name="slot" value="rom_sachen2" /> |
| 23600 | <dataarea name="rom" size="2097152"> |
| 23601 | <rom name="31b-001_row.bin" size="2097152" crc="0eb8ddfb" sha1="8fa0d40dc4c239108304e8799413a69a5668404c" offset="0" /> |
| 23602 | </dataarea> |
| 23603 | </part> |
| 23604 | </software> |
| 23605 | |
| 23606 | <software name="mc31" supported="no"> |
| 23607 | <description>31-in-1 Mighty Mix (Aus)</description> |
| 23608 | <year>19??</year> |
| 23609 | <publisher>Sachen</publisher> |
| 23610 | <part name="cart" interface="gameboy_cart"> |
| 23611 | <feature name="slot" value="rom_sachen2" /> |
| 23612 | <dataarea name="rom" size="2097152"> |
| 23613 | <rom name="31b-001_tw.bin" size="2097152" crc="21524051" sha1="c0c2a65b1485a2768962cb97ba2f9b668528453a" offset="0" /> |
| 23614 | </dataarea> |
| 23615 | </part> |
| 23616 | </software> |
| 23617 | |
| 23618 | |
| 23619 | |
23544 | 23620 | <!-- GOWIN games --> |
23545 | 23621 | <!-- |
23546 | 23622 | |
trunk/src/emu/bus/gameboy/mbc.c
r245666 | r245667 | |
23 | 23 | const device_type GB_ROM_MBC6 = &device_creator<gb_rom_mbc6_device>; |
24 | 24 | const device_type GB_ROM_MBC7 = &device_creator<gb_rom_mbc7_device>; |
25 | 25 | const device_type GB_ROM_MMM01 = &device_creator<gb_rom_mmm01_device>; |
| 26 | const device_type GB_ROM_SACHEN1 = &device_creator<gb_rom_sachen1_device>; |
| 27 | const device_type GB_ROM_SACHEN2 = &device_creator<gb_rom_sachen1_device>; // Just a placeholder for the moment... |
26 | 28 | const device_type GB_ROM_188IN1 = &device_creator<gb_rom_188in1_device>; |
27 | 29 | const device_type GB_ROM_SINTAX = &device_creator<gb_rom_sintax_device>; |
28 | 30 | const device_type GB_ROM_CHONGWU = &device_creator<gb_rom_chongwu_device>; |
r245666 | r245667 | |
87 | 89 | { |
88 | 90 | } |
89 | 91 | |
| 92 | gb_rom_sachen1_device::gb_rom_sachen1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
| 93 | : gb_rom_mbc1_device(mconfig, GB_ROM_SACHEN1, "GB Sachen MMC1 Carts", tag, owner, clock, "gb_rom_sachen1", __FILE__) |
| 94 | { |
| 95 | } |
| 96 | |
90 | 97 | gb_rom_188in1_device::gb_rom_188in1_device(const machine_config &mconfig, const char *tag, device_t *owner, UINT32 clock) |
91 | 98 | : gb_rom_mbc1_device(mconfig, GB_ROM_188IN1, "GB 188in1", tag, owner, clock, "gb_rom_188in1", __FILE__) |
92 | 99 | { |
r245666 | r245667 | |
206 | 213 | m_reg = 0; |
207 | 214 | } |
208 | 215 | |
| 216 | void gb_rom_sachen1_device::device_start() |
| 217 | { |
| 218 | shared_start(); |
| 219 | save_item(NAME(m_base_bank)); |
| 220 | save_item(NAME(m_mask)); |
| 221 | } |
| 222 | |
| 223 | void gb_rom_sachen1_device::device_reset() |
| 224 | { |
| 225 | shared_reset(); |
| 226 | m_base_bank = 0; |
| 227 | m_mask = 0; |
| 228 | } |
| 229 | |
209 | 230 | void gb_rom_sintax_device::device_start() |
210 | 231 | { |
211 | 232 | shared_start(); |
r245666 | r245667 | |
280 | 301 | |
281 | 302 | WRITE8_MEMBER(gb_rom_mbc1_device::write_bank) |
282 | 303 | { |
283 | | if (offset < 0x2000) // RAM Enable Register |
284 | | m_ram_enable = ((data & 0x0f) == 0x0a) ? 1 : 0; |
285 | | else if (offset < 0x4000) // ROM Bank Register |
| 304 | // the mapper only uses inputs A13-A15 |
| 305 | switch (offset & 0xe000) |
286 | 306 | { |
287 | | data &= 0x1f; |
288 | | m_latch_bank2 = data ? data : 0x01u; |
289 | | m_latch_bank2 &= m_mask; |
| 307 | case 0x0000: // RAM Enable Register |
| 308 | m_ram_enable = ((data & 0x0f) == 0x0a) ? 1 : 0; |
| 309 | break; |
| 310 | case 0x2000: // ROM Bank Register |
| 311 | data &= 0x1f; |
| 312 | m_latch_bank2 = data ? data : 1; |
| 313 | m_latch_bank2 &= m_mask; |
| 314 | break; |
| 315 | case 0x4000: // RAM Bank Register |
| 316 | m_ram_bank = data & 0x3; |
| 317 | break; |
| 318 | case 0x6000: // MBC1 Mode Register |
| 319 | default: |
| 320 | m_mode = (data & 0x1) ? MODE_4M_256k : MODE_16M_8k; |
| 321 | break; |
290 | 322 | } |
291 | | else if (offset < 0x6000) // RAM Bank Register |
292 | | m_ram_bank = data & 0x3; |
293 | | else // MBC1 Mode Register |
294 | | m_mode = (data & 0x1) ? MODE_4M_256k : MODE_16M_8k; |
295 | 323 | } |
296 | 324 | |
297 | 325 | READ8_MEMBER(gb_rom_mbc1_device::read_ram) |
r245666 | r245667 | |
632 | 660 | } |
633 | 661 | } |
634 | 662 | |
| 663 | |
| 664 | // Sachen MMC1 |
| 665 | |
| 666 | READ8_MEMBER(gb_rom_sachen1_device::read_rom) |
| 667 | { |
| 668 | if (offset < 0x4000) |
| 669 | return m_rom[rom_bank_map[(m_base_bank & m_mask) | (m_latch_bank & ~m_mask)] * 0x4000 + (offset & 0x3fff)]; |
| 670 | else |
| 671 | return m_rom[rom_bank_map[(m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)] * 0x4000 + (offset & 0x3fff)]; |
| 672 | } |
| 673 | |
| 674 | WRITE8_MEMBER(gb_rom_sachen1_device::write_bank) |
| 675 | { |
| 676 | if (offset < 0x2000) // Base ROM Bank register |
| 677 | { |
| 678 | if ((m_latch_bank2 & 0x30) == 0x30 && data) |
| 679 | m_base_bank = data & 0x0f; |
| 680 | //logerror("write to base bank %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); |
| 681 | } |
| 682 | else if (offset < 0x4000) // ROM Bank Register |
| 683 | { |
| 684 | m_latch_bank2 = data ? data : 1; |
| 685 | //logerror("write to latch %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); |
| 686 | } |
| 687 | else if (offset < 0x6000) // ROM bank mask register |
| 688 | { |
| 689 | if ((m_latch_bank2 & 0x30) == 0x30) |
| 690 | m_mask = data; |
| 691 | //logerror("write to mask %X - %X\n", data, (m_base_bank & m_mask) | (m_latch_bank2 & ~m_mask)); |
| 692 | } |
| 693 | // nothing happens when writing to 0x6000-0x7fff, as verified by Tauwasser |
| 694 | } |
| 695 | |
| 696 | |
635 | 697 | // 188 in 1 pirate (only preliminary) |
636 | 698 | |
637 | 699 | READ8_MEMBER(gb_rom_188in1_device::read_rom) |