Open kec2 opened 1 year ago
Pretty sure this is in the wrong place, since it looks like nothing that can be fixed here.
This looks highly suspicious, as in it can't access and open those files, and thus no hard disks are connected, so no wonder it can't boot:
2023-02-22 19:27:07.593 T:943 INFO <general>: AddOnLog: game.libretro.uae: hfd attempting to open: '/storage/.kodi/userdata/addon_data/game.libretro.uae/save/WHDLoad.hdf'
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: Attempting to open '/storage/.kodi/userdata/addon_data/game.libretro.uae/save/WHDLoad.hdf' in read-only mode.
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: hfd attempting to open: '/storage/.kodi/userdata/addon_data/game.libretro.uae/save/WHDLoad.hdf'
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: hfd attempting to open: '/storage/.kodi/userdata/addon_data/game.libretro.uae/save/WHDSaves.hdf'
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: Attempting to open '/storage/.kodi/userdata/addon_data/game.libretro.uae/save/WHDSaves.hdf' in read-only mode.
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: hfd attempting to open: '/storage/.kodi/userdata/addon_data/game.libretro.uae/save/WHDSaves.hdf'
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: hfd attempting to open: '/storage/.kodi/userdata/addon_data/plugin.program.iagl/game_cache/BatmanReturns_v1.0.hdf'
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: Attempting to open '/storage/.kodi/userdata/addon_data/plugin.program.iagl/game_cache/BatmanReturns_v1.0.hdf' in read-only mode.
2023-02-22 19:27:07.594 T:943 INFO <general>: AddOnLog: game.libretro.uae: hfd attempting to open: '/storage/.kodi/userdata/addon_data/plugin.program.iagl/game_cache/BatmanReturns_v1.0.hdf'
Better report it to the Kodi team.
So I have the same problem in CoreELEC on Amlogic S903X3.
2023-02-22 19:27:07.593 T:943 INFO <general>: AddOnLog: game.libretro.uae: hfd attempting to open: '/storage/.kodi/userdata/addon_data/game.libretro.uae/save/WHDLoad.hdf'
So here something is going very wierd. This log comes from sources/src/hardfile_unix.c:hdf_open_target. in line 299 it tries to calculate file size by calling fseeko(h, 0, SEEK_END); - but this call returns actual file size instead of expected 0 (0 means succesful fseek). So if in next line fails and file is not opened. I made a test program that only calls fseek and I copiled it with exactly the same compile options as sources/src/hardfile_unix.c - test program works as expected. So what is going on ?
Hmm.. fseeko
is replaced with VFS version rfseek
. Try building the core with NO_LIBRETRO_VFS=1
. No idea why it wouldn't affect all platforms though, since I'm not seeing the VFS version returning anything else either..
addon built with NO_LIBRETRO_VFS=1 makes kodi crash, tail of the kodi log:
2023-05-24 00:01:55.103 T:25836 info <general>: AddOnLog: game.libretro.uae: No model specified in: '/storage/.kodi/userdata/addon_data/plugin.program.iagl/game_cache/AlloAllo_v1.0.hdf'
2023-05-24 00:01:55.103 T:25836 info <general>: AddOnLog: game.libretro.uae: Model: 'A1200'
2023-05-24 00:01:55.103 T:25836 info <general>: AddOnLog: game.libretro.uae: Kickstart: 'kick40068.A1200'
2023-05-24 00:01:55.104 T:25836 info <general>: AddOnLog: game.libretro.uae: HD (1) inserted in drive DH0: '/storage/.kodi/userdata/addon_data/plugin.program.iagl/game_cache/AlloAllo_v1.0.hdf'
2023-05-24 00:01:55.104 T:25836 info <general>: AddOnLog: game.libretro.uae: --------------------------------------------------------------------------------
2023-05-24 00:01:55.104 T:25836 info <general>: AddOnLog: game.libretro.uae: PUAE 4.9.1 4de8780457, May 23 2023 23:55:34
2023-05-24 00:01:55.104 T:25836 info <general>: AddOnLog: game.libretro.uae: --------------------------------------------------------------------------------
and then kodi restarts
Something else must be seriously wrong then than just the hdf part, since it stops before getting to the hdf part. A proper stack trace would be nice. What was the platform again?
It returns 0 fine here with and without VFS.
CoreELEC 20.1 Amlogic S903X3 (32 bit I believe, cannot check now)
Something something ARM toolchain or makefile flag related then perhaps, no idea..
I did some more testing.
error <general>: Interface_Base::get_setting_string - can't find setting 'puae_use_whdload_nowritecache' in 'Commodore - Amiga (PUAE)'
error <general>: ADDON: Dll Commodore - Amiga (PUAE) - Client returned bad status (5) from Create and is not usable
If the frontend does not support VFS for reasons unknown, then it must also add NO_LIBRETRO_VFS=1
to build envs. Then again I don't understand why it wouldn't, since VFS is only a layer to have every platform act the same way with one code.
The first error makes absolutely no sense since it is not related to VFS in any way. puae_use_whdload_nowritecache
is a pretty new core option, so does the addon somehow need to update something to also add it..? Makes no sense either.
regarding puae_use_whdload_nowritecache: I used master version of the libretro-uae but older version of the game.libretro.uae kodi plugin (version that is used in CoreELEC version that I use) - so this may be the reason for this error. And I guess it is irrelevant for the fseek issue.
If by frontend You mean KODI in my case then i believe it supports VFS since other emulators that I use and they work without issues have supports_vfs=true in addon.xml (e.g. snes9x).
For me the obvious thing to do would be to define supports_vfs=true in addon.xml (besides the fact that I totally do not know what it does :D). But, as I said, it makes uae emulator not run at all. Can someone here help with that just to check if it would help ?
The usage of the "virtual file system" is not comparable between a console and a computer anyway, since a console emulator does not need to read and write to host filesystem like a computer in this case.
I don't understand why IAGL needs to behave any differently with or without libretro VFS, as in why is it even an option.. Whatever it does, I don't think the core can have any say in that. I'd like to see more detailed log with it enabled, and the missing core option error sorted out first.
So I did one blind shot and commented out lines 3249 to 3255 from here https://github.com/libretro/libretro-uae/blob/605264f15d31c42b1fe546fd47a6ffb1301c03c8/libretro/libretro-core.c#L3250 This was the only change. And now launching games in hdf format works :) at least one game that I tried.
In other words build with NO_LIBRETRO_VFS=1
. The KODI game running part isn't handling VFS properly then if that fails. Maybe even using a different version of libretro-common
, who knows.
NO_LIBRETRO_VFS=1 makes kodi crash https://github.com/libretro/libretro-uae/issues/586#issuecomment-1560187229
Had no issues in Windows with NO_LIBRETRO_VFS=1
, but under Linux it didn't even build properly, whoops. I managed to sort it out, so fix is coming shortly.
I checked current master and now NO_LIBRETRO_VFS=1 works. Kodi does not crash and I can load the game that previously didn't load.
Bug report
Describe the bug
Here is a clear and concise description of what the problem is:
When i try to run an Amiga game it gets stuck at the kickstart Rom screen. In my case 3.1 ROM 40.068 The games are load via Internet Archive Game Launcher
RetroArch Behavior
Here is a clear and concise description of what happens in RetroArch with the same core/game:
To Reproduce
Steps to reproduce the behavior:
Debuglog
The debuglog can be found here:
Screenshots
Here are some links or screenshots to help explain the problem:
Your Environment
Used Operating system:
Operating system version/name:
Kodi version: LibreELEC, 10.0.4 Kodi build 19.5.0 Compiled: 2023-01-07
note: Once the issue is made we require you to update it with new information or Kodi versions should that be required. Team Kodi will consider your problem report however, we will not make any promises the problem will be solved.