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

[Wii] Doesn't load, freezes on a black screen #373

Open
Cee123 opened this issue Apr 15, 2021 · 22 comments
Open

[Wii] Doesn't load, freezes on a black screen #373

Cee123 opened this issue Apr 15, 2021 · 22 comments

Comments

@Cee123
Copy link

Cee123 commented Apr 15, 2021

The core will not even load into memory - upon loading the core, it just freezes on a black screen.

@sonninnos
Copy link
Collaborator

Is this still the case?

@Cee123
Copy link
Author

Cee123 commented Sep 11, 2021

Is this still the case?

I don't know, I haven't looked at this for a while. I'll test it out and see if it still has issues.

@Cee123
Copy link
Author

Cee123 commented Sep 27, 2021

Is this still the case?

I just tried this and as of 27/09/21 with the latest nightly, it's exactly the same. Nothing's changed here. Still black screen, doesn't work.

@vonmillhausen
Copy link

Still the case with the 1.15 release, sadly :(

@sonninnos
Copy link
Collaborator

Without logs it is impossible to start guessing what the reason might be.

@vonmillhausen
Copy link

Without logs it is impossible to start guessing what the reason might be.

For what it's worth, here's the log (this is full Debug logging turned on in the menu) - as you can see, there's not a lot. As soon as you choose to load the Vice cores, the console locks up with a black screen, and must be force-powered-off.

retroarch__2023_06_13__00_05_57.log

Perhaps the fact that (given the lack of logging) it appears the core locks the console very early in the loading process is itself a clue? I hope it helps! Let me know if there's anything else I can do to help here - if you want to build a core version with even more logging turned on or something, I'm more than happy to do tests on real hardware for anyone on the dev team 👍

@sonninnos
Copy link
Collaborator

Unfortunately indeed not helpful since there is no "good part" in the log, and no mention of even starting the core at all.. Buildbot build logs look clean also, so not much to go on.

@vonmillhausen
Copy link

Unfortunately indeed not helpful since there is no "good part" in the log, and no mention of even starting the core at all.. Buildbot build logs look clean also, so not much to go on.

Aye, which as I say must mean the core is failing to load very early in the load process.

Hypothetically speaking, if it was loading successfully, what's the first debug level log entry you would expect to see? If that log entry (whatever it is) isn't being generated, then that must mean the core is failing before that point. What does the core do before that point? Something in there is the culprit.

As I say, I'm more than happy to do any testing you want to get this old (2+ years) issue closed out, and get this core working again. Would it be possible to make a debug build of the core that has additional logging for every step early in the load process? If you can get a build to me that is as verbose as possible in terms of logging, I can get you a log that's useful.

@ghost
Copy link

ghost commented Aug 28, 2023

I loaded a small core like Handy (2.94 MB) and it launches the menu okay. This is before you even press "Load Core" button.

Vice is 5.99 MB - is it breaking some memory limit in Retroarch itself? I'm not following why the frontend is black-screening.

@ghost
Copy link

ghost commented Aug 28, 2023

Loaded fbalpha2012 = 14.2 MB. Displays frontend okay.

:huh:

@ghost
Copy link

ghost commented Aug 30, 2023

Does anyone know roughly when the Wii was last working? @Cee123?

I tried this old commit from Oct. 2018 and it still black screens before the menu.
d6112d6

I can't find a working devkit to build older Wii RA frontends.

@ghost
Copy link

ghost commented Sep 1, 2023

Tried building all commits, even first one. None seem to load into memory. Unsure it ever worked as no one mentions it in forums.

Frodo was ported to Wii and mentions that 2020 Vice failed.
https://www.lemon64.com/forum/viewtopic.php?t=76082

PSP Vice looks custom built.
https://github.com/rsn8887/pspvice

Only when I strip out nearly everything from libretro-core.c does it try to boot. Maybe the Wii doesn't have enough memory?

This is a Github Actions build script if someone else wants to tinker.

on:
  push:
  workflow_dispatch:


jobs:

  build-libretro:
    strategy:
      matrix:
        arch: [wii]
        core: [64]
      fail-fast: false


    runs-on: ubuntu-latest

    steps:

    - shell: bash
      run: |
        git clone https://github.com/libretro/vice-libretro core
        cd core


        # devkitppc r29, 2018-05-22
        docker run --rm -v "$PWD:/build" devkitpro/devkitppc:20180522 sh -c "cd /build; make -f Makefile -j`nproc` platform=wii"


    - shell: bash
      run: |
        git clone https://github.com/libretro/RetroArch.git retroarch
        cd retroarch

        docker run --rm -v "$PWD:/build" --network=host devkitpro/devkitppc:20180522 sh -c "cd /build; make -f Makefile.wii.salamander"

        mv ../core/vice_x64_libretro_wii.a libretro_wii.a
        docker run --rm -v "$PWD:/build" --network=host devkitpro/devkitppc:20180522 sh -c "cd /build; make -f Makefile.griffin platform=wii"


    - uses: actions/upload-artifact@main
      with:
        name: vice_${{ matrix.core }}_${{ matrix.arch }}
        path: ${{ github.workspace }}/retroarch/**.dol

@sonninnos
Copy link
Collaborator

Could it perhaps just be something simple like a makefile flag..?

@ghost
Copy link

ghost commented Sep 3, 2023

That's an interesting point. I'll compare some other Wii Makefiles and dumb down the switches. I'll let everyone know what I tried when I get the chance. ;)

@ghost
Copy link

ghost commented Sep 5, 2023

O0 = no.

# Wii
else ifeq ($(platform), wii)
   TARGET := $(TARGET_NAME)_libretro_wii.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)
   COMMONFLAGS += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float -D__ppc__ -DMSB_FIRST
   COMMONFLAGS += -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
   COMMONFLAGS += -DHAVE_STRTOUL -DWII
   STATIC_LINKING = 1

No.

I know nothing about Wii arch / asm so can't help here.

@saulfabregwiivc
Copy link

same issue here, any clues?

@sonninnos
Copy link
Collaborator

I'm afraid clues are out of stock until someone with the hardware starts to debug.

@vonmillhausen
Copy link

I don't have the technical chops to do any debugging myself - but I have the Wii hardware all set up and ready to go, so if you can put together a debug build with a bunch of extra logging or something, I'm happy to run it for you and post the results 👍

@sonninnos
Copy link
Collaborator

There is no way for me to do anything like that from where I'm sitting.

There is also no way of knowing where it hangs and what is happening if there is no core outputted log that starts with something this

[libretro INFO] --------------------------------------------------------------------------------
[libretro INFO] VICE x64sc (C64) 3.7 d205e29b3, Jan 22 2024 12:15:58
[libretro INFO] --------------------------------------------------------------------------------

Is the previous log really done with both frontend and core log levels at 0? It is missing a lot of stuff regardless even if it is not running a core. Besides now I noticed it looks like it was running the core called "2048"..?

[INFO] [Runtime]: Saving runtime log file: "sd:/retroarch/playlists/logs/2048/2048.lrtl".

@saulfabregwiivc
Copy link

Don't know if that helps but i've tried to run this in Dolphin and it doesn't write any log, but at least the emulator throws me this error, likely with that it is possible to address this issue:

image

Question: try debugging it with the latest development versions of Dolphin emulator? http://dolphin-emu.org/download

@saulfabregwiivc
Copy link

Some few updates:

When i modify the retrodep/archdep.c file for fix the location of the archdep files when compiling for Wii, it actually compiles into a dol.
I only got to start the core when compiled with RetroArch v1.9.0.

However, it crashes when you start a game.

Here's the patch if you're interested: saulfabregwiivc@1aa90fe

@saulfabregwiivc
Copy link

Btw, anyone can tell me how i can install the required libraries used by this Libretro port of VICE so i can compile it properly?
There are too many libraries used by this port and i just can't figure out how i can put the required libraries files into the correct paths required by the files (e.g. on #include "arch/shared/archdep_access.c" in retrodep/archdep.c)

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

No branches or pull requests

4 participants