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/cn.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灯, 水草

请输入看板名称,例如:BuyTogether站内搜寻

TOP