Hacking EZ Flash Omega DE - Goomba Settings don't save

Dimensional

Well-Known Member
OP
Member
Joined
Dec 7, 2008
Messages
1,008
Trophies
1
Age
34
Location
Texas
XP
2,777
Country
United States
There has been an issue when using Goomba Color where it doesn't save the settings for games. For instance, with the Legend of Zelda, Oracle of Ages/Seasons games, they have a GBA enhancement to them, however in order to use them, I always have to change the setting to "Identify as GBA", and then reset in the IGM to get it to reload.

I've looked over some of the source, and apparently Goomba is designed to be able to save the config into the sram file, however it looks like it's coded to only do this if running from the MoviePlayer GBA cart. I'm unsure how Omega handles passing the sram file to Goomba and how it parses it, but if it does it as expected, then what would it take to get it to also save the changed settings instead of always reverting back to default?

The key parts that seem to reference getting the configurations is located in main.c, starting at line 425, and seems to only get used if MOVIEPLAYER is defined in main.h, as well as a few other places where MOVIEPLAYER must be defined.

Code:
int get_saved_sram_CF(char* sramname)
{
    if(g_cartflags&2 && g_rammask!=0)
    {    //if rom uses SRAM
        File file;
        file=FAT_fopen(sramname,"r");
        if (file!=NO_FILE)
        {
#if !RESIZABLE
#define XGB_sram XGB_SRAM
#endif
            FAT_fread(XGB_sram,1,g_rammask+1,file);
            FAT_fclose(file);
            return 1;
        }
        return 2;
    }
    else
    {
        return 0;
    }
}
int save_sram_CF(char* sramname)
{
    if(g_cartflags&2 && g_rammask!=0)
    {    //if rom uses SRAM
        File file;
        file=FAT_fopen(sramname,"r+");
        if (file==NO_FILE)
            file=FAT_fopen(sramname,"w");
        if (file!=NO_FILE)
        {
            FAT_fwrite(XGB_sram,1,g_rammask+1,file);
            FAT_fclose(file);
        }
        return 1;
    }
    return 0;
}
#endif


Code:
#if MOVIEPLAYER
int get_saved_sram_CF(char* sramname);
int save_sram_CF(char* sramname);
#endif
 

Dimensional

Well-Known Member
OP
Member
Joined
Dec 7, 2008
Messages
1,008
Trophies
1
Age
34
Location
Texas
XP
2,777
Country
United States
The emulator is compiled into Omega's kernel, so it makes sense that they could work on this, given they have the source.
 

Shadow#1

Wii, 3DS Softmod & Dumpster Diving Expert
Member
Joined
Nov 21, 2005
Messages
12,347
Trophies
2
XP
8,006
Country
United States
Not sure why, but that statement makes me feel like you have some hostility towards EZ-Flash for some reason. I apologize if I'm misinterpreting this, as I don't mean to offend.
How the hell it it hostility saying that the EZ-Flash team will never touch the source code?
 

Dimensional

Well-Known Member
OP
Member
Joined
Dec 7, 2008
Messages
1,008
Trophies
1
Age
34
Location
Texas
XP
2,777
Country
United States
How the hell it it hostility saying that the EZ-Flash team will never touch the source code?
It was the phrasing, making it sound final and absolute, like there was the belief that there was no alternative. What makes you believe they will never touch it, or have patches applied to it, or anything else?
 

Shadow#1

Wii, 3DS Softmod & Dumpster Diving Expert
Member
Joined
Nov 21, 2005
Messages
12,347
Trophies
2
XP
8,006
Country
United States
It was the phrasing, making it sound final and absolute, like there was the belief that there was no alternative. What makes you believe they will never touch it, or have patches applied to it, or anything else?
Because that's all upto the original dev and that's why EZ-Flash team will never touch it
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,858
Trophies
2
XP
28,894
Country
United Kingdom
I haven't looked at the DE source, and for the original Omega I've looked more at the source for Stereophonik's Simple mod of the kernel than the original, but I know a lot of auto save code was disabled for the built in emulators because of the original Omega's save issues (corrupting the SD card if the console was turned off too soon during/after saving). Maybe this carried over unchanged to the DE's kernel, but the chances are it can be modified back to re-enable some or all of the auto saving. If EZ Flash aren't interested in doing it then you or someone else could. Buy me a DE and I'll try it myself :rofl2:
 
  • Like
