Skip to content

Commit

Permalink
Add mapper ocornut#50 MAPPER_GG_Super_16_in_1_Columns_FFFx for "Gam…
Browse files Browse the repository at this point in the history
…e Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)"

Mostly working other than some glitchiness around native-GG/SMS-GG mode switching

---

I've been calling it "Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)" but the actual name is unclear

The label says:

GAME GEAR
SUPER 16 IN 1

The menu heading is in Chinese and fairly low-resolution. I am illiterate but I think it says:

無敵系列 (wúdí xìliè, i.e. "invincible series")

One of my cartridges came very used and loose, the other with the cartridge in good condition in a somewhat damaged box. Both contain the same bits

The box is reversible so that it can be displayed in either English or Chinese orientation.

The top of the box in Chinese orientation says:

超級16盒1 (chāojí 16 hé 1, i.e. "super 16 box 1" which is homophonous with 超級16合1, i.e. "super 16 in 1")

The top of the box in English orientation says:

SUPER 16 IN 1

The front of the box in English orientation says:

GAME GEAR
SUPER 16 IN 1
GAMES SELECT ON SCREEN

The front of the box in Chinese orientation says:

GAME GEAR
SUPER 16 IN 1
畫面選擇遊戲 (huàmiàn xuǎnzé yóuxì, i.e. "screen selection games" or so)

The box has game lists in both English and Traditional Chinese.

The box side in English orientation has a game list in English:
- Satellite-7
- Baseball
- Action Boy
- Teddyboy Blue
- Soccer
- Machine Gun
- Pengo
- Bank Panic
- Pit Pot
- Hang On
- Spy Vs Spy
- Ghost House
- Super Tennis
- Astro Flash
- Woody Pop
- Columns

The box side in Chinese orientation has a game list in Traditional Chinese. Google machine transcription, accuracy unknown:

1. 寶石方塊
2. 企鵝推冰
3. 玩具磁磚
4. 瘋狂電單車
5. 溫布頓網球
6. 星空奇遇
7. 甲子元棒球
8. 街頭小霸王
9. 滅蟲英雄
10. 五人足球
11. 宇宙小子
12. 黑白雙雄
13. 鬼屋驚魂
14. 域星戰記
15. 槍俠阿祖
16. 銀行警匪戰

The cartridge label has a game list in Traditional Chinese in a different order. Google machine transcription, accuracy unknown:

滅蟲英雄
鬼屋驚魂
寶石方塊
五人足球
域星戰記
企鵝推冰
宇宙小子
槍俠阿祖
玩具磁磚
黑白雙雄
銀行警匪戰
瘋狂電單車
星空奇遇
溫布頓網球
甲子元棒球
街頭小霸王

This is a 512KB ROM containing a menu system and 16 games -- three 32KB Game Gear games and thirteen 32KB SMS games. The games: GG: Columns (J) (Alt), Pengo (JP), Woody Pop [v0] (JP); SMS: Bank Panic (Europe), Great Baseball [JP] (JP), Ghost House (UE), Hang-On (Europe), Comical Machine Gun Joe (JP), My Hero (US,EU,BR,PT,DE,IT), Fushigi no Oshiro Pit Pot (JP,KR), Super Tennis (USA, Europe), Satellite 7 (J), Great Soccer (JP), Spy vs Spy (JP,KR), Teddy Boy (UE), Trans-Bot (UE)

Dumping script:
```
// Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)
local dump_bias = (use_ggs16_columns - 1) * max_dump_size;
for (local offset = 0; offset < rom_size; offset += 0x8000) {
    local page = (offset + dump_bias) / 0x8000;

    cpu_write(d, 0xffff, 0x40 | ((page & 0x0c) << 2));
    cpu_write(d, 0xffff, (page & 0x03) << 4);

    cpu_read(d, 0x0000, 0x8000);
}
```

The mapper apparently supports a single reconfigurable segment, the 32KB region 0x0000..0x7FFF. Paging writes seem to be 0xFFFF and 0xFFFE but their meanings are not yet fully understood. Menu behavior suggests both addresses refer to the same register.

Menu code suggests the mapper supports two different modes: "menu" mode, and "Sega" mode. The initial mode is "menu" mode.

