ScoreHero
Home | Forum | Wiki
Inbox [ Login ]Inbox [ Login ]
SearchSearch MemberlistMemberlist
ProfileProfile Log inLog in
a Song Injector program
Goto page 1, 2  Next
 
Post new topic   Reply to topic    ScoreHero Forum Index -> Software
View previous topic :: View next topic  
Author Message
dieselmachine  





Joined: 15 Jul 2006
Posts: 24

PostPosted: Mon Oct 30, 2006 11:45 am    Post subject: a Song Injector program Reply with quote

Here's something I wrote to facilitate adding new songs to the GH 4track demo.

I realize other things are out there that do the same thing. But maybe someone can get use out of this.

It's in java. After running the file, the first box prompts for the location of the main_0.ark, the second for the midi to add, and the third is 4 buttons, to choose which song to replace.

If main.hdr is not in the same directory as main_0.ark, it will fail.
If the vgs for the midi is not in the same folder as the midi, with the same namebase, it will fail.

It appends the data to the end of the file, not inside. This way, any size is doable, and no need to pad extra space.

the downside is that, done repeatedly, it gets huge. So, if you use it, backup the files and use them when you want to add different songs.

I plan on reindexing the base files and then stripping out all the songs, to make a tiny base code block on which to build the other data, while providing a definate 'reset' point to start over.

Hopefully it proves useful to someone.

http://mmu96.com/gh2/gh2demo.zip

class and source code included
Back to top
View user's profile Send private message
Huwonk  





Joined: 26 May 2006
Posts: 2432
Location: Marysville, Ohio

PostPosted: Mon Oct 30, 2006 1:02 pm    Post subject: Reply with quote

Automated engineering rules. I'll have to see if I can get this to work... Thanks!
_________________
Back to top
View user's profile Send private message Visit poster's website XBL Gamertag: Huwonk
Squirrel  





Joined: 27 Jul 2006
Posts: 4828
Location: Wyano, PA (Come visit! My gameroom is always open.)

PostPosted: Mon Oct 30, 2006 1:13 pm    Post subject: Reply with quote

looks like song length restriction is finally over, good job.

Too bad I can't begin to figure out how they did the current midi's, so i can start on my own song
_________________
2738.png
Back to top
View user's profile Send private message Visit poster's website XBL Gamertag: Hoyoooo
2n2  





Joined: 04 Oct 2006
Posts: 345

PostPosted: Mon Oct 30, 2006 1:43 pm    Post subject: Reply with quote

Dumb question probably, but how do you run this on a Windows machine?
I have java installed, but when running 'java Gh2demo' at a command prompt, I get:
Exception in thread "main" java.lang.NoClassDefFoundError: Gh2demo$2
at Gh2demo.main(Gh2demo.java:235)


Thanks.
Back to top
View user's profile Send private message
Huwonk  





Joined: 26 May 2006
Posts: 2432
Location: Marysville, Ohio

PostPosted: Mon Oct 30, 2006 3:56 pm    Post subject: Reply with quote

2n2 wrote:
Dumb question probably, but how do you run this on a Windows machine?
I have java installed, but when running 'java Gh2demo' at a command prompt, I get:
Exception in thread "main" java.lang.NoClassDefFoundError: Gh2demo$2
at Gh2demo.main(Gh2demo.java:235)


Thanks.


Well for one, it's case sensitive. For two you need the latest JRE.
_________________
Back to top
View user's profile Send private message Visit poster's website XBL Gamertag: Huwonk
ImaCarrot  





Joined: 06 Mar 2006
Posts: 2687

PostPosted: Mon Oct 30, 2006 6:19 pm    Post subject: Reply with quote

Ah nice, removing the size restriction is nice, though probably not as desireable for the full release.
Back to top
View user's profile Wiki User Page Send private message XBL Gamertag: ImaCarrot
dieselmachine  





Joined: 15 Jul 2006
Posts: 24

PostPosted: Mon Oct 30, 2006 7:00 pm    Post subject: Reply with quote

Okay, I got the same noclassdeffound error when i tried to run it via command line. My bad on that. It appears that some other classes were generated that were needed to run the class, and i didnt include them.
The new archive has those extra classes, so running java Gh2demo should bring up the song injection program. Files are here:

http://mmu96.com/gh2/gh2demo.zip

Also, I just coded a file stripper to remove all song data from the ARK file and relocate all other data to the beginning of the ark. It uses no hard coded data from the game, so it should work on the 4track demo as well as the 10track demo, although the file injector only works on the 4track (for now), so a stripped 10track wont do much good. These files are here:

http://mmu96.com/gh2/gh2header.zip

Running it on the HDR for the demo will trim the ARK down to about 75Mb, which is a nice small base file to run from before injecting files with the other program. This way, the file limit is still gone, but no space will be wasted in the middle of the file, since all song data is now placed at the end. I tested it by injecting 4 songs from the 10track demo into the 4 track demo after running the file stripper, and everything works great.
Back to top
View user's profile Send private message
2n2  