Reactions: slaphappygamer

Dimensional

Well-Known Member
OP
Member
Joined
Dec 7, 2008
Messages
1,008
Trophies
1
Age
34
Location
Texas
XP
2,777
Country
United States
I haven't looked at the DE source, and for the original Omega I've looked more at the source for Stereophonik's Simple mod of the kernel than the original, but I know a lot of auto save code was disabled for the built in emulators because of the original Omega's save issues (corrupting the SD card if the console was turned off too soon during/after saving). Maybe this carried over unchanged to the DE's kernel, but the chances are it can be modified back to re-enable some or all of the auto saving. If EZ Flash aren't interested in doing it then you or someone else could. Buy me a DE and I'll try it myself :rofl2:
It's not the auto saving I'm wondering about. It's the configuration data not being saved. From what I read in the source, the configuration, aka how the game will run, like if it detects it's running on a GBA, different pallettes, different brightness, etc... The configurations aren't saved, and aren't read unless Goomba is running on a MoviePlayer GBA cart.
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,858
Trophies
2
XP
28,894
Country
United Kingdom
It's not the auto saving I'm wondering about. It's the configuration data not being saved. From what I read in the source, the configuration, aka how the game will run, like if it detects it's running on a GBA, different pallettes, different brightness, etc... The configurations aren't saved, and aren't read unless Goomba is running on a MoviePlayer GBA cart.
Sorry when I said auto saving I was talking about the config being saved, rather than the game save data, should have been more clear.

The source I looked at in Stereophonik's mod kernel seemed to have all the save code necessary, tho various bits enabled/disabled depending on the flash cart, I would imagine it should be possible to enable what you need with some careful reading of the code and some experimentation.
 

Dimensional

Well-Known Member
OP
Member
Joined
Dec 7, 2008
Messages
1,008
Trophies
1
Age
34
Location
Texas
XP
2,777
Country
United States
Sorry when I said auto saving I was talking about the config being saved, rather than the game save data, should have been more clear.

The source I looked at in Stereophonik's mod kernel seemed to have all the save code necessary, tho various bits enabled/disabled depending on the flash cart, I would imagine it should be possible to enable what you need with some careful reading of the code and some experimentation.
Possibly. However I don't know what else EZ Flash changes when they patch the binary. Not everything they have is open source. For the Omega DE, there is an extra binary image and program that combines that bin with whatever is compiled. Outside of that, I've figured both DE and classic repos are pretty similar.
 

EZ-Flash2

Official EZ-FLASH Stuff
Member
Joined
Jul 16, 2003
Messages
1,105
Trophies
3
XP
3,469
Country
China
Possibly. However I don't know what else EZ Flash changes when they patch the binary. Not everything they have is open source. For the Omega DE, there is an extra binary image and program that combines that bin with whatever is compiled. Outside of that, I've figured both DE and classic repos are pretty similar.

the bin file is the firmware.
 
  • Like
Reactions: Dimensional

slaphappygamer

