Emulator 板


LINE

2016.06.06 Since I got stuck with porting my custom EEPROM implementation for Genesis/MegaDrive towards the core one [*] and since updating software lists with PCB info is valuable but not very exciting, I was searching for some not too complex but still rewarding emulation task to occupy my weekend. While going through my notes and partially developed implementations, I stumbled upon a bunch of notes about the “General Purpose I/O port” of the GBA, a bunch of pins connected to the ROM on the GBA cart PCBs which allow the system to serially transfer bits through the cartslot. The main usage of the port was the routing of the RTC in Pocket Monster games, the Rumble feature of Drill Dozer and the Gyroscope sensor of Warioware Twisted. The missing implementation of the RTC comms was also the reason why Sennen Kazoku was stuck on the following screen http://mamedev.emulab.it/etabeta/fast/files/0028.png
Since the port was quite well documented (mainly thanks to the great reverse engineering job done by the nocash guy) and the RTC improvement was often requested on the Bannister MESS board, I decided to take (agsain) a quick look to see whether this time I could manage to make the RTC work. It turned out that in my previous attempts on this, I had misread some of the bits of info presented at GBATEK. After some work to add the correct GPIO hookup into the driver, I was finally greeted by Sennen Kazoku getting in-game http://mamedev.emulab.it/etabeta/fast/files/0011_1970131108.png
http://mamedev.emulab.it/etabeta/fast/files/0010_1751179555.png
Similarly, the new code allowed to say goodbye to this annoying messages http://mamedev.emulab.it/etabeta/fast/files/0025_8521060235.png
http://mamedev.emulab.it/etabeta/fast/files/0026_1418304131.png
and made Pokémon Ruby / Emerald / Sapphire at last fully working http://mamedev.emulab.it/etabeta/fast/files/0030.png
http://mamedev.emulab.it/etabeta/fast/files/0031_4378546895.png
and yes, I’m sort of cheating with the above screens, since the game could be played even without the RTC, but some events would not have worked as designed without it, so it is a *real* improvements :) With the RTC implemented, I decided to look a bit to the other games using the port and it turned out that RTC was probably the most complex of the device exploiting the GPIO port… good for us! In a few hours I was able to implement in MAME the Gyroscopic Sensor used by Warioware Twisted, so that its minigames will be playable in next MAME release http://mamedev.emulab.it/etabeta/fast/files/0034.png
http://mamedev.emulab.it/etabeta/fast/files/0037.png
http://mamedev.emulab.it/etabeta/fast/files/0041.png
http://mamedev.emulab.it/etabeta/fast/files/0043.png
Next it was the turn of Boktai’s luminosity/light sensor. Such a sensor was used in the three games of the Boktai / Bokura no Taiyou series, and the lack of support for it had a great playability impact in MAME: it not only made almost impossible the gameplay in Boktai 2 / Zoku Bokura no Taiyou and in Shin Bokura no Taiyou (the Jpn-only third chapter in the saga), since solar light is needed to recharge the main character’s weapon, but even more annoyingly it caused the following screen to show up and stop any play at the very beginning of the first game http://mamedev.emulab.it/etabeta/fast/files/0044.png
Luckily, the sensor implementation was not too difficult (in MAME you will be able to choose the luminosity level from the “Machine Configuration” menu entry of the internal interface… at least until we get some sort of webcam support as input device in MAME, which would force users to play the game outside in order to actually defeat vampires :/ and we now can play these games (almost) as they were intended http://mamedev.emulab.it/etabeta/fast/files/0045_4062439352.png
http://mamedev.emulab.it/etabeta/fast/files/0033.png
observe the luminosity bars which are not empty as they were in MAME/MESS so far…) To complete the picture, it remained to add the Rumble chip and that was very easy to add, even if it is probably less interesting from the MAME-users’ point of view in its current state: as with other MAME outputs, with the new code the emulator will now send out a "Rumble" output bit (0 for Rumble=OFF and 1 for Rumble=ON) whenever the games try to access the Rumble component… however, users will need a third party application to listen to the output and redirect it to some hardware that can "rumble" in sync with the gameplay. Is this all? Well, I thought so at first… but then I realized that there were a few more low hanging fruits I could implement, and that is how we will also get in next MAME: ‧emulation of the Tilt sensor used by Yoshi’s Universal Gravitation / Yoshi Topsy-Turvy / Yoshi no Banyuuinryoku (and by Koro Koro Puzzle) http://mamedev.emulab.it/etabeta/fast/files/0022_9383308943.png
http://mamedev.emulab.it/etabeta/fast/files/0024_2825789507.png
‧emulation of the Rumble chip used by MBC-5 Game Boy Color games (like Poké mon Pinball and more), once again restricted to a "Rumble" output bit ready to be intercepted by some external listener application ‧partial emulation of the RTC used by MBC-3 Game Boy Color games (like Poké mon Gold / Silver / Crystal and many more), which allows to actually pass from a stuck clock that never updates http://mamedev.emulab.it/etabeta/fast/files/0008_2396278041.png
http://mamedev.emulab.it/etabeta/fast/files/0009_663029560.png
to a clock that is aligned with real time when the game is rebooted http://mamedev.emulab.it/etabeta/fast/files/0006_560611449.png
http://mamedev.emulab.it/etabeta/fast/files/0007_9603631123.png
You might have noticed that I wrote partial emulation above, and the reason is that the clock goes definitely too fast while in-game and thus the support cannot be considered complete… In the next few days, I plan to revisit a little bit the GPIO direction bit handling, since it does not match perfectly the description at GBATEK and I would like to understand where the difference comes from, and to search for the issue which causes the RTC to go so fast in GBC games. Let’s see how it does work out :-) [*] I’ve done some progress but it’s pretty boring… and it always requires me playing at least a NBA Jam match to test that both reading and writing to EEPROM works fine, which usually does not fit well the short lunch breaks at work, when I have the chance to make some hobbyist developments 來源 http://mamedev.emulab.it/etabeta/ -- ポーラステーション http://perry0517a.blogspot.tw/ --



※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.250.129.111
※ 文章網址: https://webptt.com/m.aspx?n=bbs/Emulator/M.1465300348.A.5A0.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