Writes to 0xFFF0...0xFFFF (aliased) are configuration writes. Value bit meanings:
- (Value & 0xC0) == 0xC0: switch to "Sega" mode if data bit 0x10 is set, "menu" mode otherwise
- (Value & 0xC0) == 0x80: configure SMS-GG mode if data bit 0x10 is set, native-GG mode otherwise
- (Value & 0xC0) == 0x40: write upper two bits of mapper base page using data bits 0x30
- (Value & 0xC0) == 0x00:
  - in "menu" mode: write lower two bits of mapper base page using data bits 0x30

The low bits (Value & 0x0F) of writes to 0xFFFE and 0xFFFF configure 16KB page offsets from the base page, Sega-style. However these are only actually active while in "Sega" mode.

The menu system is spread across eight of the games, squeezed into otherwise-unused areas of their ROMs. The mapper and menu code are both somewhat obfuscated

On startup the cartridge presents a version of Columns slightly modified to bootstrap the menu system. This version of Columns is still playable by jumping to 0x007E. The first-phase ROM bootstrap copies a slightly longer second-phase bootstrap into RAM and then jumps to it. The second-phase bootstrap writes to some mapper registers several times, copying more data to RAM each time:

[ initial configuration  ] maps part-00-menu-part-1-and-Columns (J) (Alt)-32k.gg
[0xFFFE=0x32, 0xFFFF=0x4f] maps part-03-menu-part-2-and-Bank Panic (Europe)-32k.sms
[0xFFFE=0x50, 0xFFFF=0x1f] maps part-05-menu-part-3-and-Ghost House (UE)-32k.sms
[0xFFFE=0x22, 0xFFFF=0x5e] maps part-06-menu-part-4-and-Hang-On (Europe)-32k.sms
[0xFFFE=0x2b, 0xFFFF=0x6e] maps part-0a-menu-part-5-and-Super Tennis (USA, Europe)-32k.sms
[0xFFFE=0x3a, 0xFFFF=0x6e] maps part-0b-menu-part-6-and-Satellite 7 (J)-32k.sms
[0xFFFE=0x7c, 0xFFFF=0x2b] maps part-0e-menu-part-7-and-Teddy Boy (UE)-32k.sms
[0xFFFE=0x3e, 0xFFFF=0x7c] maps part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms
[0xFFFE=0x7f, 0xFFFF=0x31] maps part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms [again?]

It reads and verifies bytes 0x15AB..0x15DC of Trans-Bot (UE)

[0xFFFF=0x11, 0xFFFE=0x5a] maps part-05-menu-part-3-and-Ghost House (UE)-32k.sms [again?]

The menu title is written in Traditional Chinese characters that are much larger than the Latin ones. The "🡆" heavy arrow cursor is movable and shown below in its initial position. The game index (xx in "GAME xx OF 16") updates as the cursor moves. Unlike most such menu systems, its relative position is preserved when moving between screens

Menu screen 1:

```
    無敵系列

   GAME 01 OF 16

 🡆COLUMNS            [0xFFFF=0x40, 0xFFFF=0x00, 0xFFFF=0x80, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  PENGO              [0xFFFF=0x40, 0xFFFF=0x10, 0xFFFF=0x80, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  WOODY POP          [0xFFFF=0x40, 0xFFFF=0x20, 0xFFFF=0x80, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  BANK PANIC         [0xFFFF=0x40, 0xFFFF=0x30, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  BASEBALL           [0xFFFF=0x50, 0xFFFF=0x00, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  GHOST HOUSE        [0xFFFF=0x50, 0xFFFF=0x10, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  HANG-ON            [0xFFFF=0x50, 0xFFFF=0x20, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  MACHINE GUN        [0xFFFF=0x50, 0xFFFF=0x30, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  MY HERO            [0xFFFF=0x60, 0xFFFF=0x00, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  PIT POT            [0xFFFF=0x60, 0xFFFF=0x10, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
```

Menu screen 2:

```
    無敵系列

   GAME 11 OF 16

 🡆SUPER TENNIS       [0xFFFF=0x60, 0xFFFF=0x20, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  SATELLITE-7        [0xFFFF=0x60, 0xFFFF=0x30, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  SOCCER             [0xFFFF=0x70, 0xFFFF=0x00, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  SPY VS SPY         [0xFFFF=0x70, 0xFFFF=0x10, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  TEDDY BOY          [0xFFFF=0x70, 0xFFFF=0x20, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
  TRANSBOT           [0xFFFF=0x70, 0xFFFF=0x30, 0xFFFF=0x90, 0xFFFF=0xd0, 0xFFFE=0x01, 0xFFFF=0x02]
```

ROM fingerprint info:

