Hacking BAGSFC R3 source with arg loading support

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
This is just a modified version of the latest BAGSFC release that will check for a "plgargs.dat" file on the root of the card, and launch the file path written on the second line of the file. eg:

plgargs.dat
QUOTE said:
/BAGSFC/bagsfc.plg
/BAGSFC/gamepak/super mario world.rar

The new version of iMenu that has yet to be released will support plugin args along with the new plugin menu I am creating.
Emulator Source Here

For those who are curious about adding plugin arg support to their programs, this code can be used to parse the plgargs.dat file. The first line or filebuf[0] will be the file path to the launched plugin while filebuf[1] will be the file to launch in the program if supported.

CODEint Get_Args(char *file, char **filebuf)
{
FILE* dat = fat_fopen(file, "rb");
if(dat)
{
int i = 0;
while(!fat_feof (dat))
{
fat_fgets(filebuf, 512, dat);
int len = strlen(filebuf);

if(filebuf[len - 1] == '\n')
filebuf[len - 1] = '';
i++;
}

fat_fclose(dat);
fat_remove(file);
return i;
}
return 0;
}
 
  • Like
Reactions: Margen67

stinebd

Member
Newcomer
Joined
May 22, 2008
Messages
10
Trophies
0
XP
91
Country
United States
Thanks!
biggrin.gif
 
  • Like
Reactions: Margen67

RPG Hacker

Well-Known Member
Member
Joined
Jan 20, 2008
Messages
200
Trophies
0
Age
32
Location
Kaperich
Website
rpg-hacker.de
XP
221
Country
Gambia, The
Oh, cool! So SCDS2 developement got moved over to here.
Did you already find out anything about why the game slows down so horribly on the overworld in the Mario hack I had sent you?
I would take a look at all this SCDS2 stuff myself, but all this Linux environment stuff is way too complicated for me, especially since my computer is rather old. Virtual Machine wouldn't run very smoothly, while cygwin wouldn't be very compatible.
 

BassAceGold

Testicles
OP
Member
Joined
Aug 14, 2006
Messages
496
Trophies
1
XP
441
Country
Canada
RPG Hacker said:
Oh, cool! So SCDS2 developement got moved over to here.
Did you already find out anything about why the game slows down so horribly on the overworld in the Mario hack I had sent you?
I would take a look at all this SCDS2 stuff myself, but all this Linux environment stuff is way too complicated for me, especially since my computer is rather old. Virtual Machine wouldn't run very smoothly, while cygwin wouldn't be very compatible.

The only thing I can think of that is causing the slow down would the be auto sram saving. Nothing else I have modified could result in such a drastic change as they have all been menu related fixes. I do not intend to continue updating this emulator, however someone else with this info can hopefully make the fix.
 

RPG Hacker

Well-Known Member
Member
Joined
Jan 20, 2008
Messages
200
Trophies
0
Age
32
Location
Kaperich
Website
rpg-hacker.de
XP
221
Country
Gambia, The
Does it write the SRAM to disc every frame? Couldn't this be avoided with a simple fix? Maybe a flag that is set whenever SRAM is written to and then activates the transfer of RAM to SD. Well then again I don't know anything of SCDS2 developement, so maybe I'm talking crap.
 
  • Like
Reactions: Margen67

avenir

Well-Known Member
Member
Joined
Dec 8, 2010
Messages
375
Trophies
0
XP
93
Country
United States
See, if only there were open plg loader, adding sfc support to MoonShell2 would be quite easy (extlink.dat -> plgargs.dat converting is easy)...
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: 16 is becoming bare minimum for today's gaymes +1