Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WiiU] Build recipe for WiiU? #171

Open
Ploggy opened this issue Oct 25, 2021 · 9 comments
Open

[WiiU] Build recipe for WiiU? #171

Ploggy opened this issue Oct 25, 2021 · 9 comments

Comments

@Ploggy
Copy link

Ploggy commented Oct 25, 2021

I'm wanting to try and compile the Opera Core for WiiU but it doesn't have a build recipe in the Makefile and I don't know what to add.

What would I need to add to the Makefile so I can compile the Core?

@Ploggy
Copy link
Author

Ploggy commented Oct 26, 2021

I manged to Compile the Core, I have no idea if what I put in the Makefile was correct or not but when I boot a Game all I get is a blackscreen, no errors though.

This is what I added to the Makefile:

Nintendo Wii U

else ifeq ($(platform), wiiu)
TARGET := $(TARGET_NAME)libretro$(platform).a
CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
AR = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
CFLAGS += -DGEKKO -DWIIU -DHW_RVL -DHW_WUP -mwup -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST
STATIC_LINKING = 1

@Ploggy
Copy link
Author

Ploggy commented Oct 26, 2021

I get this error if I try to select "Start Core" to boot the bios
20211026_043125

@trapexit
Copy link
Collaborator

Looks like a null pointer is attempted to be resolved. Perhaps a bug in my new nvram handling code. Will have to look over it. Might be something with WiiU / static built targets.

@Ploggy
Copy link
Author

Ploggy commented Oct 26, 2021

Thank You, :)

@vaguerant
Copy link

I was just experimented with building 7369aa8, before the NVRAM changes, and there's no DSI error on Start Core. It does still blackscreen when doing either Start Core or loading content. Building the latest commit as of right now, d8aa7ce, I got the same result as Ploggy. Either we're both doing it wrong in the same way (entirely plausible) or there is another issue here besides the NVRAM handling.

I built with the following recipe. Like Ploggy (no disrespect!), I'm just fumbling around and seeing what happens. Do assume that this is wrong:

# Nintendo Wii U
else ifeq ($(platform), wiiu)
   TARGET := $(TARGET_NAME)_libretro_$(platform).a
   CC  = $(DEVKITPPC)/bin/powerpc-eabi-gcc$(EXE_EXT)
   CXX = $(DEVKITPPC)/bin/powerpc-eabi-g++$(EXE_EXT)
   AR  = $(DEVKITPPC)/bin/powerpc-eabi-ar$(EXE_EXT)
   STATIC_LINKING = 1
   FLAGS += -DWIIU

In case you're not familiar, the Wii U is a big-endian platform, so one or both of the issues here may be endian-related.

@trapexit
Copy link
Collaborator

Yes, I'm aware the Wii U is big endian. It is also, AFAIK, a statically compiled and bundled with RA platform. Opera has not been tested on big endian platforms and contains little in the way of managing endianness. Without access to a big endian traditional build environment I suspect it will be difficult to fix this. The NVRAM change is likely related to the special way it's bundled and how the underlying functions work on the platform. I will need to investigate how to replicate that.

@trapexit
Copy link
Collaborator

OK. I still need to clean up some stuff that I misunderstood when I made the nvram change but #172 should address the particular issue in the screenshot.

As for whether it works on big-endian... I have a Wii U and it is hacked but I've never built anything for it and debugging might be a serious pita. I really don't know. But when I would make sure the bios is installed right and just try starting the core without a game. If still a black screen then probably some big-endian issue that we'll have to investigate further. That said I really don't know if it will be fast enough. As I understand... someone tried porting 4DO to Xbox360 and it wasn't fast enough. That seems surprising to me but 🤷‍♂️

@Ploggy
Copy link
Author

Ploggy commented Nov 18, 2021

Ok, had a chance to compile Opera with that fix, it no longer crashes when starting the Core but I'm now just getting a Blackscreen as you suspected, Big-Endian stuff then?
The bios is all present and correct ;)

@trapexit
Copy link
Collaborator

Big-Endian stuff then?

That would be my guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants