Skeetendo

’Cause all games were better on the GBC

You are not logged in.

#1 2012-10-04 18:55:00

koolboyman
Member
Registered: 2010-10-16
Post 92/203

Automatic Update Checker

I'm interested in making a program that would help a lot of hackers out. 

- This program would fetch the IPS from a server and patch it to a clean ROM, and it would create a copy of the clean ROM in the same folder. 
- It would also check for updates.  So after you patch your ROM for the first them then run the program again, it would compare your version number (Which would be embedded somewhere safe in the ROM). 
- If your version is less than the one on the web server, it would give you a list of things included in the latest update and then let you patch it. 
- The program would then take the copy of the clean ROM, use the latest IPS from your server to patch it then overwrite the old version of your ROM hack. 

Anyone interested in helping?  I think this would make updates and bug fixes so much easier if this was done automatically instead of people having to start the entire patching process over and over again everytime there's an update.

Offline

#2 2012-10-04 19:30:09

Miksy91
Member
Registered: 2010-10-16
Post 1,137/2,339

Re: Automatic Update Checker

Sounds like a good idea. So how would it work exactly? Compare a byte value with the one on the ips-file and if the value is smaller do what you pointed out in third "-" ?

I haven't done really any programming before so as of now, I wouldn't be able to help you out expect for with ideas (which is what you're looking for help in the most part I assume). How about determining the offset to look for the version number as something universal of which changing, the rom file itself wouldn't be "damaged" in almost every single GB/C game ?

This may be a bad assumption but wouldn't offset 0x4-0x7 be unused in almost every single GB/C game? Not like you should use the beginning of the rom for the version number check because there are a lot more better choices than that but just wondering.

Last edited by Miksy91 (2012-10-04 19:32:29)

Offline

#3 2012-10-04 19:38:34

koolboyman
Member
Registered: 2010-10-16
Post 93/203

Re: Automatic Update Checker

Miksy91 wrote:

Sounds like a good idea. So how would it work exactly? Compare a byte value with the one on the ips-file and if the value is smaller do what you pointed out in third "-" ?

I haven't done really any programming before so as of now, I wouldn't be able to help you out expect for with ideas (which is what you're looking for help in the most part I assume). How about determining the offset to look for the version number as something universal of which changing, the rom file itself wouldn't be "damaged" in almost every single GB/C game ?

This may be a bad assumption but wouldn't offset 0x4-0x7 be unused in almost every single GB/C game? Not like you should use the beginning of the rom for the version number check because there are a lot more better choices than that but just wondering.

It would get a number from the ROM that was created by the patch.  It would be the hacker's responsibility to update this number everytime there's an update.   Whether it's with a hex editor or a function built into the program.  I personally wouldn't use any part of the header in case somebody wants to update those functions.  A good area would probably be the footer of one of the later banks consisting of nothing but blank data in the ROM.

Last edited by koolboyman (2012-10-04 19:39:11)

Offline

#4 2012-10-04 19:45:58

Miksy91
Member
Registered: 2010-10-16
Post 1,138/2,339

Re: Automatic Update Checker

Yeah, I pretty much figured it out. So what about "later banks" in rom? "Practically", you could build up a GB/C game with a rom bank or two but you're probably referring to end of 1MB rom area here or is there some other way the offset to store the version number could be defined for each size of a rom file?

Offline

#5 2012-10-04 20:14:20

Sawakita
Administrator
Registered: 2010-10-16
Post 309/365

Re: Automatic Update Checker

Well, one could use the last bytes in the ROM title (address 0x134-0x142) to store the hack version as a progressive number (a couple of bytes would be more than enough as I doubt anyone would ever release as much as 65536 versions of their hack).

But another question comes to my mind: how would you automatize the retrieval of the correct ROM file from the client? Would you enforce file names? Or would you rather use a config file (although you would have to enforce the config file name anyway, so no big difference), where you store the name of the ROM file to load from client? If the latter, you could get rid of the issue of storing hack version into the ROM file because you'd store it in the config file.
Personally I prefer the first option: you enforce the name of the ROM hack file, without having configuration files flying around.

Concerning the problem of automatically connecting to server, I have no knowledge, just some doubts. When would this check-to-server be activated? Would it just be a continuous background process? What kind of permissions would these cyclic server requests require?

EDIT:
Actually thinking a bit more about the config file issue, it might be better implementing one, since you talked about generalizing this utility for different ROM hacks, in which case you'd have to know which hacks need to be updated (and, as a consequence, which servers need to be visited).

EDIT 2:
I just noticed you mentioned that the program itself would have to be actively launched by the user, which makes much more sense than having a process contstantly running in background.

Last edited by Sawakita (2012-10-04 20:26:27)

Offline

#6 2012-10-05 00:39:50

koolboyman
Member
Registered: 2010-10-16
Post 94/203

Re: Automatic Update Checker

Sawakita wrote:

Well, one could use the last bytes in the ROM title (address 0x134-0x142) to store the hack version as a progressive number (a couple of bytes would be more than enough as I doubt anyone would ever release as much as 65536 versions of their hack).

But another question comes to my mind: how would you automatize the retrieval of the correct ROM file from the client? Would you enforce file names? Or would you rather use a config file (although you would have to enforce the config file name anyway, so no big difference), where you store the name of the ROM file to load from client? If the latter, you could get rid of the issue of storing hack version into the ROM file because you'd store it in the config file.


EDIT:
Actually thinking a bit more about the config file issue, it might be better implementing one, since you talked about generalizing this utility for different ROM hacks, in which case you'd have to know which hacks need to be updated (and, as a consequence, which servers need to be visited).

EDIT 2:
I just noticed you mentioned that the program itself would have to be actively launched by the user, which makes much more sense than having a process contstantly running in background.

To make sure it's the correct ROM file, I'm sure an MD5 checker would be good enough to verify that the ROM is clean and ready to be patched to.

I'm not really a fan of using four characters in the game name, but maybe others dont see it as a problem.

I was considering either a config file, or make the program open source so people could tailor the program to work specifically for their hack (which wouldn't be much trouble.  Just the new location of the ips and information, the name of the hack and possibly a new area in the rom to check the version number.  Either way would work.

Yeah, I don't see the point of it running in the background like that.  The player can just check the updater every day to see if there's a new version available. 

There's still a lot to consider when making this, but this could make updating our ROM hacks so much easier.  For example, we find out about a small glitch in our ROM hack, in literally five minutes everyone could have the fixed version that takes care of that glitch.

Last edited by koolboyman (2012-10-05 00:41:32)

Offline

#7 2012-10-05 03:34:44

stag019
Idea Killer
Registered: 2011-01-05
Post 219/630

Re: Automatic Update Checker

I agree and disagree.

I feel this project could work, but would be a big waste to limit it as much as the suggestions have specified.

First off, I could see this being a use to more than just IPS patches, because of the limitations in that patching system, I would want to support other patching systems too. The big one that comes to mind is PPF patches, primarily for Super Mario 64. As far as implementing this, I'd have to see how it works.

IPS patches themselves, however, I have a great understanding of and could write my own IPS patching software easily. I'd be willing to tackle this project. I also have a fairly dedicated server and would be willing to lend that to use as well.

I'd be willing to make the client-side open source, but I'd have to work on the server side by myself before I decide if I would want to open source it or not. I'd write the client side in C with wxWidgets (for any OS), and the server side in PHP.

I agree with needing a config file and using MD5 to determine the correct ROM to patch to (which I don't think applies to PPF because it has that check internally).

While I agree it would be nice to just have a person use that program every day, I don't think that would be realistic. That could still be a backup, but it would be nice if, as well, we could have certain emulators launch it every time they themselves launch. That way, any time anyone is playing it, it's the most updated version.

After we all decide the specifics, I could get started if you'd like.


You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.

Offline

#8 2012-10-05 03:40:10

PixelEye
Member
From: Philippines
Registered: 2012-08-02
Post 74/162
Website

Re: Automatic Update Checker

Wait, after the rom was patch, is the save file will be compatible to the previous version?

Cheers. This is something for gamers. Way better than lunar. :)


LIKE US on Facebook!
---
Berries Inc.,Corp. Graphical Resource
---
I'M BACK, BUT MY WORKS BEEN ACCIDENTALLY DELETED ON MY PHONE(INCLUDING MY HACK THAT I'M DOING AND GEN 5 SPRITES AND TILESETS). SO THE SOLUTION WILL BE REVISING MY WORKS FROM 0 TO 456.

CHEERS.

Offline

#9 2012-10-05 04:57:39

koolboyman
Member
Registered: 2010-10-16
Post 95/203

Re: Automatic Update Checker

stag019 wrote:

I agree and disagree.
First off, I could see this being a use to more than just IPS patches, because of the limitations in that patching system, I would want to support other patching systems too. The big one that comes to mind is PPF patches, primarily for Super Mario 64. As far as implementing this, I'd have to see how it works.

IPS patches themselves, however, I have a great understanding of and could write my own IPS patching software easily. I'd be willing to tackle this project. I also have a fairly dedicated server and would be willing to lend that to use as well.

I forgot all about the limitations of IPS patches.  I guess it's just because I've been using them forever.  I guess we can start on IPS and them move onto other patch types.  Then maybe move onto UPS / PFF or whatever. 



stag019 wrote:

I'd be willing to make the client-side open source, but I'd have to work on the server side by myself before I decide if I would want to open source it or not. I'd write the client side in C with wxWidgets (for any OS), and the server side in PHP.

Awesome!


stag019 wrote:

I agree with needing a config file and using MD5 to determine the correct ROM to patch to (which I don't think applies to PPF because it has that check internally).

Yeah now that I think about it a config file would be a bit easier to deal with different ROM hacks and target ROMs.

stag019 wrote:

While I agree it would be nice to just have a person use that program every day, I don't think that would be realistic. That could still be a backup, but it would be nice if, as well, we could have certain emulators launch it every time they themselves launch. That way, any time anyone is playing it, it's the most updated version.

I was considering that too.  I was hoping people would understand to keep checking the updater since they would need to run it at least once get the patch and play the game.  It would tell people to run the program every day to check for updates.  But then again, people may just ignore it because they want to play the hack ASAP.

I don't dislike your idea, but how would this be done though?  Would the patched ROM be compressed then decompressed everytime the program was ran?  What if people want to play the ROM on something like their cell phone, their Wii or a Gameboy flash cart?  I'm not saying it's a bad idea, but some people want to play hacks on more than their PC.

I'm very happy about your enthusiasm!

Offline

#10 2012-10-05 05:01:52

stag019
Idea Killer
Registered: 2011-01-05
Post 220/630

Re: Automatic Update Checker

koolboyman wrote:

I don't dislike your idea, but how would this be done though?  Would the patched ROM be compressed then decompressed everytime the program was ran?  What if people want to play the ROM on something like their cell phone, their Wii or a Gameboy flash cart?  I'm not saying it's a bad idea, but some people want to play hacks on more than their PC.

Like I said, it would be a backup. Obviously people would still need to check it if they don't use certain emulators. I just thought it would be a good idea for example for VBA to do it. It's not so much for the people who don't want to open the checker, just the people who are too lazy to do it every time they open their emulator, it can do it for them.

Anyways, tomorrow (maybe, I work an 11 hour shift) I'll try to write out a small "specification" to see if we can all agree before I start to try and implement it.


You can try to hide yourself in this world of pretend; when the paper's crumpled up, it can't be perfect again.

Offline

#11 2012-10-05 05:38:39

koolboyman
Member
Registered: 2010-10-16
Post 96/203

Re: Automatic Update Checker

stag019 wrote:

Anyways, tomorrow (maybe, I work an 11 hour shift) I'll try to write out a small "specification" to see if we can all agree before I start to try and implement it.

Awesome.  I might be able to help out a bit this weekend as well, I too have a long shift at work tomorrow.

Offline

#12 2012-10-05 18:09:48

Sawakita
Administrator
Registered: 2010-10-16
Post 311/365

Re: Automatic Update Checker

stag019 wrote:

I'd be willing to make the client-side open source, but I'd have to work on the server side by myself before I decide if I would want to open source it or not. I'd write the client side in C with wxWidgets (for any OS), and the server side in PHP.

I'm pretty sure wxWidgets has no bindings for pure C (natively it's a C++ library). GTK+ seems the most fitting lib for pure C development. If you're going to stick with wxWidgets you should go for its bindings on another language (python seems the most fitting, Guido himself seems to say that if wxPython was around when they had to choose the GUI library to insert in the default python library, he would have chosen it instead of tkinter).
Maybe you could even choose to develop a web-based frontend. Who doesn't have a browser installed, these days?

stag019 wrote:

While I agree it would be nice to just have a person use that program every day, I don't think that would be realistic. That could still be a backup, but it would be nice if, as well, we could have certain emulators launch it every time they themselves launch. That way, any time anyone is playing it, it's the most updated version.

How would you embed this behaviour in an existing emulator? Maybe a script that fetches the updates and, immediately after that, launches the emulator might be more feasible.

Last edited by Sawakita (2012-10-05 18:10:09)

Offline

Board footer

Powered by FluxBB