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] WHDLoad support (and other stuff) broken on Wii U? #427

Open
vaguerant opened this issue Jun 14, 2021 · 6 comments
Open

[WiiU] WHDLoad support (and other stuff) broken on Wii U? #427

vaguerant opened this issue Jun 14, 2021 · 6 comments

Comments

@vaguerant
Copy link

User error is a strong possibility here as I'm not very familiar with the Amiga, however it's worth noting that this core is fairly ... unstable on Wii U as a whole, so I wouldn't be surprised if there were other issues.

When launching a WHDLoad game, I see behavior identical to #381. I simply get dropped onto the Kickstart screen (I assume--the gray AmigaDOS workbench screen). I don't have the BootHD option configured as was the issue there and I'm not forcing any specific hardware. Here is a log of me attempting to launch a game.

retroarch.log

The part that looks most suspect to me in the log is the following:

[libretro INFO] WHDLoad failed to install 'kick33180.A500'
[libretro INFO] WHDLoad failed to install 'kick34005.A500'
[libretro INFO] WHDLoad failed to install 'kick40063.A600'
[libretro INFO] WHDLoad failed to install 'kick40068.A1200'

I have all of those files in my retroarch/cores/system directory, and they seem to be recognized without issue when running ADF format games.

Besides this, there's a whole bevy of Wii U issues

  • Loading a CHD for a CD32 game, full console crash
  • Loading a CD32 game (bin/cue) then exiting or restarting RetroArch, full console crash
  • The claimed default key mappings are nonworking (e.g. RetroPad X does not trigger Keyboard Space unless the user explicitly maps it as such)
  • Physical keyboards are completely nonfunctional--they work in other cores like VICE x64 for Commodore 64 emulation, but do nothing here
  • This is another one that may be a me problem, but the one CD32 game I tried to play (The Humans) launches into the language selection screen, then once I select a language, drops me back at the CD32 BIOS animation. I can keep doing this on an endless loop

The result of this is that the core is of fairly limited use on Wii U. Keyboard-heavy games are basically unusable without a physical keyboard (the virtual keyboard exists but is not a satisfying way to play anything), and WHDLoad and CD32 support may both be completely broken (latter needs more testing). Floppy disk format games which rely only on the joystick seem like the only truly playable content on this platform.

@sonninnos
Copy link
Collaborator

I made the logging a bit clearer now, but indeed it appears that the Kickstart copying fails because the destination directory is not where it should be after the image contents are supposed to get unzipped. So the automatically created WHDLoad directory looks like to empty, because it is not listed in the log where WHDSaves is. You could try manually copying the files from /whdload/WHDLoad_files/ found in this repo.

HDF mode is worth a try too, since the embedded data that will be uncompressed is gz, and the default Files-mode is zip (because gz is for single files, and zip is for multiple). Same manual copy manoeuvre applies if the extraction fails.

And the rest of the randomness indeed hint that there are also some memory leaks that cause symptoms in seemingly innocent places. For example keyboard and RetroPad remap code is pretty much identical in VICE.

But please do post logs of those CHD and BIN crashes separately.

@vaguerant
Copy link
Author

vaguerant commented Jun 15, 2021

CHD crash:
retroarch-puae-wiiu-chdcrash
retroarch-puae-wiiu-chdcrash.log

Towards the end of the log is a line saying IMAGE driver open followed by a bunch of null bytes (0x00). Not sure if that's normal behavior, but regardless it causes my text editor to refuse to read the file as an unknown text format. I had to open it in a hex editor to view it.

Will continue testing the other things as suggested and edit with results.

EDIT: I'm having a hard time pinning down the CD32 bin/cue issue. If I just start a game then immediately exit RetroArch without doing anything else, it doesn't hang. But if I mess around in the Options (changing system configurations, e.g. emulated model from Automatic to CD32 2MB+8MB and back to Automatic again), I can get it to hang pretty reliably with any number of menu selections: Restart (the content itself), Restart RetroArch and Exit RetroArch all trigger a freeze. Unfortunately, this particular issue just causes the console to lock up, so there's no stack dump and logs don't get flushed out, so there's nothing particularly useful to share diagnostically. I'm just a lay user, but it does "feel" kinda memory-leak-y.

EDIT 2: Attempting to use a WHDLoad game on the latest build with clearer logging, I get the following:

retroarch-puae-wiiu-whdload.log

Which notably includes:

[libretro INFO] WHDLoad image directory 'sd:/retroarch/cores/savefiles/PUAE/WHDLoad' not found, attempting to create one
[libretro ERROR] Unable to create WHDLoad image directory: 'sd:/retroarch/cores/savefiles/PUAE/WHDLoad'

I can confirm that that directory does exist (and was empty, as you suggested), so something's clearly not going well. However, copying the files straight off the repo seems to have resolved this one entirely, I just launched my first WHDLoad game and it's running with no issues so far.

@sonninnos
Copy link
Collaborator

Nice. It might be some endian shenanigans in the zlib then, because both CHD and ZIP features use it.

@sonninnos
Copy link
Collaborator

Any difference now with the latest changes?

@vaguerant
Copy link
Author

Testing on 6df64de.

Going down the list recording which issues have been resolved:

  • Loading a WHDLoad game without manually copying the WHDLoad directory fails
    works if the WHDLoad directory is manually populated
  • Loading a CHD for a CD32 game causes crash
    no longer crashes, but I ended up on a key screen, not sure what it means. Same image converted to bin/cue doesn't do this.
  • After loading a CD32 game, certain things (?) cause console to hang
    e.g. launch CD32 title, then select Close Content = hang
  • Default keymaps on joypad are not respected
  • Physical keyboard support is not working
    seems a bit better but behaving oddly, only some keys work. I pressed the full set of alphanumeric keys (1-0, q-p, a-l, z-m) and the following was the result:
1234567890
[none of qwertyuiop works at all]
dgj
cvb
  • The Humans (CD32) gets stuck in boot loop

@sonninnos
Copy link
Collaborator

Something might have changed again, so please test at least the keymap stuff.

The "key screen" in CD32 is the NVRAM manager, which is only accessible without the disc inserted. Log would be nice.

Did you enable "Game Focus" for keyboard tests, since otherwise the frontend will block any presses that would be doing multiple things?

@sonninnos sonninnos changed the title WHDLoad support (and other stuff) broken on Wii U? [WiiU] WHDLoad support (and other stuff) broken on Wii U? May 29, 2022
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

2 participants