Game Boy & Game Boy Color cart saves not being created

Game ROMs compatibility, performance and new cores
Post Reply
User avatar
GldRush98
Posts: 71
Joined: Wed Aug 08, 2018 12:58 am
languages_spoken: English
ODROIDs: ODROID-Go, ODROID-Go Advance Black Edition
Location: Taylorville, IL
Has thanked: 7 times
Been thanked: 9 times
Contact:

Game Boy & Game Boy Color cart saves not being created

Post by GldRush98 »

Using the official image on a OGA Black.
It seems cart saves are not being created. Only the save state when you exit the emulator via f1.
NES & SNES seem to be creating their respective srm files.
edit: Nor Game Boy Advance

crashoverride
Posts: 5102
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 365 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by crashoverride »

GldRush98 wrote:
Thu Jun 04, 2020 1:59 pm
It seems cart saves are not being created.
Can you elaborate on this? What is an example of something meant by "cart saves"?

RetroRun (NES/SNES) asks the libretro core in use whether there is something (typically SRAM) to be saved:
https://github.com/OtherCrashOverride/r ... #L585-L589
This behavior will vary by core and/or title.

User avatar
GldRush98
Posts: 71
Joined: Wed Aug 08, 2018 12:58 am
languages_spoken: English
ODROIDs: ODROID-Go, ODROID-Go Advance Black Edition
Location: Taylorville, IL
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by GldRush98 »

For example,

Start Game Boy Color game - Tetris DX.
Create a new file with your name. Play a round of tetris.
Exit.
Bad: Observe there is no srm file generated for Tetris DX. There is only the saved state .sav file. If you delete the saved state file, and re-enter Tetris DX, your saved game data is gone.
Good: Observer the correct functionality in NES game - Super Mario World 2 - Yoshi's Island. Create a new file, beat the first level. Exit and see there is the save state .sav file AND the proper .srm file created. Delete the .sav save state and re-enter SMW2. You save game data is intact and functioning.

I tried other games on these systems and observed the same behavior.
I have not tried other systems such as Sega systems.

crashoverride
Posts: 5102
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 365 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by crashoverride »

GldRush98 wrote:
Fri Jun 05, 2020 2:12 pm
Start Game Boy Color game - Tetris DX.
The GB/GBC/GBA all use the same emulator. This is a modified version of the mgba libretro core. The modifications allow for "pixel perfect" scaling and performance enhancements. Since it does not use RetroRun, it does not generate the ".srm" file.

The list of emulators using RetroRun is here:
viewtopic.php?f=187&t=38981#p294844

The modified mgba libretro source code is here:
https://github.com/OtherCrashOverride/mgba-libretro-go2

[edit]
I created an issue here:
https://github.com/OtherCrashOverride/m ... 2/issues/1

User avatar
GldRush98
Posts: 71
Joined: Wed Aug 08, 2018 12:58 am
languages_spoken: English
ODROIDs: ODROID-Go, ODROID-Go Advance Black Edition
Location: Taylorville, IL
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by GldRush98 »

Sounds good :)
I did notice the pixel perfect scaling in GB/GBC. It looks great.
I also noticed that the aspect ratio on NES/SNES was off though. Is there a setting to change it so it doesn't stretch it horizontally like that?

crashoverride
Posts: 5102
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 365 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by crashoverride »

GldRush98 wrote:
Fri Jun 05, 2020 10:16 pm
I also noticed that the aspect ratio on NES/SNES was off though. Is there a setting to change it so it doesn't stretch it horizontally like that?
Any emulator using RetroRun can have an aspect ratio forced. This is accomplished by modifying the entry in the /etc/emulationstation/es_systems.cfg file. For example, the NES has the following entry:

Code: Select all

<command>retrorun -a 1.333 -s ~ -d /opt/libretro/nestopia /opt/libretro/nestopia/nestopia_libretro.so %ROM%</command>
The "-a 1.333" specifies an aspect ratio override of 4:3 (4/3=1.333). The SNES entry does not have an aspect override, so it uses the core default. However, an aspect override can be added to its entry:

Code: Select all