512K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl).gg
Checking for export header with matching CRC... NO
sha256:26ab2f65012f52e6f00152a6fc94f248cfdee852408a9273d92919700ed8ad63 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl).gg
sha1:eba1885616443f57e9438f36d579607092866917 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl).gg
md5:01eb406c29f481271787470b981e0336 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl).gg
mekacrc:8A21D815D0D74879 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl).gg
crc32:01d9f565 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl).gg

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-00-menu-part-1-and-Columns (J) (Alt)-32k.gg
Checking for export header with matching CRC... NO
sha256:66f02d8e4eba1ae074f0066686d5ac10e8556f2cef19317b7f0bb3c389b66f09 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-00-menu-part-1-and-Columns (J) (Alt)-32k.gg
sha1:9c0f5a6ecce4903a647d1a8e1c99ebb05b79f9f4 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-00-menu-part-1-and-Columns (J) (Alt)-32k.gg
md5:a04ecafecf357d05348d6453227fccdd Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-00-menu-part-1-and-Columns (J) (Alt)-32k.gg
mekacrc:EA0969F96DE72F28 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-00-menu-part-1-and-Columns (J) (Alt)-32k.gg
crc32:0e1531a2 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-00-menu-part-1-and-Columns (J) (Alt)-32k.gg

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-01-Pengo (JP)-32k.gg
Checking for export header with matching CRC... NO
sha256:f61b84219ecb4264942835a28c863266488c22b62e61730851a2bb13055db601 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-01-Pengo (JP)-32k.gg
sha1:5883e2d19ab7126d52abc177a97d44bc88c319de Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-01-Pengo (JP)-32k.gg
md5:95cea3a33a3f5915942904b4817b2010 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-01-Pengo (JP)-32k.gg
mekacrc:593C7A3470EED58A Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-01-Pengo (JP)-32k.gg
crc32:ce863dba Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-01-Pengo (JP)-32k.gg

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-02-Woody Pop [v0] (JP)-32k.gg
Checking for export header with matching CRC... NO
sha256:b6b639dcfa1492b5616b83ae4ac8b76ded84c449161291964a2fc3db0f3fb1a2 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-02-Woody Pop [v0] (JP)-32k.gg
sha1:9e7defda6873b7bca5650fad4426a6fb443522d8 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-02-Woody Pop [v0] (JP)-32k.gg
md5:c017baf7fa0de71219dfab91caa59f8f Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-02-Woody Pop [v0] (JP)-32k.gg
mekacrc:902D4CDEE014FD28 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-02-Woody Pop [v0] (JP)-32k.gg
crc32:9c0e5a04 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-02-Woody Pop [v0] (JP)-32k.gg

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-03-menu-part-2-and-Bank Panic (Europe)-32k.sms
Checking for export header with matching CRC... NO
sha256:0e827fcff5ccf75809ad41b9623f9125b84586e2ce75270fb86a0a0c92b9029b Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-03-menu-part-2-and-Bank Panic (Europe)-32k.sms
sha1:124272c8935952820debeed23b7adcfba1761231 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-03-menu-part-2-and-Bank Panic (Europe)-32k.sms
md5:239adb2df7c7b475bc440dd8b24c55f4 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-03-menu-part-2-and-Bank Panic (Europe)-32k.sms
mekacrc:29D75BFF6CFDBC81 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-03-menu-part-2-and-Bank Panic (Europe)-32k.sms
crc32:16724589 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-03-menu-part-2-and-Bank Panic (Europe)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-04-Great Baseball [JP] (JP)-32k.sms
Checking for export header with matching CRC... NO
sha256:84a62928d7a231657db0a5d77efa77eebda9f5cbefb5d5a68af64af2ecdb88fd Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-04-Great Baseball [JP] (JP)-32k.sms
sha1:e6eaaec61bec32dee5161ae59a7a0902f0d05dc9 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-04-Great Baseball [JP] (JP)-32k.sms
md5:94ca79d4eb2709ad98b850d33728a045 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-04-Great Baseball [JP] (JP)-32k.sms
mekacrc:9F82F97234F38CC1 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-04-Great Baseball [JP] (JP)-32k.sms
crc32:89e98a7c Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-04-Great Baseball [JP] (JP)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-05-menu-part-3-and-Ghost House (UE)-32k.sms
Checking for export header with matching CRC... NO
sha256:3b303e47b79a382d3448a8f6d761451d435bb0b1924a4e73de670badc1136930 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-05-menu-part-3-and-Ghost House (UE)-32k.sms
sha1:c73bb294a1d14b567e68ea1db406a78e90f868b4 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-05-menu-part-3-and-Ghost House (UE)-32k.sms
md5:fb2612b93ffc52d49255d37e7f4fb05a Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-05-menu-part-3-and-Ghost House (UE)-32k.sms
mekacrc:4870956A53067D73 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-05-menu-part-3-and-Ghost House (UE)-32k.sms
crc32:e36e9567 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-05-menu-part-3-and-Ghost House (UE)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-06-menu-part-4-and-Hang-On (Europe)-32k.sms
Checking for export header with matching CRC... NO
sha256:5cbe328e66a39b265b902e7b70976b0f894fd97098a5f326f37a65ae9fddb3f4 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-06-menu-part-4-and-Hang-On (Europe)-32k.sms
sha1:055e0f3871145444c3e4cf8a178411261b8b91c2 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-06-menu-part-4-and-Hang-On (Europe)-32k.sms
md5:5884d51d669072b5016166c11b35911f Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-06-menu-part-4-and-Hang-On (Europe)-32k.sms
mekacrc:4D38A9F77DC0ECB2 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-06-menu-part-4-and-Hang-On (Europe)-32k.sms
crc32:f2916892 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-06-menu-part-4-and-Hang-On (Europe)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-07-Comical Machine Gun Joe (JP)-32k.sms
Checking for export header with matching CRC... NO
sha256:ea9c74555e551974a681296c41972c1f6ddd7289fed5502f64e35b8527b6dde4 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-07-Comical Machine Gun Joe (JP)-32k.sms
sha1:33c21d164fd3cdf7aa9e7e0fe1a3ae5a491bd9f5 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-07-Comical Machine Gun Joe (JP)-32k.sms
md5:2d59b3d27f022b04a597e767e6660ca9 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-07-Comical Machine Gun Joe (JP)-32k.sms
mekacrc:59868AC9BD4815B4 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-07-Comical Machine Gun Joe (JP)-32k.sms
crc32:9d549e08 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-07-Comical Machine Gun Joe (JP)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-08-My Hero (US,EU,BR,PT,DE,IT)-32k.sms
Checking for export header with matching CRC... YES
sha256:4884bde83e1587f6d5f01750000ae879bebe7ebccc330ea1689d2d27b70c3436 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-08-My Hero (US,EU,BR,PT,DE,IT)-32k.sms
sha1:7583c5fb1963c070b7bda72b447cc3fd611ddf1a Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-08-My Hero (US,EU,BR,PT,DE,IT)-32k.sms
md5:efef7361c9c37bcd6a7b84bc121af5f2 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-08-My Hero (US,EU,BR,PT,DE,IT)-32k.sms
mekacrc:ED4ACAF1CF794680 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-08-My Hero (US,EU,BR,PT,DE,IT)-32k.sms
crc32:62f0c23d Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-08-My Hero (US,EU,BR,PT,DE,IT)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-09-Fushigi no Oshiro Pit Pot (JP,KR)-32k.sms
Checking for export header with matching CRC... NO
sha256:be7c284c39c1e18e53f7a97d3950caf93550783cdddcdf9324f9b209353682b9 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-09-Fushigi no Oshiro Pit Pot (JP,KR)-32k.sms
sha1:b1afa682b2f70bfc4ab2020d7c3047aabbaf9a24 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-09-Fushigi no Oshiro Pit Pot (JP,KR)-32k.sms
md5:209ee37dcabc263aa462c781d3123fce Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-09-Fushigi no Oshiro Pit Pot (JP,KR)-32k.sms
mekacrc:B637976CB4B28D1D Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-09-Fushigi no Oshiro Pit Pot (JP,KR)-32k.sms
crc32:e6795c53 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-09-Fushigi no Oshiro Pit Pot (JP,KR)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0a-menu-part-5-and-Super Tennis (USA, Europe)-32k.sms
Checking for export header with matching CRC... NO
sha256:2ec878a7d24fb62ef1d381ac174653f951b5396052971520f116eada2550b4d9 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0a-menu-part-5-and-Super Tennis (USA, Europe)-32k.sms
sha1:b1addcc0961b2da3ce64db2c97a7c668388d94c0 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0a-menu-part-5-and-Super Tennis (USA, Europe)-32k.sms
md5:59bba219475f334d3e4d0c581990d595 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0a-menu-part-5-and-Super Tennis (USA, Europe)-32k.sms
mekacrc:47F048FDA9BA59C8 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0a-menu-part-5-and-Super Tennis (USA, Europe)-32k.sms
crc32:e1cdc653 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0a-menu-part-5-and-Super Tennis (USA, Europe)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0b-menu-part-6-and-Satellite 7 (J)-32k.sms
Checking for export header with matching CRC... NO
sha256:cd01cb5c2861aff64cd521764e1a8874a24a2fdd916e952984dcd49c457af3b4 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0b-menu-part-6-and-Satellite 7 (J)-32k.sms
sha1:28d291584e122010bc751458ca5b89cefa3b070a Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0b-menu-part-6-and-Satellite 7 (J)-32k.sms
md5:7297fc8bd6ee97de93d75ed59b33924a Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0b-menu-part-6-and-Satellite 7 (J)-32k.sms
mekacrc:0B6D2A665A9CEA18 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0b-menu-part-6-and-Satellite 7 (J)-32k.sms
crc32:b23b1f31 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0b-menu-part-6-and-Satellite 7 (J)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0c-Great Soccer (JP)-32k.sms
Checking for export header with matching CRC... NO
sha256:b2a524164e1a0a264dc4ac7cb29742293b3384b9369e0ce0cf2ab5ca2b50a1cd Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0c-Great Soccer (JP)-32k.sms
sha1:110536303b7bccc193bef4437ba5a9eb6fd4ac8e Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0c-Great Soccer (JP)-32k.sms
md5:0ed883302e87ca46c1c1a55660e17900 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0c-Great Soccer (JP)-32k.sms
mekacrc:68A3CEF02BC61B2B Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0c-Great Soccer (JP)-32k.sms
crc32:2d7fd7ef Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0c-Great Soccer (JP)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0d-Spy vs Spy (JP,KR)-32k.sms
Checking for export header with matching CRC... NO
sha256:e3df51893d16e512cadf3723a58f143dc679127fbe4444662be63fafb4b2a777 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0d-Spy vs Spy (JP,KR)-32k.sms
sha1:c5e004b34d6569e6e1d99bff6be940f308e2c39f Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0d-Spy vs Spy (JP,KR)-32k.sms
md5:2a6ee78e2617886fe540dcb8a1500e90 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0d-Spy vs Spy (JP,KR)-32k.sms
mekacrc:440AA3B0518BF192 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0d-Spy vs Spy (JP,KR)-32k.sms
crc32:d41b9a08 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0d-Spy vs Spy (JP,KR)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0e-menu-part-7-and-Teddy Boy (UE)-32k.sms
Checking for export header with matching CRC... NO
sha256:7c5ec94ecc01543d875ee94f3802cc43fad3b987d849da85c59fef134b12bf80 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0e-menu-part-7-and-Teddy Boy (UE)-32k.sms
sha1:7d62edd48b73c25ae305e42be68adc283bdb28ab Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0e-menu-part-7-and-Teddy Boy (UE)-32k.sms
md5:bc7bf1bb93e4460616354ad1d4a4961a Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0e-menu-part-7-and-Teddy Boy (UE)-32k.sms
mekacrc:09B995D8623E69C8 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0e-menu-part-7-and-Teddy Boy (UE)-32k.sms
crc32:79184fd6 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0e-menu-part-7-and-Teddy Boy (UE)-32k.sms

