Homebrew mGBA official standalone Wii port

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States

VinsCool

Persona Secretiva Felineus
Global Moderator
Joined
Jan 7, 2014
Messages
14,600
Trophies
4
Location
Another World
Website
www.gbatemp.net
XP
25,207
Country
Canada

VinsCool

Persona Secretiva Felineus
Global Moderator
Joined
Jan 7, 2014
Messages
14,600
Trophies
4
Location
Another World
Website
www.gbatemp.net
XP
25,207
Country
Canada
Which i don't know how to edit or compile, there's no wiki guide on how to compile a .dol file from source lol.
Where is the source code? I'm just curious, I suck at programming xD
 
  • Like
Reactions: Margen67

VinsCool

Persona Secretiva Felineus
Global Moderator
Joined
Jan 7, 2014
Messages
14,600
Trophies
4
Location
Another World
Website
www.gbatemp.net
XP
25,207
Country
Canada
  • Like
Reactions: Margen67

zerofalcon

Well-Known Member
OP
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,918
Country
Source code:
https://github.com/mgba-emu/mgba

Yes, the problem with the sound is related to the audio rate, if this can be improved in retroarch I'm sure it'll fix almost completely that annoying crackling sound (game dependant of course)... Too bad large GBA roms (32 mb) are not working with the libretro core anymore.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Source code:
https://github.com/mgba-emu/mgba

Yes, the problem with the sound is related to the audio rate, if this can be improved in retroarch I'm sure it'll fix almost completely that annoying crackling sound (game dependant of course)... Too bad large GBA roms (32 mb) are not working with the libretro core anymore.

Seriously? So there's no point in even porting this for Libretro? I was curious if the audio rate can be adjusted manually, like as an emulator option for testing purposes.
 

zerofalcon

Well-Known Member
OP
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,918
Country
I tried lower audio rate from 48000 to 32000 khz with no success, if going lower (22050) the audio becomes distorted. I'm searching right now how to configure another audio setting.
About the libretro core, I hope the devs fix the issue with large roms, because any gba core available for wii it's not working with 32 mb files.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
I tried lower audio rate from 48000 to 32000 khz with no success, if going lower (22050) the audio becomes distorted. I'm searching right now how to configure another audio setting.
About the libretro core, I hope the devs fix the issue with large roms, because any gba core available for wii it's not working with 32 mb files.

Is it possible to adjust the frequency in values of one Hz? I remember Snes9x GX having that issue same issue, and using a value of 31850 Hz seemed to remove all crackling. Audio buffering would be the next one to try, if it's there, usually measured in milliseconds, IDK if that can be adjusted.
 
  • Like
Reactions: Margen67

Wiimpathy

Well-Known Member
Member
Joined
Mar 3, 2010
Messages
1,013
Trophies
2
XP
3,124
Country
France
Source code:
https://github.com/mgba-emu/mgba

Yes, the problem with the sound is related to the audio rate, if this can be improved in retroarch I'm sure it'll fix almost completely that annoying crackling sound (game dependant of course)... Too bad large GBA roms (32 mb) are not working with the libretro core anymore.
Can you explain how you compiled it? I had no problem with libretro core, but no luck with the standalone and that cmake.
 
  • Like
Reactions: Margen67

zerofalcon

Well-Known Member
OP
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,918
Country
Can you explain how you compiled it? I had no problem with libretro core, but no luck with the standalone and that cmake.

I'm using CMake 3.3.1 on Linux, after having installed, open a shell prompt, navigate to mgba source root directory, then, (mgba author instructions)

mkdir wii && cd wii
cmake .. -DCMAKE_TOOLCHAIN_FILE=../src/platform/wii/CMakeToolchain.txt -G "Unix Makefiles"
make

after finished you will have a mgba.dol on wii folder.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
I'm using CMake 3.3.1 on Linux, after having installed, open a shell prompt, navigate to mgba source root directory, then, (mgba author instructions)

mkdir wii && cd wii
cmake .. -DCMAKE_TOOLCHAIN_FILE=../src/platform/wii/CMakeToolchain.txt -G "Unix Makefiles"
make

after finished you will have a mgba.dol on wii folder.

Nice, I think if I wanted to compile this, I'd need to install a Linux VM since I'm on Windows. I wonder, though, if Snes9x Next could have a standalone emulator :P Thanks :D
 

Wiimpathy

Well-Known Member
Member
Joined
Mar 3, 2010
Messages
1,013
Trophies
2
XP
3,124
Country
France
Thanks. There were Cmake files left interfering, due to a previous linux build. And there's no simple "make clean" with cmake. Compiling late at night doesn't help either.

Anyway, the standalone runs pretty well indeed. The libretro core has bad performance in comparison, not sure why.
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
Thanks. There were Cmake files left interfering, due to a previous linux build. And there's no simple "make clean" with cmake. Compiling late at night doesn't help either.

Anyway, the standalone runs pretty well indeed. The libretro core has bad performance in comparison, not sure why.

That's...also quite weird, and I'm sure it's simple enough to fix...I think? I know it's still an alpha build but that is baffling :unsure:
 

zerofalcon

Well-Known Member
OP
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,918
Country
Thanks. There were Cmake files left interfering, due to a previous linux build. And there's no simple "make clean" with cmake. Compiling late at night doesn't help either.

Anyway, the standalone runs pretty well indeed. The libretro core has bad performance in comparison, not sure why.

I was playing/testing with mGBA windows version and I think I finally found where lies the problem with the crackling audio, at least with the libretro core... not sure if the standalone port will increase performance. I'm going to make a new repository on github, fork the project and edit the corresponding file for Wii optimization, I dont know if it make sense to make a pull request because this setting maybe will cause issues to other libretro platforms, but for the Wii core it will work wonders. off-topic: retroarch for Wii now have HID support! very nice!
 

the_randomizer

The Temp's official fox whisperer
Member
Joined
Apr 29, 2011
Messages
31,284
Trophies
2
Age
38
Location
Dr. Wahwee's castle
XP
18,969
Country
United States
I was playing/testing with mGBA windows version and I think I finally found where lies the problem with the crackling audio, at least with the libretro core... not sure if the standalone port will increase performance. I'm going to make a new repository on github, fork the project and edit the corresponding file for Wii optimization, I dont know if it make sense to make a pull request because this setting maybe will cause issues to other libretro platforms, but for the Wii core it will work wonders. off-topic: retroarch for Wii now have HID support! very nice!

Whoa, HID support?? Where did that come from? Not that I'm complaining, but dayum that's really cool! And now you figured out what's causing the audio crackle, it is related to the audio buffer size in any way? If the RA version can be fixed, the standalone port should be able to do the same, I think :P
 

zerofalcon

Well-Known Member
OP
Member
Joined
Mar 14, 2009
Messages
814
Trophies
1
Location
Somewhere close to my NES
XP
2,918
Country
Exactly, it's related to the audio buffer samples and I guess lowering the sample rate helps a little bit. Idle loops optimizations should work if configuring correctly but I dont know exactly what values are needed to change this. A funny thing I noticed (libretro core) with Final Fantasy IV Advance: if using a bios file (gba_bios.bin) the game becomes laggy in certain areas (intro after Square Enix and right after starting a new game), and here's the weird part, if using HLE bios (no gba_bios.bin file) the game simply runs faster, a little to none crackling and lagging. But for most games I tested running with a bios file they run almost perfect (98-100%). The sad part? 32 mb roms are not working in retroarch and I hope this gets fixed soon.

Edit: mGBA Wii standalone port now supports tilt sensor and in-progress gyroscope. This is getting better and better.
 
Last edited by zerofalcon,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Least they got head in the end