Homebrew Official Retroarch WiiU (wip.)

  • Thread starter Thread starter aliaspider
  • Start date Start date
  • Views Views 2,714,858
  • Replies Replies 15,206
  • Likes Likes 93
@QuarkTheAwesome do you happen to know that the debugger is logging about the DosBox dynarec Radius ported to PPC?

Doesn't look like an easy one - likely some bad pointer math, or they're relying on some mprotect-ish function that's not really a thing on WiiU. dynarecs have gotta have at least a little bit of WiiU-specific code to make 'em work, be it through the usual OSCodegen methods or something a lil' more kernel-ly - you've gotta take the generated code and mark it as executable before you can run it.

Taking a guess based on the stuff on git w/o looking at a binary, my money's on this pointer being uninitialized, which isn't great because we try and jump to it here. Should've been initialized here, can't trace it much further than that
wonder if it'd run under Decaf?
 
Doesn't look like an easy one - likely some bad pointer math, or they're relying on some mprotect-ish function that's not really a thing on WiiU. dynarecs have gotta have at least a little bit of WiiU-specific code to make 'em work, be it through the usual OSCodegen methods or something a lil' more kernel-ly - you've gotta take the generated code and mark it as executable before you can run it.

Taking a guess based on the stuff on git w/o looking at a binary, my money's on this pointer being uninitialized, which isn't great because we try and jump to it here. Should've been initialized here, can't trace it much further than that
wonder if it'd run under Decaf?

jmarsh (the dev behind the dynarec) said:

It's not uninitialised, it's just not executable. You need to use the wiiu equivalent of mmap/mprotect to make it so, not sure if that's what OSCodegen does or if it's more complicated e.g. having to switch memory back and forth between writable or executable.
 
jmarsh (the dev behind the dynarec) said:
of course saw that pointer starting with 0x1777 and went "uhh" but no, that it a totally valid MEM2 address

OSCodegen is a little more complex than the standard mprotect, there's a dedicated memory area and (as jmarsh suggested) it can either be r-x or rw-, not rwx. Here's some docs - they're not in wut yet, otherwise I'd link there, I'll get that fixed when I can. I assume the JITed code doesn't try and overwrite itself or anything so the rx/rw thing should be fine. a more interesting issue could be getting the code into that dedicated memory area (see OSGetCodegenVirtAddrRange), which afaict would be disabled under Mii Maker anyway. so I guess you're looking at the retroarch forwarder or the HBL channel to make this work.
 
Not sure what you mean with MiiMaker, I have always used HBL or the forwarder.
This is all beyond my area of expertise...

Still, reading the docs

--------------------- MERGED ---------------------------

So I figure

Code:
void OSGetCodegenVirtAddrRange(uint32_t *outaddr, uint32_t *outsize)

Will give me an address space and it's size.
But what about this note?

Codegen
These functions are used for managing the codegen/JIT area which begins at virtual-memory address 0x01800000. The codegen area size, whether codegen can be used at all, and permissions/etc are loaded from cos.xml for the process. Hence, almost all processes which don't use WebKit don't have access to codegen. These permissions include the coreid which is allowed to use codegen at all(with Internet Browser this is core1). These permissions also seem to include whether the process is allowed to use OSCodegenCopy(Internet Browser isn't allowed to use it). Certain Virtual Console titles seem to be the only applications which are allowed to use OSCodegenCopy due to cos.xml(codegen_core is set to 40000001 for these, unlike 80000001 for browser-based titles).

Particularly the webkit part, we don't use webkit, so does that mean it won't work?
 
Not sure what you mean with MiiMaker, I have always used HBL or the forwarder.
This is all beyond my area of expertise...

Still, reading the docs

--------------------- MERGED ---------------------------

So I figure

Code:
void OSGetCodegenVirtAddrRange(uint32_t *outaddr, uint32_t *outsize)

Will give me an address space and it's size.
But what about this note?



Particularly the webkit part, we don't use webkit, so does that mean it won't work?
re: webkit, it's all good - the only reason that's there is because the most common use of the codegen stuff is webkit, but other apps like the DS VCs also use it without issue. The problem for us would be that it needs to be specifically allowed in cos.xml; and I'm not sure if the current HBL channel or RA forwarder have that (though we can add it).
I mention MiiMaker since certain methods of loading HBL (Haxchi/CBHC, browserhax) will inject it into Mii Maker instead of its own title, which would mean codegen is always disabled for people using those methods. CFW work could potentially be done to re-enable it, though...
 
DOSBox dynarec on WiiU?
Nice @Radius4 ! Hope this can help us to understand better how dynarec works on WiiU for futher cores :)
Also OpenGL on WiiU is mandatory for mupen-next.
 
  • Like
Reactions: CORE
i'm having a heck of a time getting shaders to work. searching around lead me to hunterk blog post for shaders yet i they don't show up in the list? i just want some scanlines haha
 
Has anyone been successful in getting Demon Front to run with any of the arcade cores?

If so could you please share your settings?


only few of IGS, Poly Mastergames or Caves works on Wii U and on Switch does run perfect with IGS, Poly Mastergames and Caves.
 
It isn't extremely difficult, it's just there are only very few people working on Wii U... That's why we rarely see some advancement.

For example : Picodrive hasn't been ported yet (32X games) because no one tried to work on it yet...

Well thanks devs for all your hardwork.
 
Last edited by depaul,
Thank you. Which games work on WiiU? How to get them to work and what core is most suitable? Mame or FBA cores?
U can have retroarch scan the files and after that it will pop in every catalogies u can try it out sometime it will not be 1 file sometime it has to duplicate it like digdug.rom and digdug1.rom u will run digdug1.rom if digdug dont run.
 
How do I turn the shaders off? The Caligari one looks brilliant on the TV screen but a mess on the Game Pad.

Bit I can't find away to disable it .:rofl2:
 
How do I turn the shaders off? The Caligari one looks brilliant on the TV screen but a mess on the Game Pad.

Bit I can't find away to disable it .:rofl2:
I haven’t found a shader or filter that looks great on both places at once so its something they would have to add somewhere down the road. What I usually do is save a Gamepad setting and a default setting for when playing on the big screen.
 
  • Like
Reactions: Ewpb
About Retroarch speed :
Just confirmed that the Wii U version suffers from abnormally slow file access.
This is simple test on the same Wii U machine, using the neogeo game : "KOF94.zip" (size = 12 MB)

- Using Wii U : cores + rom installed on SD card. Loading the rom takes 11 s.
- Using the vWii, using Retroarch-Wii version : cores + rom installed on fat32 USB. Loading the rom barely takes 3s!

Also, the Wii U Retroarch takes almost 25s to start, while the vWii version takes 7s to start.

Conclusion : We could see about 200% speed increase if Retroarch could use USB interface instead of SD card.
Edit : I opened an issue on RA github.
 
Last edited by depaul,
  • Like
Reactions: Arnold101 and CORE
Yes I/O is as a whole slow AF on Wii U.
Downloads take a loong time, and reading and writing to the SD is slow (even getting achievement badges is very slow)

FTP is slow without IOSUHAX so I figure it's something related.
 
  • Like
Reactions: depaul

Site & Scene News

Popular threads in this forum