32K Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms
Checking for export header with matching CRC... NO
sha256:3c8bce50ab1f88e94bda662673dbae9bc7c852547860d3ce55f1ac9f98414c05 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms
sha1:f8fa2a353dfe5d28b1e9771f139000d79964baca Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms
md5:94c32de4a016609eb46cd021862abcc6 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms
mekacrc:57E4B43782E0F682 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms
crc32:d0f2e143 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)/part-0f-menu-part-8-and-Trans-Bot (UE)-32k.sms
  • Loading branch information
bsittler committed May 29, 2023
1 parent 7c635bd commit 23c5408
Show file tree
Hide file tree
Showing 6 changed files with 133 additions and 4 deletions.
3 changes: 2 additions & 1 deletion meka/compat.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,7 @@
Galaga '91 (JP) Ok
Gamble Panic (JP) Ok
Gambler Jikochuushin Ha (JP) Ok
Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] *Ok
Garou Densetsu Special (JP) Ok
Ganbare Gorby! (JP) Ok
Garfield: Caught in the Act Ok
Expand Down Expand Up @@ -1498,7 +1499,7 @@
Zoop (US) Ok
Zoop [Proto] (US) Ok
-----------------------------------------------------------------------------
517 games tested - 506 are "Ok" - Compatibility rate: 97.63%
518 games tested - 507 are "Ok" - Compatibility rate: 97.88%
-----------------------------------------------------------------------------

