libretro / quasi88-libretro

A port of QUASI88, a PC-8800 series emulator by Showzoh Fukunaga, to the libretro API
BSD 3-Clause "New" or "Revised" License
7 stars 22 forks source link

[Switch] Disk files remain open when the core closes #47

Closed cucholix closed 3 years ago

cucholix commented 3 years ago

Using latest quasi88 as 5-june 2021, and it’s not possible load a game from playlist when the same game as been previously closed.

Steps: 1 Load game X from playlist 2 Close game X from Quick Menu 3 Load the same game X from playlist 4 A message error will appear “File could not be loaded from playlist”

Loading the game from contents doesn’t have this behavior

celerizer commented 3 years ago

Are you sure this is a problem with the core itself, and not RetroArch? Can you describe what software you're trying to load?

On Sat, Jun 5, 2021 at 1:34 PM cucholix @.***> wrote:

Using latest quasi88 as 5-june 2021, and it’s not possible load a game from playlist when the same game as been previously closed.

Steps: 1 Load game X from playlist 2 Close game X from Quick Menu 3 Load the same game X from playlist 4 A message error will appear “File could not be loaded from playlist”

Loading the game from contents doesn’t have this behavior

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/libretro/quasi88-libretro/issues/47, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5UPFWKCJT5QUF7JTCJYWLTRJUZ7ANCNFSM46E3KFDA .

cucholix commented 3 years ago

The game is “Choplifter.d88” but any game exhibits this same issue. I’ve tried other cores with the same RA build as quasi88 and don’t have this issue.

celerizer commented 3 years ago

Could you take a look at the history playlist with a text editor and confirm it points to the correct location?

As well, are you using the option that saves changes back to the disk instead of saving them separately? If so, make sure the disk isn't being edited to contain garbage after first boot.

I don't have a statically linked platform to test on unfortunately, but this is an issue I've never seen while playing on either Switch or 3DS.

On Sat, Jun 5, 2021, 3:08 PM cucholix @.***> wrote:

The game is “Choplifter.d88” but any game exhibits this same issue. I’ve tried other cores with the same RA build as quasi88 and don’t have this issue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/libretro/quasi88-libretro/issues/47#issuecomment-855289423, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH5UPFQZ6HHKLLG6LQYZRU3TRJ745ANCNFSM46E3KFDA .

cucholix commented 3 years ago

I generate a clean history playlist:

/roms/NEC - PC-8800/Gradius (1986)(Konami).d88

/retroarch/cores/quasi88_libretro_libnx.nro
NEC - PC-8000 / PC-8800 series (QUASI88)

default_core_path = ""
default_core_name = ""
label_display_mode = "0"
thumbnail_mode = "0|0"
sort_mode = "2"

I booted Gradius again after closing the content, it boot just fine the first time but not the second time. These are the Gradius options: quasi88

As workaround I restart Retroarch after using a quasi88 game, or doesn't boot the same game twice.

Ploggy commented 3 years ago

I can confirm the Playlist issue, same thing happens to me when I try to load the same game twice from Playlist. (on Switch)

celerizer commented 3 years ago

I've talked through this issue with @cucholix on Discord. The file handles for loaded disks aren't explicitly being freed when the core closes (retro_deinit). Should be an easy fix I can handle but I don't have a Switch to test on.

cucholix commented 3 years ago

@celerizer I can build for Switch locally if you want to test changes.

celerizer commented 3 years ago

@cucholix The latest commit seems to fix the problem on my machine; if you can test on Switch we can close this

cucholix commented 3 years ago

I can confirm this commit fixes the playlist issue on Switch