libretro / gpsp

gpSP for libretro.
GNU General Public License v2.0
51 stars 51 forks source link

AMR opendingux retroarch roms with EEPROM save not work #212

Closed Ninoh-FOX closed 9 months ago

Ninoh-FOX commented 1 year ago

any way for load game_config.txt in retroarch OD (miyoomini)?

because I add same games to gba_over.h but this not work and I think with gpsp_libretro.so not load game_config.txt from .retroarch/system

andymcca commented 1 year ago

No, gba_over.h is the one to use (not entirely sure from the code if game_config.txt still gets checked/loaded), but your problem is more that save_type isn't implemented in this fork of gpsp.

Workaround is to use the gbata utility instead to patch the ROM to use SRAM (Google it).

Ninoh-FOX commented 11 months ago

I mean more than anything for roms that don't work like dragon ball legacy, where using gpsp as an independent program it works with the games_config.txt database, something that is not possible in retroarch from what I see, this type of thing also works games in mgba.

andymcca commented 11 months ago

Which fork of gpsp are you referring to when you say 'independent program'?

Unfortunately there have been many forks of gpsp (i.e. gpsp-kai, gpsp-j, gpsp-mod, TempGBA, TempGBA-Mod, ReGBA etc etc) and all of them changed different things. So it's important to know which one you are talking about.

'Normal' gpsp doesn't have the 'save_type' field in game_config.txt implemented. I think this came in one of the forks.

I have an idea to try and use the implementation from the libretro version of VBA-M, provided this actually fixes these cases. Just starting to look into it.

Ninoh-FOX commented 11 months ago

https://github.com/Ninoh-FOX/gpsp-rg350

andymcca commented 11 months ago

Thanks - give me an example of an entry in game_config.txt in that fork that makes it work with eeprom? Or a game that uses eeprom saves that works with this fork but doesn't work with RetroArch gpsp?

This is the same game_config.txt I've seen before where there is a field called 'save_type' where you can specify eeprom, but the code that processes game_config.txt in memory.c doesn't actually look at it/do anything with it. So I'm curious as to how it works.

Ninoh-FOX commented 11 months ago

This for example:

ドラゴンボールZ - THE LEGACY OF GOKU 2 INTERNATIONAL (J) Dragon Ball Z - The Legacy of Goku II International (J)
game_name = DBZLGCYGOKU2
game_code = ALFJ
vender_code = D9
save_type = eeprom

This code is more recent:

https://github.com/soarqin/ReGBA

andymcca commented 11 months ago

OK - I've just done a PR to address this, and funnily enough have just looked at ReGBA and found that they've implemented something very similar!!

In this fork we currently have game_config.txt and also gba_over.h, both of which are processed but the latter of which is included within the compilation. We will probably remove game_config.txt so as to just maintain one list in gba_over.h.

I need to do some more testing with the PR to make sure it doesn't mess anything else up, but I've tested with an entry for Dragon Ball 2 Legacy of Goku (USA) as above and it works. So once I've completed more testing we can get this committed and resolved!

Ninoh-FOX commented 11 months ago

The test game is the legacy of goku I, this say that the hardware not is for the game if the save type not work

andymcca commented 11 months ago

Yes exactly, it's that one I tested with so far and it fixed that exact error

andymcca commented 11 months ago

The test game is the legacy of goku I, this say that the hardware not is for the game if the save type not work

@Ninoh-FOX I misread - so Legacy of Goku 1? I tried it and it started the game ok and let me save, but saved to a 1KB EEPROM file (not sure if this right - but it let me restore the game ok). When do you get the hardware message?

Ninoh-FOX commented 11 months ago

To set new game... Maybe is the save type from core option? I am set this how gpsp save type.

Ninoh-FOX commented 10 months ago

this the log of retroarch in the console:

default pipe size: 4096
new pipe size: 4096
[INFO] [Config]: Looking for config in: "/mnt/SDCARD/RetroArch//.retroarch/retroarch.cfg".
[INFO] === Build =======================================
[INFO] CPU Model Name: ARMv7 Processor rev 5 (v7l)

[INFO] Funcionalidades: NEON VFPv3 VFPv4
[INFO] Built: Aug  8 2023
[INFO] Version: 1.15.0
[INFO] Git: 930207df91
[INFO] =================================================
MMA_Released app-mmaAlloc offset : 00431000 length : 0012C000
[INFO] [Config]: Se ha guardado una nueva configuración en "/mnt/SDCARD/RetroArch//.retroarch/retroarch.cfg".
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 00 seconds.
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [Autoconf]: Se ha desconectado Dingux Gamepad del puerto 1.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
default pipe size: 65536
new pipe size: 4096
[INFO] [Config]: Looking for config in: "/mnt/SDCARD/RetroArch//.retroarch/retroarch.cfg".
[INFO] RetroArch 1.15.0 (Git 930207df91)
[INFO] === Build =======================================
[INFO] CPU Model Name: ARMv7 Processor rev 5 (v7l)