Well-Known Member
Member
Joined
Nov 30, 2008
Messages
4,117
Trophies
2
Age
46
Location
California
XP
7,606
Country
United States
I haven't looked at the DE source, and for the original Omega I've looked more at the source for Stereophonik's Simple mod of the kernel than the original, but I know a lot of auto save code was disabled for the built in emulators because of the original Omega's save issues (corrupting the SD card if the console was turned off too soon during/after saving). Maybe this carried over unchanged to the DE's kernel, but the chances are it can be modified back to re-enable some or all of the auto saving. If EZ Flash aren't interested in doing it then you or someone else could. Buy me a DE and I'll try it myself :rofl2:
I’ve always wanted to learn how to do things like this. What program would you even use to view and edit code? Looks like it might just be Word. Lol
 

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,858
Trophies
2
XP
28,894
Country
United Kingdom
I’ve always wanted to learn how to do things like this. What program would you even use to view and edit code? Looks like it might just be Word. Lol
You can use literally anything that can edit plain text files (including Word), but the "best" option would be an Integrated Development Environment that's designed for editing code, like XCode, Visual Studio etc, because they have relevant helpful features like syntax highlighting and text completion.
 
  • Like
Reactions: slaphappygamer

slaphappygamer

Well-Known Member
Member
Joined
Nov 30, 2008
Messages
4,117
Trophies
2
Age
46
Location
California
XP
7,606
Country
United States
You can use literally anything that can edit plain text files (including Word), but the "best" option would be an Integrated Development Environment that's designed for editing code, like XCode, Visual Studio etc, because they have relevant helpful features like syntax highlighting and text completion.
Oh thanks, I’ll toy with that tonight. I don’t have my house, right now. I tried installing IDE once, it was such a large package, I think I installed some unneeded tools. It was like 7 gigs!
 
  • Like
Reactions: hippy dave

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I'm doing alright, thanks.
    +1
  • Maximumbeans @ Maximumbeans:
    That must be rough. Productive I'm sure but hard to balance with daily life
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Indeed. I've been working on getting this Infecutus chip to work on my PS2. But after soldering, I realised that a plastic piece was missing from the power ribbon cable to the power and eject buttons.
  • SylverReZ @ SylverReZ:
    Now I could go with soldering the contacts from the cable to the connector on the mobo, but doesn't sound like a good permanent solution.
  • Maximumbeans @ Maximumbeans:
    Man, that's beyond my brain :rofl: I'm no good with hardware for now. I'd like to get into hardmods in future though
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Maybe start practice soldering. Get a cheap-ass soldering iron and follow some good YouTube tutorials.
    +1
  • SylverReZ @ SylverReZ:
    Least my experience has gotten better than over a decade ago. My iron would constantly bump into components and break them.
  • Maximumbeans @ Maximumbeans:
    Sounds good. I actually did soldering but like 16 years ago for school so uuuuh probably rusty haha
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Same here. I did soldering at school from a teacher who I honestly liked since he had plenty of good electronics experience.
    +1
  • Maximumbeans @ Maximumbeans:
    I wish I could play chess well
    +1
  • Maximumbeans @ Maximumbeans:
    Useless but a true art
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I had a friend who had a glass chess set for their birthday.
  • SylverReZ @ SylverReZ:
    It was like all clear and fancy. Tbf I'm not too experienced with chess, but would like to learn someday.
  • Maximumbeans @ Maximumbeans:
    That sounds really cool
  • Maximumbeans @ Maximumbeans:
    I know the basics but no strategy at all :rofl:
    +1
  • Veho @ Veho:
    Watch chess streamers on Twitch and you'll pick up a thing or two.
    +1
  • Veho @ Veho:
    Not to mention there's an infinite number of chess games for every possible platform.
    +1
  • DinohScene @ DinohScene:
    just play it, get beaten a few times and start dominating
    +1
  • K3Nv2 @ K3Nv2:
    Nude chess is best
    +1
  • DinohScene @ DinohScene:
    strip checkers > nude chess
    +1
  • K3Nv2 @ K3Nv2:
    Nude checkers get jumped
    +1
  • SylverReZ @ SylverReZ:
    @Veho, I guess you'd pick up something while watching tub streams.
  • SylverReZ @ SylverReZ:
    @K3Nv2, Dick fights. :tpi:
  • Veho @ Veho:
    Turkish olive oil wrestling.
    +1
    Veho @ Veho: Turkish olive oil wrestling. +1