I don't spent much time on this project, and now the simulator runs very slowly with GBA games, only 20fps. Though I have used the ARM inline asm code instead pure C code, the speed is still not fast enough. But luckily the speed of GB/GBC games can run with 90% or full speed even with the audio. I will not detailly decribe the steps what I have done to port VBA, because it's not necessary, you can just see my code on Google Code(link toVBA4iPhone)
What we need:
-Visual Boy Advance 1.7.2 source code, Download
notice that we need to add following compile flag:
1.DC_CORE, we need it to compile in iPhone simulator or device,
2.DSDL, to use SDL
-Libpng source code libpng1246, please download from the libpng website
notice that the latest may not compatible.
-SDL1.3
as SDL 1.3 start to support Android and iPhone, so the port will be much more easier.Download
but also notice that SDL1.3 is still under development, not the final release version. and there's a bug about SDL_Audio with iPhone platform. Just do the following modification or you may get the error like "there're no audio device"
in SDL_config_iphoneos.h:
change #define SDL_AUDIO_DRIVER_COREAUDIOIPHONE 1 to
#define SDL_AUDIO_DRIVER_COREAUDIO 1
本文介绍了将Visual Boy Advance (VBA) 模拟器移植到iPhone平台的过程与遇到的问题。作者分享了使用ARM内联汇编代码提升模拟速度的经验,并指出了GBA游戏在iPhone上运行时遇到的帧率限制,而GB/GBC游戏则能接近全速运行。文中还提到了移植过程中所需的关键组件,包括VBA源代码、libpng库及SDL库。
13万+

被折叠的 条评论
为什么被折叠?