[INFO] Funcionalidades: NEON VFPv3 VFPv4
[INFO] Built: Aug  8 2023
[INFO] Version: 1.15.0
[INFO] Git: 930207df91
[INFO] =================================================
[INFO] [Input]: Found input driver: "sdl_dingux".
[INFO] [Core]: Loading dynamic libretro core from: "/mnt/SDCARD/RetroArch/.retroarch/cores/gpsp_plus_libretro.so"
[INFO] [Overrides]: Content dir-specific overrides found at "/mnt/SDCARD/RetroArch/.retroarch/config/gpSP/GBA.cfg".
[INFO] [Config]: Loading config: "/mnt/SDCARD/RetroArch//.retroarch/retroarch.cfg".
[INFO] [Config]: Appending override config: "/mnt/SDCARD/RetroArch/.retroarch/config/gpSP/GBA.cfg".
[INFO] [Environ]: GET_LOG_INTERFACE.
[INFO] [Environ]: GET_PERF_INTERFACE.
[INFO] [Environ]: GET_VFS_INTERFACE. Core requested version >= V2, providing V3.
[INFO] [Environ]: GET_CORE_OPTIONS_VERSION.
[INFO] [Environ]: GET_LANGUAGE: "3".
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL.
[INFO] [Remaps]: Content-dir-specific remap found at "/mnt/SDCARD/RetroArch/.retroarch/config/remaps/gpSP/GBA.rmp".
[INFO] [Overrides]: Redirigiendo archivo de guardado a "/mnt/SDCARD/Saves/RA_saves/gpSP/Dragon Ball Z - The Legacy of Goku (Europe) (En,Fr,De,Es,It).srm".
[INFO] [Overrides]: Redirigiendo guardado rápido a "/mnt/SDCARD/Saves/RA_states/gpSP/Dragon Ball Z - The Legacy of Goku (Europe) (En,Fr,De,Es,It).state".
[INFO] [Content]: Carga de contenido omitida. La implementación lo cargará por su cuenta.
[INFO] [Environ]: SET_AUDIO_BUFFER_STATUS_CALLBACK.
[INFO] [Environ]: SET_INPUT_DESCRIPTORS:
[INFO] [Environ]: SET_PIXEL_FORMAT: RGB565.
[INFO] [Environ]: GET_SAVE_DIRECTORY.
[INFO] [Environ]: SYSTEM_DIRECTORY: "/mnt/SDCARD/BIOS".
[INFO] [Environ]: SET_MEMORY_MAPS.
[INFO] [RCHEEVOS]: Load started, hardcore active
[INFO] [RCHEEVOS]: Using host: http://retroachievements.org
[INFO] [RCHEEVOS]: Attempting to login NinohFOX (with token)
[INFO] [Replay]: Se ha localizado la última posición de repetición: #0
[INFO] [SRAM]: Omitiendo carga de SRAM.
[INFO] [Core]: Versión de la API libretro: 1, API usada en la compilación: 1
[INFO] [Audio]: Set audio input rate to: 65835.00 Hz.
[INFO] [SoftFilter]: Found plug: GBAOffset (gbaoffset).
[INFO] Using 1 threads for softfilter.
[INFO] [Video]: Set video size to: 720x480.
MMA_Released app-mmaAlloc offset : 00431000 length : 0012C000
[INFO] [Joypad]: Found joypad driver: "sdl_dingux".
[INFO] [Video]: Found display server: "null".
[INFO] [OSS]: Using audioserver.
[INFO] [Display]: Found display driver: "null".
[INFO] [Playlist]: Cargando favoritos: "/mnt/SDCARD/RetroArch/.retroarch/lists/content_favorites.lpl".
[INFO] [Environ]: RETRO_ENVIRONMENT_SET_MINIMUM_AUDIO_LATENCY.
[ERROR] [RCHEEVOS]: Error resolving hash 0: Internal error. (automatic retry in 250ms)
[ERROR] [RCHEEVOS]: Error logging in 0: Internal error. (automatic retry in 250ms)
[ERROR] [RCHEEVOS]: Error resolving hash 0: Internal error. (automatic retry in 500ms)
[ERROR] [RCHEEVOS]: Error logging in 0: Internal error. (automatic retry in 500ms)
[ERROR] [RCHEEVOS]: Error resolving hash 0: Internal error. (automatic retry in 1000ms)
[ERROR] [RCHEEVOS]: Error logging in 0: Internal error. (automatic retry in 1000ms)
[INFO] [RCHEEVOS]: Could not communicate with http://retroachievements.org
[INFO] [RCHEEVOS]: Error logging in: Load aborted
[INFO] [Config]: Loading config: "/mnt/SDCARD/RetroArch//.retroarch/retroarch.cfg".
[INFO] [Overrides]: Configuration overrides unloaded, original configuration restored.
[INFO] [Core]: Content ran for a total of: 00 hours, 00 minutes, 29 seconds.
[INFO] [Core]: Unloading game..
[INFO] [Core]: Unloading core..
[INFO] [Core]: Unloading core symbols..
[INFO] [Core]: Saved core options file to "/mnt/SDCARD/RetroArch/.retroarch/config/gpSP/gpSP.opt".
[INFO] [Autoconf]: Se ha desconectado Dingux Gamepad del puerto 1.
[INFO] [Video]: Does not have enough samples for monitor refresh rate estimation. Requires to run for at least 4096 frames.
config_path is : /mnt/SDCARD/Roms/GBA/game_config.txt
default pipe size: 65536
new pipe size: 4096

game confir information for the game is read, but the save not work.

andymcca commented 10 months ago

OK - fix has been identified and being worked on/tested. Watch this space!

Ninoh-FOX commented 10 months ago

nice!!

this is the MD5 of DBZ legacy of goku rom: 8246b72cb4b6872724836776c123cb55

davidgfnet commented 9 months ago

This is again the DBZ issue, which is now fixed. Thanks for reporting it!