REQUEST: Help me edit GenPlus emulator to NOT load and save config.ini

Discussion in 'Wii - Emulation and Homebrew' started by PetMetroid, Jun 11, 2012.

  1. PetMetroid
    OP

    Newcomer PetMetroid Member

    Joined:
    Mar 27, 2012
    Messages:
    34
    Location:
    Long Beach, CA
    Country:
    United States
    I am emulating between two TVs off one SD card (so I can use it like a memory card, and I'm not networking since I don't have a PC to leave on.) One TV is a 16:9 LED, and the other 4:3 tube. The LED TV Wii uses forwarders for user friendliness and to safegaurd from loading without an SD card for saving. The other Wii uses the HBC soon to load these emulators from the hardrive so they may have their own configurations for that TV (ie. interlace instead of progressive, and original scaling instead of widescreen.) (Both Wiis have USB drive for ROMs) GenPlus seems to be the little bitch in this whole scenario due to its lack of configuration settings saving and loading from specifically the SD card and NOT the USB drive. I thought maybe I could just use an alternate emulator on this Wii but GenPlus seems to be the only one that exists. If only I could have GenPlus use all of its original settings on the tube TV's Wii without modifying the configurations for the other Wii...

    And that's just it! Will someone please edit the emulator (the DOL) for me so that whatever code is used for reading and writing the config.ini is completely gone? I would really appreciate it, and it's not just for me; my girlfriend grew up with the Genesis and wants to play quite a few games. It would mean a great deal to me if she could play these games on both Wiis without any problems. I tried editing DOLs in devKit before and I have no idea what I'm doing. Please and thank you!
     
  2. Hielkenator

    Member Hielkenator GBAtemp Psycho!

    Joined:
    Feb 7, 2010
    Messages:
    4,176
    Country:
    Netherlands
    THINK.

    Just use 2 sd cards.
     
  3. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
    I think the point is sharing savegames between the two wiis

    OPTION A:
    I only had a quick look through it but I think something along those lines should do the trick:
    Code:
    Index: source/gx/config.c
    ===================================================================
    --- source/gx/config.c  (revision 682)
    +++ source/gx/config.c  (working copy)
    @@ -44,6 +44,7 @@
    
    static int config_load(void)
    {
    +  return 0
    /* open configuration file */
    char fname[MAXPATHLEN];
    sprintf (fname, "%s/config.ini", DEFAULT_PATH);
    @@ -79,6 +80,7 @@
    
    void config_save(void)
    {
    +  return
    /* open configuration file */
    char fname[MAXPATHLEN];
    sprintf (fname, "%s/config.ini", DEFAULT_PATH);
    
    OPTION B:
    do you use two different dols?
    because if you do it might be better to let one use a different config file
    Code:
    Index: source/gx/config.c
    ===================================================================
    --- source/gx/config.c  (revision 682)
    +++ source/gx/config.c  (working copy)
    @@ -46,7 +46,7 @@
    {
    /* open configuration file */
    char fname[MAXPATHLEN];
    -  sprintf (fname, "%s/config.ini", DEFAULT_PATH);
    +  sprintf (fname, "%s/config2.ini", DEFAULT_PATH);
    FILE *fp = fopen(fname, "rb");
    if (fp)
    {
    @@ -81,7 +81,7 @@
    {
    /* open configuration file */
    char fname[MAXPATHLEN];
    -  sprintf (fname, "%s/config.ini", DEFAULT_PATH);
    +  sprintf (fname, "%s/config2.ini", DEFAULT_PATH);
    FILE *fp = fopen(fname, "wb");
    if (fp)
    {
    
    I don't have a wii build environment to test this but you should be abel to
    find guides or someone who has

    OPTION C:
    did a NASTY hack to use a different config (sed "s/config\.ini/confi2.ini/g" genplus_wii.dol -i)
    no idea on what havok that wrecked ... who knows ... it might even work ... or eat your kittens ...
    http://www.unix-ag.uni-kl.de/~t_schmid/temp/genplus_wii.dol
     
  4. shortz1994

    Member shortz1994 GBAtemp Maniac

    Joined:
    Jan 21, 2011
    Messages:
    1,341
    Country:
    United States
    so, after i tried to help you. an you saying you got it working. you start a second thread.
    yep it looks like you got the issue solved. ;). besides the saves are on your sd card. so using a second sd card so you don't have to keep switching cards is the easiest solution.
     
    1 person likes this.
  5. Hielkenator

    Member Hielkenator GBAtemp Psycho!

    Joined:
    Feb 7, 2010
    Messages:
    4,176
    Country:
    Netherlands
    Exactly my point, thank you.
     
  6. PsyBlade

    Member PsyBlade Snake Charmer

    Joined:
    Jul 30, 2009
    Messages:
    2,204
    Location:
    Sol III
    Country:
    Germany
    Your point being what exactly?
     
  7. Hielkenator

    Member Hielkenator GBAtemp Psycho!

    Joined:
    Feb 7, 2010
    Messages:
    4,176
    Country:
    Netherlands
    Please do not get me wrong.
    Your info on this topic is of great value.

    Just pointing out that this is what I said in the first place.
    It has nothing to do with your post.

    I speak from own experience and have the same setup as the OP.
    I don't think it's needed to go as far as altering the source for this problem.
    Using both Wii's with their own sd card and a copy of genesis gx works just as good.

    If he would constantly swap just one wii between different tv's, well that would be another matter, I agree.
    But the OP stated he has two wii's on different setups. Why not use two seperate sd cards?

    Unless I did'nt comprehend the OP's question the way it was meant, offcourse...
     
  8. PetMetroid
    OP

    Newcomer PetMetroid Member

    Joined:
    Mar 27, 2012
    Messages:
    34
    Location:
    Long Beach, CA
    Country:
    United States
    PERFECT!!! Yeah, the mod right there works just fine, and I'll keep the code in case I want to update it in the future. Thank you PsyBlade!
    In the mean time, Imma try and request a couple of things of EkeEke, a more specific save setting being one of them.
     
  9. Jacobeian

    Member Jacobeian GBAtemp Advanced Maniac

    Joined:
    May 15, 2008
    Messages:
    1,879
    Country:
    Cuba
    Actually, genplus will load/save config from/to USB if USB is the default device (that means if no SD is present). Since you are loading from USB, you could simply just leave SD in the other Wii and only use USB here.
     
  10. PetMetroid
    OP

    Newcomer PetMetroid Member

    Joined:
    Mar 27, 2012
    Messages:
    34
    Location:
    Long Beach, CA
    Country:
    United States
    True, but that means it then saves files on the USB instead of the SD, unfortunately.
     
  11. PetMetroid
    OP

    Newcomer PetMetroid Member

    Joined:
    Mar 27, 2012
    Messages:
    34
    Location:
    Long Beach, CA
    Country:
    United States
    I made a few forwarder boot DOLs for my other emulators so I could possibly have the ability to load the emulators on the USB drive from HBC in the SD card menu, so without having to switch to the USB drive every time to open the apps. This turned out to be pointless because they booted as if they were still on the SD card and ended up loading the settings on my SD card instead of the USB drive. So I did this the other way around for the two other emulators (so my USB menu would show the three emulators on my USB drive AND the other two which are on my SD card) and it worked just fine. In other words...

    - Launching a forwarder DOL from the USB drive to boot the emulator from the SD card will load all necessary files (settings and saving) from the SD card. However,

    - Launching a forwarder DOL from the SD card to boot the emulator from the USB drive will load all necessary files (settings and saving) from the SD card still, and not the USB drive.

    Why is that?
     

Share This Page