-----------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions meka/meka.nam
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,7 @@ GG 09534742 45190AB92665163E Gamble Panic/COUNTRY=JP/PRODUCT_NO=G-3364
GG 423803a7 9E7E0CAD62261E85 Gambler Jikochuushin Ha/COUNTRY=JP/PRODUCT_NO=G-3309,G-3339
GG 0593ba24 905D6D377D1F9D36 Galaga '91/COUNTRY=JP/PRODUCT_NO=T-14057/COMMENT=Japanese version of "Galaga 2".
GG 95ecece2 432C080C09AD5275 Galaga 2/COUNTRY=EU/PRODUCT_NO=2322/COMMENT=Export version of "Galaga '91".
GG 01d9f565 8A21D815D0D74879 Game Gear Super 16 in 1 ~ Wudi Xilie [Columns]/EMU_MAPPER=50
GG cd53f3af 5434506F49A77C4D Garfield: Caught in the Act/COUNTRY=US,EU/PRODUCT_NO=2560,2560-50
GG 9afb6f33 CE07E49360532BD6 Garou Densetsu Special/COUNTRY=JP/PRODUCT_NO=T-103017/COMMENT=Japanese version of "Fatal Fury Special".
GG 0e300223 27BA4F0E3A5DBF6C Gear Stadium/COUNTRY=JP/PRODUCT_NO=T-14037/COMMENT=Japanese version of "Batter Up".
Expand Down
22 changes: 22 additions & 0 deletions meka/srcs/machine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include "tvtype.h"
#include "sound/fmunit.h"
#include "sound/psg.h"
#include "app_game.h"

