Welcome! Log In Create A New Profile


Build of Wii Mame [SOLVED]

Posted by nebiun 
Build of Wii Mame [SOLVED]
January 23, 2014 10:01PM
[Hi, I'm Nebiun.
I'm trying to build a more complete version of Wii Mame to contain *every* drivers of original Mame version 0.135.
I downloaded the sources for version 1.0 of Wii Mame and the sources of Mame version 0.135, combined them togheter and built a complete .dol
The size of the final .dol is too big to run on Wii and homebrew channel simply refuse to see it.
Wii Dolphin Emulator crashes loading the .dol
Then I split it in 4 .dol, grouping drivers to obtain an executable with a size digestible from HC.
All 4 .dol running well on Dolphin, but when I try to run them on a real Wii, all of them crash with the same
error: Exception (alignment) occurred!

Using addr2line for debug, I obtained this:

This is the complete dump:
Exception (Alignment) Occurred!
GPR00 00000000 GPR08 00000498 GPR16 00000000 GPR24 00000001
GPR01 811F7AD0 GPR09 80830000 GPR17 00000000 GPR25 00000000
GPR02 80DD2880 GPR10 815AB214 GPR18 00000000 GPR26 00000002
GPR03 814ED6B0 GPR11 00000000 GPR19 00000000 GPR27 814ED6B0
GPR04 811F7AF0 GPR12 74696D72 GPR20 00000000 GPR28 80D07590
GPR05 8153A270 GPR13 80DD4E60 GPR21 00000000 GPR29 814A6027
GPR06 00000000 GPR14 00000000 GPR22 00000000 GPR30 815CAD88
GPR07 80D07590 GPR15 00000000 GPR23 00000000 GPR31 814A5FC0
LR 80283130 SRR0 80283134 SRR1 0000b032 MSR 00001000
DAR 814A605B DSISR 0000201D

80283134 --> 80283130 --> 80203DDC --> 80201C00 -->
80004348 --> 8001203C --> 80011FEC

Someone have an idea to solve the problem?

Edited 1 time(s). Last edit at 03/22/2014 05:53PM by nebiun.
Re: Build of Wii Mame
January 24, 2014 06:59PM
Source code is available if someone is interested.
Re: Build of Wii Mame
January 26, 2014 01:27AM
Is there any data being compiled into the Dol that could be moved to an external source?
Re: Build of Wii Mame
January 26, 2014 02:24PM
Mame is build with separated libraries.
Only few files in these libraries have "big" data. I tried to remove this objs from the dol, reducing the bss to about 3 mb (like version 1.0) but no changes (same crash).
Data segment is about 10 kb (same of version 1.0).
Re: Build of Wii Mame
February 22, 2014 05:35PM
Can it be a loading problem?
Re: Build of Wii Mame
February 23, 2014 01:23AM
This is likely caused by reading or writing floats or doubles to memory that isn't aligned to 4 (for floats) or 8 (for doubles) byte boundaries.
Re: Build of Wii Mame
February 23, 2014 02:08PM
I know, but I put a fprintf on file very early in main routine, and file is never created, then I suppose that the unaligned access is done by loader and not by the program.
There is a flag that I can use to compile the sources to avoid unaligned accesses?
Re: Build of Wii Mame
March 22, 2014 05:20PM

The problem seem due to L2Enhance call.
Removing this call all works flawless

Now I have a wiimame version 1.35 splitted on 4 .dol to play (I hope ;-)) all roms supported by mame 0.135.
Re: Build of Wii Mame [SOLVED]
March 25, 2014 02:25PM
sweet, persistence does pay off!
Re: Build of Wii Mame [SOLVED]
February 28, 2015 10:07AM
Hi. Sorry to bump a year a year old post but any chance of sharing your builds?
Sorry, only registered users may post in this forum.

Click here to login