Hacking R4 Commander

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Firstly, excellent software!

I have linked this on the stickied R4 FAQ in this forum under "usage"

Also If you need a mirror for file hosting then let me know!

Anyways, just a few suggestions:
- Integrate a trimmer tool into the programme
- Integrate an unzipper
- Integrate a save file convertor

Most of the coding methods for the above list is easily found on the net


just to save dave some time, there already is an unzipper and a trimmer! its just automatic.

I see, thanks for the info. Do you know what program I'm suppose to use to convert G6 Lite saves to R4? The save converter on R4 site doesn't seem to have an option for the G6 Lite. Great job with the app btw. Saves a lot of time 
smile.gif
The one on the R4 website CAN convert G6 saves. you just need to change "Files of type:" to "All files"
but yeah an integrated converter would be nice.

Can anyone point me in the direction of some docs on the structures of different save types? I'll try and get it put into the next release. I was going to release one later tonight but I'll hold off until I put the save converter in there. I've already added auto-updating images from the net and I'm just working on the abiility to download and install packs from the server direct from the program instead of downloading them from the blog.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Firstly, excellent software!

I have linked this on the stickied R4 FAQ in this forum under "usage"

Also If you need a mirror for file hosting then let me know!

Anyways, just a few suggestions:
- Integrate a trimmer tool into the programme
- Integrate an unzipper
- Integrate a save file convertor

Most of the coding methods for the above list is easily found on the net

Almost forgot, thanks for adding the program into the sticky!
biggrin.gif
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Added v1.04beta to the website (in upgrade version only) for people to test if they want. You can tell the program to auto-download pics for your games any can now pick updates from a list and have the program download and install them without going through the blog.
 

thisUsernameIScr

Banned!
Banned
Joined
Mar 26, 2007
Messages
18
Trophies
0
XP
11
Country
United States
Can anyone point me in the direction of some docs on the structures of different save types? I'll try and get it put into the next release. I was going to release one later tonight but I'll hold off until I put the save converter in there. I've already added auto-updating images from the net and I'm just working on the abiility to download and install packs from the server direct from the program instead of downloading them from the blog.


Darn. Not only had I just finished installing yesterday's version, but I just finished installing the packs one by one from the site.
Now you go and make it easier for me.

BTW: It works just fine if you paste a URL into the open file dialog box (at least on Win XP SP2). So if 3rd parties release their software in R4C update-pack format, that is an easy way to download it. (Obviously that is not useful anymore for the official update packs).


PS: I'm getting an error when I try to download the update:
CODEFatal error: Call to undefined function graceful_fail() in /home/moddz3/public_html/blogs/wp-content/blogs.php on line 84
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Can anyone point me in the direction of some docs on the structures of different save types? I'll try and get it put into the next release.  I was going to release one later tonight but I'll hold off until I put the save converter in there.  I've already added auto-updating images from the net and I'm just working on the abiility to download and install packs from the server direct from the program instead of downloading them from the blog.


Darn. Not only had I just finished installing yesterday's version, but I just finished installing the packs one by one from the site.
Now you go and make it easier for me.

BTW: It works just fine if you paste a URL into the open file dialog box (at least on Win XP SP2). So if 3rd parties release their software in R4C update-pack format, that is an easy way to download it. (Obviously that is not useful anymore for the official update packs).


PS: I'm getting an error when I try to download the update:
Code:
Fatal error: Call to undefined function graceful_fail() in /home/moddz3/public_html/blogs/wp-content/blogs.php on line 84

Sorry about all the unnecessary downloading! Cheers for letting me know about pasting URLs into the open file dialog, I'll put that in the readme and up on the blog. I can't see anyone but me releasing R4C update-packs but you never know, although it is one of the reasons why I made it so easy to create your own install.

I'm going to start work on a built-in skin repository next (sucker for punishment aren't I!) so people can easily swap their skins or grab new ones. I've added the ability to install skins as updates though.

Don't know why your getting the error though, I'm just working on the blog now though so if you want to hold on or try this link http://www.dpgdownloads.com/trolleyguy/R4.....04.Upgrade.zip
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Ok have altered the blog to V1.04 of the program and removed all the packs and other now redundant stuff and everything should be fine now.
 

thisUsernameIScr

Banned!
Banned
Joined
Mar 26, 2007
Messages
18
Trophies
0
XP
11
Country
United States
Btw, The "File Version" of the EXE tends to lag behind the version listed in the about tab.