//-----------------------------------------------------------------------------
// Data
Expand Down Expand Up @@ -196,6 +197,9 @@ void Machine_Set_Handler_MemRW(void)
case MAPPER_SMS_Korean_MSX_32KB_2000:
WrZ80 = WrZ80_NoHook = Write_Mapper_SMS_Korean_MSX_32KB_2000;
break;
case MAPPER_GG_Super_16_in_1_Columns_FFFx:
WrZ80 = WrZ80_NoHook = Write_Mapper_GG_Super_16_in_1_Columns_FFFx;
break;
}
}

Expand Down Expand Up @@ -485,6 +489,24 @@ void Machine_Set_Mapping (void)
g_machine.mapper_regs[0] = 0;
break;

case MAPPER_GG_Super_16_in_1_Columns_FFFx:
Map_8k_ROM(0, 0 & tsms.Pages_Mask_8k);
Map_8k_ROM(1, 1 & tsms.Pages_Mask_8k);
Map_8k_ROM(2, 2 & tsms.Pages_Mask_8k);
Map_8k_ROM(3, 3 & tsms.Pages_Mask_8k);
Map_8k_ROM(4, 0 & tsms.Pages_Mask_8k); // should actually be all zeroes initially
Map_8k_ROM(5, 1 & tsms.Pages_Mask_8k); // should actually be all zeroes initially
Map_8k_RAM(6, 0);
Map_8k_RAM(7, 0);
g_machine.mapper_regs_count = 3;
for (int i = 0; i != MAPPER_REGS_MAX; i++)
g_machine.mapper_regs[i] = 0;
drv_set(DRV_GG);
gamebox_resize_all();
VDP_UpdateLineLimits();
Video_GameMode_UpdateBounds();
break;

case MAPPER_SC3000_Survivors_Multicart:
g_machine.mapper_regs_count = 1;
for (int i = 0; i != MAPPER_REGS_MAX; i++)
Expand Down
65 changes: 65 additions & 0 deletions meka/srcs/mappers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
#include "shared.h"
#include "mappers.h"
#include "eeprom.h"
#include "vdp.h"
#include "video.h"
#include "app_game.h"

//-----------------------------------------------------------------------------
// Data
Expand Down Expand Up @@ -952,6 +955,68 @@ WRITE_FUNC (Write_Mapper_SMS_Korean_MSX_32KB_2000)
Write_Error (Addr, Value);
}

// Mapper #50
// Game Gear Super 16 in 1 ~ Wudi Xilie [Columns] (Unl)
WRITE_FUNC (Write_Mapper_GG_Super_16_in_1_Columns_FFFx)
{
const unsigned int incomplete_address_decoding_assumed_bits = 0x000F;

if ((Addr | incomplete_address_decoding_assumed_bits) == 0xFFFF) // Configurable segment -----------------------------------------------
{
if ((Value & 0xC0) == 0xC0) {
g_machine.mapper_regs[0] = (g_machine.mapper_regs[0] & 0x3F) | ((Value & 0x30) << 2);
} else if ((Value & 0xC0) == 0x80) {
g_machine.mapper_regs[0] = (g_machine.mapper_regs[0] & 0xCF) | (Value & 0x30);
} else if ((Value & 0xC0) == 0x40) {
g_machine.mapper_regs[0] = (g_machine.mapper_regs[0] & 0xF3) | ((Value & 0x30) >> 2);
}

bool sega_mode = (g_machine.mapper_regs[0] & 0x40) ? true : false;
bool sms_gg_mode = (g_machine.mapper_regs[0] & 0x10) ? true : false;

// not sure whether real hardware aliases these too
if (Addr == 0xFFFF) {
g_machine.mapper_regs[1] = Value & 0x0F;
}
if (Addr == 0xFFFE) {
g_machine.mapper_regs[2] = Value & 0x0F;
}

if (((Value & 0xC0) == 0x00) && !sega_mode) {
g_machine.mapper_regs[0] = (g_machine.mapper_regs[0] & 0xFC) | ((Value & 0x30) >> 4);
}

unsigned int base_page_32k = g_machine.mapper_regs[0] & 0x0F;
unsigned int page_8000_offset_16k = sega_mode ? g_machine.mapper_regs[1] : 0;
unsigned int page_4000_offset_16k = sega_mode ? g_machine.mapper_regs[2] : 1;

if (sms_gg_mode) {
drv_set(DRV_SMS);
} else {
drv_set(DRV_GG);
}
gamebox_resize_all();
VDP_UpdateLineLimits();
Video_GameMode_UpdateBounds();

Map_8k_ROM(0, ((base_page_32k * 4) | 0) & tsms.Pages_Mask_8k);
Map_8k_ROM(1, ((base_page_32k * 4) | 1) & tsms.Pages_Mask_8k);
Map_8k_ROM(2, ((base_page_32k * 4) | (page_4000_offset_16k * 2) | 0) & tsms.Pages_Mask_8k);
Map_8k_ROM(3, ((base_page_32k * 4) | (page_4000_offset_16k * 2) | 1) & tsms.Pages_Mask_8k);
Map_8k_ROM(4, ((base_page_32k * 4) | (page_8000_offset_16k * 2) | 0) & tsms.Pages_Mask_8k);
Map_8k_ROM(5, ((base_page_32k * 4) | (page_8000_offset_16k * 2) | 1) & tsms.Pages_Mask_8k);
}

switch (Addr >> 13)
{
// RAM [0xC000] = [0xE000] ------------------------------------------------
case 6: Mem_Pages[6][Addr] = Value; return;
case 7: Mem_Pages[7][Addr] = Value; return;
}

Write_Error (Addr, Value);
}

// Based on MSX ASCII 8KB mapper? http://bifi.msxnet.org/msxnet/tech/megaroms.html#ascii8
// - This mapper requires 4 registers to save bank switching state.
// However, all other mappers so far used only 3 registers, stored as 3 bytes.
Expand Down
2 changes: 2 additions & 0 deletions meka/srcs/mappers.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
#define MAPPER_SMS_Korean_MD_FFF5 (25) // Registers at 0xFFF5 and 0xFFFF (Jaemiissneun Game Mo-eumjip 42/65 Hap [SMS-MD], Pigu Wang Hap ~ Jaemiiss-neun Game Mo-eumjip [SMS-MD])
#define MAPPER_SMS_Korean_MD_FFFA (26) // Registers at 0xFFFA and 0xFFFF (Game Jiphap 30 Hap [SMS-MD])
#define MAPPER_SMS_Korean_MSX_32KB_2000 (27) // Register at 0x2000 (2 Hap in 1 (Moai-ui bomul, David-2))
#define MAPPER_GG_Super_16_in_1_Columns_FFFx (50) // Register at 0xFFFx (Game Gear Super 16 in 1 ~ Wudi Xilie [Columns])

