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

mednafen_psx_hw_libretro.so, mednafen_psx_libretro.s: OpenBIOs issue #866

Open
davidhedlund opened this issue Nov 14, 2022 · 29 comments
Open

Comments

@davidhedlund
Copy link

davidhedlund commented Nov 14, 2022

I can reproduce the issue for Windows 11 (RetroArch 1.10.3), and GNU/Linux (retroarch package 1.12.0-r202210180049+840c4481ab-163~ubuntu22.04.1).

Retroarch setup

  • Retroarch: To avoid conflicts, delete ~/.config/retroarch/, and start Retroarch to generate a new settings directory
  • Retroarch: Main menu -> Online Updater -> Update Assets -- this will fix the fonts for the menu, and the assets are also required to run 240pTestSuitePS1-EMU.cue
  • Retroarch: Main menu -> Online Updater -> Content Downloader -> Sony PlayStation -> 240pTestSuitePS1-EMU.zip
  • Retroarch: Main menu -> Online Updater -> Update Core Info Files
  • Retroarch: Main menu -> Online Updater -> Core Downloader -> Sony - PlayStation (Beetle PSX HW)
  • Retroarch: Main menu -> Online Updater -> Core Downloader -> Sony - PlayStation (Beetle PSX)
  • OpenBIOS: openbios.bin extracted from pcsx-redux-nightly-11167.20221114.1-x64.zip downloaded from https://install.appcenter.ms/orgs/grumpycoders/apps/pcsx-redux-win64/distribution_groups/public (link listed in https://github.com/grumpycoders/pcsx-redux/#where)