Joined: 04 Oct 2006
Posts: 345

PostPosted: Mon Oct 30, 2006 10:59 pm    Post subject: Reply with quote

Cool. Thanks. It runs now.

However, another maybe dumb question. How long should the overwriting take? I get to the point where I choose the ARK, then the mid files, then the window with the buttons of which song to choose and nothing seems to happen when I click on of them to choose the song. Is there a prompt when it's done? Thanks!
Back to top
View user's profile Send private message
dieselmachine  





Joined: 15 Jul 2006
Posts: 24

PostPosted: Tue Oct 31, 2006 1:30 am    Post subject: Reply with quote

It only works for one song right now. You choose the ARK, then the midi, then push one button, and although the window won't close, it is done. I need to fix that, it's true. The version I'm working on right now has multiple midi patching enabled, and will be uploaded as soon as it properly outputs a custom 10 track gh2 demo built off a minimal base file.

Right now it outputs something that crashes the ps2, so somewhere along the line i introduced another bug into the code. The hassle involved with transferring the new ISO to the ps2 (power off ps2 and pc, swap HD, power on pc, transfer, power down, swap) causes me to do more coding between tests than i really should, so when something goes awry, i'm never really sure what it is. I just code a whole lot and hope I don't fuck up.

And since I have yet to sleep, and I work in 4 hours, I'm gunning for a fully operational patcher tomorrow, maybe the next day. Then, awesomeness.

Goodnight!
Back to top
View user's profile Send private message
Orgophlax  





Joined: 31 Oct 2006
Posts: 38

PostPosted: Tue Oct 31, 2006 6:22 am    Post subject: Reply with quote

Anyone know if you remove the other demos and movies from the demo disk will it still boot properly? I don't want to have to build a 1.5G ISO every time I want to change the songs...

Also when I try to inject a song, it gives error "Patch phase failed! Is file open in another program?". To answer the question, it is not.
Back to top
View user's profile Send private message
2n2  





Joined: 04 Oct 2006
Posts: 345

PostPosted: Tue Oct 31, 2006 8:11 am    Post subject: Reply with quote

Gotcha. Thanks for the hard work dieselmachine
Back to top
View user's profile Send private message
dieselmachine  





Joined: 15 Jul 2006
Posts: 24

PostPosted: Wed Nov 01, 2006 3:40 pm    Post subject: new version Reply with quote

http://mmu96.com/gh2/gh2demoEdit.zip

updated versions of both of my tools are in there, along with source code and the worst readme you'll ever read.

gh2header.class strips song data from a demo and leaves just the framecode, so you can add your own songs to the end without worrying about size limitations or wasted space in the ARK. All non-songdata files are consolidated into the beginning of the ARK, and the offset pointers adjusted accordingly.

gh2demo.class will open an ARK (4 or 10 song demos) and allow appending of songs to the end of the file, while relinking the chosen song to the new data. NEW: color coded boxes to tell if you've loaded in a song yet, and you can now add as many songs as you want without rerunning the program.

If you use this to edit the ten song demo, you need to specify so in the command line argument, like so:

> java Gh2demo 10

if the number 10 is not found, it will treat it as a 4-track demo.

next up: auto-conversion of gh1 tracks into a format gh2 will like. Anyone got tips on this? Would it work if I simply changed t1_GEMS to PART GUITAR and recalculated the values for size within the midi?
Back to top
View user's profile Send private message
ImaCarrot  





Joined: 06 Mar 2006
Posts: 2687

PostPosted: Wed Nov 01, 2006 6:27 pm    Post subject: Reply with quote

Good work on all this.

Take a look at Riff's midi details thread (I'm sure you have already), he details all the different changes. Like it isn't just changing T1 GEMS to PART GUITAR, the rest of the band now have their own tracks, which effectively gets rid of the ANIM track from GH1.

It wouldn't hurt to try just changing T1 GEMS to PART GUITAR though, maybe it'll work since those songs don't need the rest of the tracks. I'm just worried that the game won't look for the ANIM track anymore, so the rest of the band might not work right.
Back to top
View user's profile Wiki User Page Send private message XBL Gamertag: ImaCarrot
Squirrel  





Joined: 27 Jul 2006
Posts: 4828
Location: Wyano, PA (Come visit! My gameroom is always open.)

PostPosted: Wed Nov 01, 2006 7:54 pm    Post subject: Reply with quote

Does this work on the PAL version?

EDIT:

That would be a negative ghost rider.
_________________
2738.png
Back to top
View user's profile Send private message Visit poster's website XBL Gamertag: Hoyoooo
Orgophlax  





Joined: 31 Oct 2006
Posts: 38

PostPosted: Thu Nov 02, 2006 5:01 am    Post subject: Reply with quote

Any tips on getting the OPM demo to work from a HD? I inject songs, load the ISO to the HD but it won't run. Sits at a black screen. Al other images I have on it work fine.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ScoreHero Forum Index -> Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Copyright © 2006-2024 ScoreHero, LLC
Terms of Use | Privacy Policy


Powered by phpBB