Emulator 板


LINE

2017.02.12 The Galaxy Games system by CES (Creative Electronics & Software) is a cartridge based PCB in a two-player cocktail cab, with trackballs and buttons as inputs. It offers a series of mini-games targeted at the casual player (think bartops: you can see a video of the thing in action here). The base system includes a number of games in the BIOS while the cartridges — up to 4 can be fitted at the same time — can add plenty more. I emulated this system and the base games several years back. The StarPak 2 cartridge was added shortly after, but required an hack to run. The hardware uses a blitter, implemented in a Xilinx FPGA, which was also featured in Midway's Touch Master series of games (thus, the CES guys were clearly behind those titles too). It's pretty rare to see these titles auctioned, i.e. only one such PCB (with StarPak 2) and one cab had been seen for sale in the last 10 years. Yet BrianT spotted one that also came with two carts: StarPak 2, already dumped, and StarPak 3, which was not! The BIOS roms were also an undumped revision (v1.80 as opposed to the previously dumped v1.90). So the The Dumping Union moved in to acquire the lot and, with the help of several fellow MAMErs, they got it. Coolmod dumped and documented it (with the help of Ken), here are some pictures: http://www.lucaelia.com/images/mame_snaps/galgame3/starpak3_cartridge.jpg
http://www.lucaelia.com/images/mame_snaps/galgame3/starpak2_cartridge.jpg
Now, looking at the photos of the cartridges, you can see they contain the game code/graphics/data on SMT flash chips (center), a serial EEPROM to store the game audits/options (tiny 8-legged chip at the bottom right) and a PIC cpu (the larger chip on the right side, different models between the carts) that is basically used for protection. It performs an needlessly complicated handshaking with the main cpu to acknowledge it's fitted in one of the 4 slots and that it's authentic. In our previous StarPak 2 sample, the PIC program was not readable (protected), so in order to get to the game I had to bypass this handshaking by patching the BIOS code. But this time we were lucky and the PIC hadn't been protected, so we could read the program correctly. Alas, the same could not be said for the other cartridge, the PIC in StarPak 3 was protected. Worse, this cart contained bigger roms, thus requiring some ROM banking to be performed by the PIC itself. The BIOS knows nothing about this feature which is internal and specific to the cart: it's all done by the game code when read in RAM by the main cpu (a 68000) and executed. It talks to the PIC to switch the higher part of the roms in. I started by writing a simulation of the handshaking algorithm, so that we could try and simulate the StarPak 3 banking properly, sound and graphics would be wrong in some of its games otherwise. The BIOS initially sends a 1-byte command (FF hex) to see if the slot is populated and by which cart. It expects a 32-byte response from the PIC, starting with "CES1997" and followed by some bytes from the flash chips at some fixed addresses (one byte is the cart ID). The main cpu can read from the flash too, so it checks that the response matches the contents of the cart. Throughout the game the PIC is challenged with sequences of 32-byte commands (not starting with FF). The bytes are random and conceal a 4-byte key at variable offsets (depending on the value of the bytes preceding the key). The PIC has to compute the correct 1-byte response, a hash based on the key and, optionally, on the sum of the command bytes. If this challenge/response dance fails at any time, the games from the cartridge abruptly vanish from the menu. And this is when something great happened... we were able to get the help of Keith M. Kolmos (@KeithMKolmos), lead programmer on this software. He could gather from his archive the PIC code for all of the StarPak cartridges (including the yet undumped #1 and #4). Now MAME could emulate the carts without hacks or simulations, so I ditched the old code and wrote some more to emulate and abstract the carts as proper devices with communication (i.e. parallel-to-serial and back), switching and banking. I hooked up the PIC code and... it didn't work! Turns out there was a bug in the PIC core emulation related to the flags handling, which was preventing the correct answer from the cart to the main cpu. Having just written a simulation of the handshaking in C++ it was easy to spot. With the new code in place, even though the driver has taken a bit of a speed hit, StarPak 3 works correctly. It features a grand total of 8 new mini-games: Galaxy Games StarPak 3 - Boot Screen (BIOS v1.80) http://www.lucaelia.com/images/mame_snaps/galgame3/0024.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0002.png
It includes a licensed rendition of Atari's Centipede (by the way, here's the programmer's site): http://justinlove.name/about/ http://www.lucaelia.com/images/mame_snaps/galgame3/0010.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0011.png
Astro Blast is instead a Space Invaders clone with rendered alien ships: http://www.lucaelia.com/images/mame_snaps/galgame3/0007.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0025.png
A Mine Sweeper clone, Sweeper (same programmer as Centipede): http://www.lucaelia.com/images/mame_snaps/galgame3/0012.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0013.png
Word Sleuth is a word cross puzzle: http://www.lucaelia.com/images/mame_snaps/galgame3/0015.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0014.png
A puzzle game involving numbers, played against the computer or another player, called Ker Chunk: http://www.lucaelia.com/images/mame_snaps/galgame3/0016.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0017.png
Great Wall is a Mahjong solitaire with the option of using symbols instead of the traditional tiles: http://www.lucaelia.com/images/mame_snaps/galgame3/0018.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0019.png
You must play as batter and then pitcher in the baseball game Diamond Derby: http://www.lucaelia.com/images/mame_snaps/galgame3/0020.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0021.png
Finally Pull! is a skeet shooting simulation: http://www.lucaelia.com/images/mame_snaps/galgame3/0023.png
http://www.lucaelia.com/images/mame_snaps/galgame3/0022.png
http://www.lucaelia.com/mame.php/2017/StarPak-3-A-Tale-Of-Rare-Cartridges -- ポーラステーション http://perry0517a.blogspot.tw/ --



※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.44.223.206
※ 文章網址: https://webptt.com/m.aspx?n=bbs/Emulator/M.1486988119.A.5EB.html







like.gif 您可能會有興趣的文章
icon.png[問題/行為] 貓晚上進房間會不會有憋尿問題
icon.pngRe: [閒聊] 選了錯誤的女孩成為魔法少女 XDDDDDDDDDD
icon.png[正妹] 瑞典 一張
icon.png[心得] EMS高領長版毛衣.墨小樓MC1002
icon.png[分享] 丹龍隔熱紙GE55+33+22
icon.png[問題] 清洗洗衣機
icon.png[尋物] 窗台下的空間
icon.png[閒聊] 双極の女神1 木魔爵
icon.png[售車] 新竹 1997 march 1297cc 白色 四門
icon.png[討論] 能從照片感受到攝影者心情嗎
icon.png[狂賀] 賀賀賀賀 賀!島村卯月!總選舉NO.1
icon.png[難過] 羨慕白皮膚的女生
icon.png閱讀文章
icon.png[黑特]
icon.png[問題] SBK S1安裝於安全帽位置
icon.png[分享] 舊woo100絕版開箱!!
icon.pngRe: [無言] 關於小包衛生紙
icon.png[開箱] E5-2683V3 RX480Strix 快睿C1 簡單測試
icon.png[心得] 蒼の海賊龍 地獄 執行者16PT
icon.png[售車] 1999年Virage iO 1.8EXi
icon.png[心得] 挑戰33 LV10 獅子座pt solo
icon.png[閒聊] 手把手教你不被桶之新手主購教學
icon.png[分享] Civic Type R 量產版官方照無預警流出
icon.png[售車] Golf 4 2.0 銀色 自排
icon.png[出售] Graco提籃汽座(有底座)2000元誠可議
icon.png[問題] 請問補牙材質掉了還能再補嗎?(台中半年內
icon.png[問題] 44th 單曲 生寫竟然都給重複的啊啊!
icon.png[心得] 華南紅卡/icash 核卡
icon.png[問題] 拔牙矯正這樣正常嗎
icon.png[贈送] 老莫高業 初業 102年版
icon.png[情報] 三大行動支付 本季掀戰火
icon.png[寶寶] 博客來Amos水蠟筆5/1特價五折
icon.pngRe: [心得] 新鮮人一些面試分享
icon.png[心得] 蒼の海賊龍 地獄 麒麟25PT
icon.pngRe: [閒聊] (君の名は。雷慎入) 君名二創漫畫翻譯
icon.pngRe: [閒聊] OGN中場影片:失蹤人口局 (英文字幕)
icon.png[問題] 台灣大哥大4G訊號差
icon.png[出售] [全國]全新千尋侘草LED燈, 水草

請輸入看板名稱,例如:Tech_Job站內搜尋

TOP