I can use 240pTestSuitePS1-EMU.cue with the OEM BIOS, but not with OpenBIOS (black screen, and no error message in the terminal:

  • Beetle PSX HW: retroarch --libretro ~/.config/retroarch/cores/mednafen_psx_hw_libretro.so ~/.config/retroarch/downloads/240pTestSuitePS1-EMU.cue
  • Beetle PSX: retroarch --libretro ~/.config/retroarch/cores/mednafen_psx_libretro.so ~/.config/retroarch/downloads/240pTestSuitePS1-EMU.cue
@hizzlekizzle
Copy link
Contributor

hizzlekizzle commented Nov 15, 2022

This (and the other issues like it) is more of an OpenBIOS issue, right? That is, the failure to run isn't caused by a deficiency with these emulators, but rather a deficiency in the BIOS?

EDIT: I just read through the issue at grumpycoders/pcsx-redux#1027 (it would probably be good to put some of that context into the issues themselves) and it seems OpenBIOS works with the 240p Test Suite ROM on actual hardware? I'm not sure if I'm reading your testing matrix correctly, but it appears non-HW beetle-psx works? Have you tried any of the libretro cores with dynarecs disabled?

@nicolasnoble
Copy link

For what it's worth, OpenBIOS boots and runs many games properly, on the real hardware, as well as a series of emulators. All of the code is public and buildable easily, which should help debugging what's going on. Feel free to come asking questions about it, but I'm not necessarily going to actively monitor issues posted on other repositories.

@davidhedlund
Copy link
Author

davidhedlund commented Nov 15, 2022

This (and the other issues like it) is more of an OpenBIOS issue, right? That is, the failure to run isn't caused by a deficiency with these emulators, but rather a deficiency in the BIOS?

EDIT: I just read through the issue at grumpycoders/pcsx-redux#1027 (it would probably be good to put some of that context into the issues themselves) and it seems OpenBIOS works with the 240p Test Suite ROM on actual hardware? I'm not sure if I'm reading your testing matrix correctly, but it appears non-HW beetle-psx works?

Sorry but the non-HW beetle-psx doesn't work, I updated the text this morning since I accidentally wrote that it worked yesterday (that was just for the OEM BIOS).

So how do we figure out if this a BIOS or emulator issue?

@hizzlekizzle
Copy link
Contributor

Well, the best test would be to use OpenBIOS with an actual PS1 console and try the test ROM there first. I don't know if such a thing is possible, but if it works in that setting but not in an emulator, it's the emulator's problem.

@davidhedlund
Copy link
Author

Well, the best test would be to use OpenBIOS with an actual PS1 console and try the test ROM there first. I don't know if such a thing is possible, but if it works in that setting but not in an emulator, it's the emulator's problem.

@nicolasnoble Can you please leave some feedback to us.

@nicolasnoble
Copy link

It's very doable to run OpenBIOS if you have a console with a parallel port. OpenBIOS can run from a cheat cart, such as the cheap power replay you can find on aliexpress (or any other clone). It's possible to build flashable roms for cheat carts from source, and I'm providing prebuilt versions in the PCSX-Redux nightly releases.

There are some differences in the build between the bios chip build and the cheat cart rom build, but not enough to really trigger bugs like those described here. Once you boot the console with the OpenBIOS rom flashed to a cheat cart, the console will basically behave as if you were running OpenBIOS straight from the bios chip. Using a chipped console, or a console with an xstation, you could then run test disks like the 240p suite, or anything else, really. Replacing the actual bios of a machine is doable too, with some simple hardware modifications.

I've tested OpenBIOS on the real hardware with a few games successfully, but not extensively, and I haven't tested the 240p suite myself. Some other people have had success too, so I know I'm not the only one. People like @ramapcsx2, @johnbaumann, or @JonathanDotCel could probably do this test right now for you.

@LibretroAdmin
Copy link
Contributor

Hi there, are you the author of OpenBIOS?

@nicolasnoble
Copy link

Hi there, are you the author of OpenBIOS?

Yes.

@JonathanDotCel
Copy link

Hi, can't speak to the accuracy of any particular test, but certainly they all work on HW for me.

Latest openbios ROM:
https://install.appcenter.ms/orgs/grumpycoders/apps/pcsx-redux-win64/distribution_groups/public

Latest testsuite (PS1 version):
https://github.com/filipalac/240pTestSuite-PS1/releases/tag/19122020

With xStation on a japanese 5k machine

@ramapcsx2
Copy link

Can confirm, it works with the OpenBIOS Cart + Unirom setup, and a fixed image of the 240p test suite:
filipalac/240pTestSuite-PS1#12
The original release is badly mastered and cannot possibly work :p
(Data headers are 0x0A for minute 10, which should be 0x10)

@nicolasnoble
Copy link

nicolasnoble commented Nov 15, 2022

Oh Gods no, this is utterly outdated. I've moved away from this to use AppCenter instead.

@hizzlekizzle
Copy link
Contributor

Thanks for the info, gang. Ok, yeah, since the 240p test suite works with OpenBIOS on real hardware, we can/should aim for that, as well.

In my brief testing in Linux with latest OpenBIOS, RA nightly and latest pull of each core:
PCSX-reARMed w/ dynarec x86_64 (I think that's lightrec?): black screen. 'skip BIOS animation' deadlocks
PCSX-reARMed w/ interpreter: black screen unless 'skip BIOS animation' is enabled, in which case it works
beetle-psx-hw w/ interpreter: black screen. No change with 'skip bios' ON
beetle-psx-hw w/ lightrec (interpreter or dynarec): BIOS animation stays on rotating cube forever. Switching back to beetle interpreter during runtime freezes the cube. No change with 'skip BIOS' ON
swanstation: works with both dynarec and interpreter

As you may have guessed from my testing, I guessed that CPU emulation is related :)

@davidhedlund
Copy link
Author

Oh Gods no, this is utterly outdated. I've moved away from this to use AppCenter instead.

Thanks! I tested openbios.bin from pcsx-redux-nightly-11167.20221114.1-x64.zip. The results in grumpycoders/pcsx-redux#1027 for the emulators were identical except that SwanStation that also runs OpenBIOS on Ubuntu with the new version of OpenBIOS. I updated the list.

@davidhedlund
Copy link
Author

Can confirm, it works with the OpenBIOS Cart + Unirom setup, and a fixed image of the 240p test suite: filipalac/240pTestSuite-PS1#12 The original release is badly mastered and cannot possibly work :p (Data headers are 0x0A for minute 10, which should be 0x10)

Thanks for the submitted issues for the 240p test suite. However, it has not been maintained in 2 years.

@hizzlekizzle
Copy link
Contributor

I think probably the next step would be to verify that the upstream/standalone mednafen psx and pcsx-rearmed programs have the same behavior as the libretro cores and, if so, use their debuggers to figure out where things are going awry.

@LibretroAdmin
Copy link
Contributor

FWIW, we would be open to any PRs that would integrate OpenBIOS into Beetle PSX core proper as some kind of built-in HLE BIOS feature. I think that could personally be an awesome feature that could make this core a lot more convenient out of the box for endusers. Out of the 3 main PS1 emulator cores we have so far, only PCSX ReARMed does not require the user to supply a commercial BIOS. So it'd be great if Beetle PSX had similar functionality.

@davidhedlund
Copy link
Author

davidhedlund commented Nov 16, 2022

FWIW, we would be open to any PRs that would integrate OpenBIOS into Beetle PSX core proper as some kind of built-in HLE BIOS feature. I think that could personally be an awesome feature that could make this core a lot more convenient out of the box for endusers. Out of the 3 main PS1 emulator cores we have so far, only PCSX ReARMed does not require the user to supply a commercial BIOS. So it'd be great if Beetle PSX had similar functionality.

This is exactly why I submitted these issues. Please have a look at grumpycoders/pcsx-redux#1027 -- please say something there so I can @ you.

I'd be happy if you'd like to coordinate your team to solve the OpenBIOS bugs for the libreto-cores so they can be shipped with the BIOS.

@davidhedlund
Copy link
Author

davidhedlund commented Nov 17, 2022

@LibretroAdmin Is it possible to perform the steps that I mentioned in the top post from the terminal (if so what are the commands?):

  • Retroarch: Main menu -> Online Updater -> Update Assets
  • Retroarch: Main menu -> Online Updater -> Content Downloader -> Sony PlayStation -> 240pTestSuitePS1-EMU.zip
  • Retroarch: Main menu -> Online Updater -> Update Core Info Files
  • Retroarch: Main menu -> Online Updater -> Core Downloader -> Sony - PlayStation (Beetle PSX)

@hizzlekizzle
Copy link
Contributor

the online updater is not usable via CLI. You could just wget/curl the files, though. They're all publicly accessible from buildbot.libretro.com.

@davidhedlund
Copy link
Author

the online updater is not usable via CLI. You could just wget/curl the files, though. They're all publicly accessible from buildbot.libretro.com.

Thanks. However, http://buildbot.libretro.com/assets/ does not contain the sub-directory called ozone that is needed by the default menu driver). Same issue retroarch-assets package that installs /usr/share/libretro/assets/, no ozone sub-directory.

@hizzlekizzle
Copy link
Contributor

hizzlekizzle commented Nov 17, 2022

http://buildbot.libretro.com/assets/frontend/assets.zip is the package you want for the icons. http://buildbot.libretro.com/assets/frontend/info.zip is the core info files. http://buildbot.libretro.com/nightly/linux/x86_64/latest/ is where to find precompiled nightly linux x86_64 cores. http://buildbot.libretro.com/assets/cores/Sony%20-%20PlayStation/240pTestSuitePS1-EMU.zip is the link to the PS1 240p Test Suite build that's on the content downloader.

@davidhedlund
Copy link
Author

http://buildbot.libretro.com/assets/frontend/assets.zip is the package you want for the icons. http://buildbot.libretro.com/assets/frontend/info.zip is the core info files. http://buildbot.libretro.com/nightly/linux/x86_64/latest/ is where to find precompiled nightly linux x86_64 cores. http://buildbot.libretro.com/assets/cores/Sony%20-%20PlayStation/240pTestSuitePS1-EMU.zip is the link to the PS1 240p Test Suite build that's on the content downloader.

Thanks a lot! Everything in place of what I needed.

@davidhedlund
Copy link
Author

davidhedlund commented Nov 17, 2022

@LibretroAdmin http://buildbot.libretro.com/ links don't redirect to the HTTPS protocol (for example http://buildbot.libretro.com/assets/frontend/assets.zip should redirect to https://buildbot.libretro.com/assets/frontend/assets.zip. Where should I report this?

@hizzlekizzle
Copy link
Contributor

AFAIK, this is known behavior.

@davidhedlund
Copy link
Author

AFAIK, this is known behavior.

Firefox canceled the download automatically and warned me that a non-secure connection tried to establish.

@hizzlekizzle
Copy link
Contributor

You should be able to override that behavior: https://www.ghacks.net/2021/08/13/firefox-will-block-insecure-downloads-soon-by-default/

@Mrmath7
Copy link

Mrmath7 commented Jan 2, 2023

They need to update beetle psx hw core to latest.

@hizzlekizzle
Copy link
Contributor

@Mrmath7 can you elaborate? who and to what end?

@mudlord
Copy link
Contributor

mudlord commented Feb 6, 2023

I imagine they just want it done. For reasons , of course. 🙄

Doesn't matter if it affects accuracy or not, people just seem newer == better.

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

8 participants