#define READ_FUNC(_NAME) u8 _NAME(register u16 Addr)
#define WRITE_FUNC(_NAME) void _NAME(register u16 Addr, register u8 Value)
Expand Down Expand Up @@ -96,6 +97,7 @@ WRITE_FUNC (Write_Mapper_SMS_Korean_MD_FFF0);
WRITE_FUNC (Write_Mapper_SMS_Korean_MD_FFF5);
WRITE_FUNC (Write_Mapper_SMS_Korean_MD_FFFA);
WRITE_FUNC (Write_Mapper_SMS_Korean_MSX_32KB_2000);
WRITE_FUNC (Write_Mapper_GG_Super_16_in_1_Columns_FFFx);
//-----------------------------------------------------------------------------
void Out_SC3000_SurvivorsMulticarts_DataWrite(u8 v);

Expand Down
44 changes: 41 additions & 3 deletions meka/srcs/saves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include "vmachine.h"
#include "sound/fmunit.h"
#include "sound/psg.h"
#include "video.h"
#include "app_game.h"

//-----------------------------------------------------------------------------
// Functions
Expand All @@ -26,6 +28,7 @@ void Load_Game_Fixup(void)
{
int i;
u8 b;
bool sms_gg_mode_in_mapper = false;

// CPU
#ifdef MARAT_Z80
Expand Down Expand Up @@ -144,13 +147,46 @@ void Load_Game_Fixup(void)
case MAPPER_SMS_Korean_MSX_32KB_2000:
WrZ80_NoHook(0x2000, g_machine.mapper_regs[0]);
break;
case MAPPER_GG_Super_16_in_1_Columns_FFFx:
if (1) {
// these mapper writes will configure SMS-GG mode if needed
unsigned int mode_bits = g_machine.mapper_regs[0] & 0xF0;
unsigned int base_page_32k = g_machine.mapper_regs[0] & 0x0F;
unsigned int page_8000_offset_16k = g_machine.mapper_regs[1];
unsigned int page_4000_offset_16k = g_machine.mapper_regs[2];

// restore "sega" mode paging registers
WrZ80_NoHook(0xFFFF, page_8000_offset_16k);
WrZ80_NoHook(0xFFFE, page_4000_offset_16k);

// use 0xFFF8 for the rest of the writes to prevent
// paging register aliasing (not sure whether real
// hardware works this way, but our implementaiton
// does)

// configure base page
WrZ80_NoHook(0xFFF8, 0xC0);
WrZ80_NoHook(0xFFF8, 0x40 | ((base_page_32k & 0x0C) << 2));
WrZ80_NoHook(0xFFF8, 0x00 | ((base_page_32k & 0x03) << 4));

// restore SMS-GG mode if needed
WrZ80_NoHook(0xFFF8, 0x80 | (mode_bits & 0x30));

// restore "sega" mode if needed
WrZ80_NoHook(0xFFF8, 0xC0 | ((mode_bits & 0xC0) >> 2));

sms_gg_mode_in_mapper = true;
}
break;
}
}

// VDP/Graphic related
tsms.VDP_Video_Change |= VDP_VIDEO_CHANGE_ALL;
VDP_UpdateLineLimits();
// FALSE!!! // tsms.VDP_Line = 224;
if (!sms_gg_mode_in_mapper) {
tsms.VDP_Video_Change |= VDP_VIDEO_CHANGE_ALL;
VDP_UpdateLineLimits();
// FALSE!!! // tsms.VDP_Line = 224;
}

// Rewrite all VDP registers (we can do that since it has zero side-effect)
for (i = 0; i < 16; i ++)
Expand Down Expand Up @@ -339,6 +375,7 @@ int Save_Game_MSV(FILE *f)
case MAPPER_SMS_Korean_MD_FFF5:
case MAPPER_SMS_Korean_MD_FFFA:
case MAPPER_SMS_Korean_MSX_32KB_2000:
case MAPPER_GG_Super_16_in_1_Columns_FFFx:
default:
fwrite (RAM, 0x2000, 1, f); // Do not use g_driver->ram because of g_driver video mode change
break;
Expand Down Expand Up @@ -518,6 +555,7 @@ int Load_Game_MSV(FILE *f)
case MAPPER_SMS_Korean_MD_FFF5:
case MAPPER_SMS_Korean_MD_FFFA:
case MAPPER_SMS_Korean_MSX_32KB_2000:
case MAPPER_GG_Super_16_in_1_Columns_FFFx:
default:
fread (RAM, 0x2000, 1, f); // Do not use g_driver->ram because of g_driver video mode change
break;
Expand Down

0 comments on commit 23c5408

Please sign in to comment.