You may want to consider using code to extract the version information from the EXE for displaying on that tab, rather than tracking the two seperately. (I'm not a Delphi user, but i belive the file version on the EXE comes from the project version or something like that in delphi. It is currently set to 1.2.0.0. even for 1.04)

Here is some example code that reads the version information from the file and displays it in a message box.
Code:
procedure TForm1.Button1Click(Sender: TObject);
var
ÂMajor, Minor, Release, Build: word;
begin
Âif GetFileVersion(Application.ExeName,
         ÂMajor, Minor, Release, Build) then
 ÂShowMessage(Format('Version %d.%d.%d.%d',
           [Major, Minor, Release, Build]))
Âelse
 ÂShowMessage('Version information not available');
end;

function TForm1.GetFileVersion(const FileName: TFileName;
 var Major, Minor, Release, Build: word): boolean;
// Returns True on success and False on failure.
var
Âsize, len: longword;
Âhandle: THandle;
Âbuffer: pchar;
Âpinfo: ^VS_FIXEDFILEINFO;
begin
ÂResult := False;
Âsize := GetFileVersionInfoSize(Pointer(FileName), handle);
Âif size > 0 then begin
 ÂGetMem(buffer, size);
 Âif GetFileVersionInfo(Pointer(FileName), 0, size, buffer)
 Âthen
  Âif VerQueryValue(buffer, '\', pointer(pinfo), len) then begin
   ÂMajor  := HiWord(pinfo.dwFileVersionMS);
   ÂMinor  := LoWord(pinfo.dwFileVersionMS);
   ÂRelease := HiWord(pinfo.dwFileVersionLS);
   ÂBuild  := LoWord(pinfo.dwFileVersionLS);
   ÂResult Â:= True;
  Âend;
 ÂFreeMem(buffer);
Âend;
end;


Since you don't use the "release" or "build" versions you could omit them and use:

Code:
Format('Version %d.%.2d', [Major, Minor])

Notice the ".2" which will make sure the second portion is 2 digits long (To match your current version format).



Btw. I don't know Delphi, and this code comes from a user comment on http://www.delphi3000.com/article.asp?ID=3958

(Obviously this alone is not something to release a new version for, but it could be added for the next version)
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
I'm a little lazy when it comes to changing the internal exe version numbers, it doesn't really affect the program so I'm not too bothered. Once I've got to the stage where I'm releasing a build every week plus instead of every day or two I'll make sure they match with every release.

Cheers for the code tho, it's well helpful!
 

thisUsernameIScr

Banned!
Banned
Joined
Mar 26, 2007
Messages
18
Trophies
0
XP
11
Country
United States
I'm a little lazy when it comes to changing the internal exe version numbers, it doesn't really affect the program so I'm not too bothered. Once I've got to the stage where I'm releasing a build every week plus instead of every day or two I'll make sure they match with every release.

Cheers for the code tho, it's well helpful!
Agreed, I only bring it up because I have had bugreports using the exe version number sent to me on other projects, which can less than helpful, especially when it bares no resemblance to the normal version number.
 

yukine

Well-Known Member
Member
Joined
Mar 16, 2007
Messages
123
Trophies
0
Age
36
Location
Arizona
XP
194
Country
United States
If only all programmers would continuously improve their programs like you do, TrolleyDave.

Keep up the excellent work.

Also, I think the homebrew game OMalone would be a good addition to the available updates.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
If only all programmers would continuously improve their programs like you do, TrolleyDave.

Keep up the excellent work.

Also, I think the homebrew game OMalone would be a good addition to the available updates.

Thanks for the compliments they are most definitely appreciated!
biggrin.gif


I'll download that game later and add it as an update pack. Am having a bit of a lazy day to be honest! Will be working on being able to sort the updates list into update types later on to make it a bit easier to look for the updates you want.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
V1.05 Released!

V1.05
-----
- Now checks to see if the backup you're adding to the list is already in there and if it does it prompts for confirmation.
- Added filtering to Updates list. You can now pick between All, Apps, Emus, Homebrew Games or Skins.
- Fixed bug when downloading a skin update.
- Added Show Preview button to updates list for previewing skins. You can now view a preview for a skin pack if it exists on the server.
- Added All to the COMMON section of language.ini file.
- Double clicking on the cartridge picture in the About tab swaps between R4 Commander and M3S Commander on the fly.
- Now safe trims every rom by 255 bytes.
- Added GBA-Temp to the WWW list.
- Added Latin American and Spanish languages. Thanks go to omegakenshin and _GalForD_!
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
Regarding save file format:

You could use
http://forums.maxconsole.net/showthread.php?p=426597

and compare the svae files in a hex editor

I think for R4/M3s is simply, they simply add 256kb worth of "FF" hex values onto the end of a normal .sav format file as far as I recall

Excellent one mate, you're a total star! I'll add save transforms into the next release. Anyone know of a good save file site that I can download all the different formats from? I only own an R4 so have no other save file types.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
If only all programmers would continuously improve their programs like you do, TrolleyDave.

Keep up the excellent work.

Also, I think the homebrew game OMalone would be a good addition to the available updates.

Have added OMalone to the updates list!

EDIT: Sorry to do this to you folks but have also added v1.05a to the blog. It adds the ability to download DPG files and Podcasts from the Updates tab. Attempting to download them without v1.05a will cause the program to crash! Have also added Wii Bomberman Land trailer and DS-Life Episode 14 podcast.
 

TrolleyDave

Philosolosophising
OP
Former Staff
Joined
Jan 1, 2007
Messages
7,761
Trophies
1
Age
52
Location
Wales, UK
XP
933
Country
V1.06 Released!
—–-----------------------------
- Now checks to see if the game you’re adding exists on the card and if it does it prompts for confirmation.
- You can now select between different servers.
- It now displays proper names instead of file names in the Emulators, Applications, Homebrew Games and Updates tabs.
- When installing the backups list it now displays a status box with the information in it.
- Fixed a bug where it loaded translations into the wrong strings in the Applications Tab.
- Added ability to download DPG and MP3 files as update packs. Also installs them to the currently set directories in the respective tabs.
- Refined HTTP download procedure.
- Moved some things around.
- Removed some now redundant things.
- Now searches for and copies over gbaframe.bmp found in any skin archive. Does not work for themes.
- Added Dutch translations. Thanks go to Gerard Terbeke.
- Refined NFO file structure, automatically updates old files.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    SylverReZ @ SylverReZ: You could say the same for a couple or so threads that used to be popular, I guess.