<command>perfmax; retrorun -a 1.333 -s ~ -d /opt/libretro/snes9x /opt/libretro/snes9x/snes9x_libretro.so %ROM%; perfnorm</command>
These users thanked the author crashoverride for the post:
GldRush98 (Sat Jun 06, 2020 2:56 pm)

User avatar
GldRush98
Posts: 71
Joined: Wed Aug 08, 2018 12:58 am
languages_spoken: English
ODROIDs: ODROID-Go, ODROID-Go Advance Black Edition
Location: Taylorville, IL
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by GldRush98 »

I saw you resolved the issue on github. I tried to build it myself, but something is going wrong and the mgba standalone file is far too small.

Code: Select all

-rwxrwxr-x 1 odroid odroid  50K Sep 13 10:55 mgba*
Any idea what might be going wrong? Or if you could link me a compiled version with the fix I'd love to test it out :)

crashoverride
Posts: 5102
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 365 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by crashoverride »

The following procedure is used to build mgba:

Code: Select all

    git clone https://github.com/OtherCrashOverride/mgba-libretro-go2.git
    cd mgba-libretro-go2
    export CFLAGS="-Ofast -flto=$(nproc) -fuse-linker-plugin -march=armv8-a+crc+simd+crypto -mtune=cortex-a35"
    mkdir build
    cd build
    cmake -DLIBMGBA_ONLY=ON -DBUILD_STATIC=ON  ..
    make -j$(nproc)
    cd ../odroid
    premake4 gmake
    make config=release -j$(nproc)
These users thanked the author crashoverride for the post:
GldRush98 (Mon Sep 14, 2020 2:17 am)

User avatar
GldRush98
Posts: 71
Joined: Wed Aug 08, 2018 12:58 am
languages_spoken: English
ODROIDs: ODROID-Go, ODROID-Go Advance Black Edition
Location: Taylorville, IL
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by GldRush98 »

Fantastic! Built successfully and the srm files are being created and function correctly it looks from my quick testing.

My one note would be that it seems to be creating a 0 byte srm file for games that do not have saving. In this case I think it would be preferred to not create an empty file at all.

For example. The Turtles game and the original Tetrix game do not have cart saving functions (Tetris DX does of course).
A 0 byte srm file was created:

Code: Select all

-rw-r--r-- 1 odroid odroid      71728 Sep 13 12:12 'Teenage Mutant Ninja Turtles - Fall of the Foot Clan.gb.sav'
-rw-r--r-- 1 odroid odroid          0 Sep 13 12:12 'Teenage Mutant Ninja Turtles - Fall of the Foot Clan.gb.srm'
-rw-r--r-- 1 odroid odroid      79936 Sep 13 12:11 'Tetris DX.gbc.sav'
-rw-r--r-- 1 odroid odroid       8192 Sep 13 12:11 'Tetris DX.gbc.srm'
-rw-r--r-- 1 odroid odroid      71728 Sep 13 12:11  Tetris.gb.sav
-rw-r--r-- 1 odroid odroid          0 Sep 13 12:11  Tetris.gb.srm
A minor issue, and maybe it's a limitation of how mgba is working itself, but just something I noticed and figured was worth mentioning.

Thanks for your work crash! :geek:

crashoverride
Posts: 5102
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Has thanked: 0
Been thanked: 365 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by crashoverride »

GldRush98 wrote:
Mon Sep 14, 2020 2:17 am
My one note would be that it seems to be creating a 0 byte srm file for games that do not have saving.
I pushed a fix for this:
https://github.com/OtherCrashOverride/m ... 36543dafe8
These users thanked the author crashoverride for the post (total 2):
GldRush98 (Mon Sep 14, 2020 2:41 am) • odroid (Mon Sep 14, 2020 10:38 am)

User avatar
GldRush98
Posts: 71
Joined: Wed Aug 08, 2018 12:58 am
languages_spoken: English
ODROIDs: ODROID-Go, ODROID-Go Advance Black Edition
Location: Taylorville, IL
Has thanked: 7 times
Been thanked: 9 times
Contact:

Re: Game Boy & Game Boy Color cart saves not being created

Post by GldRush98 »

You legend you. Rebuilt, tested, fix works, srm's generated when they should be and not when they shouldn't be.
Looking good to me my man!

Post Reply

Return to “Game emulations”

Who is online

Users browsing this forum: No registered users and 0 guests