Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » General Jazz Jackrabbit Talk

JJ2 Music Player

UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 18, 2006, 04:59 PM
UNKNOWNFILE is offline
Reply With Quote
JJ2 Music Player

For no reason whatsoever, I used my 1337 45m skillz and hacked JJ2 into just playing music on bootup.



Laugh as you may, it works. The access violation was purposefully inserted to prevent a huge CPU loop from eating up the system's resources.

Here is the ASM code to get the player working:

Insert this into 0048C681.
Code:
/*
Jazz Jackrabbit 2 Music Player
uses an actual copy of JJ2
*/

.text:0048C681                 push    offset 4D2950 ; song filename
.text:0048C686                 call    loc_465370
.text:0048C68B                 add     esp, 4
.text:0048C68E                 call    near ptr unk_4791A0
.text:0048C693                 nop
.text:0048C694                 retn ; Causes an access violation, but the music plays! ;)
You'll also need to patch the volume controller up. The offset it is in in Jazz2.exe is 0xA1CA0, but I can't remember the offset in memory. Patch 0xC39090 to this offset.

To load a file, you will need to set 0x4D2950 to whatever you want. If it is a J2B file, DO NOT INCLUDE THE EXTENSION.
J2B2IT, move over!
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 19, 2006, 12:45 PM
UNKNOWNFILE is offline
Reply With Quote
Here's an example of the music player. It doesn't need any of the required JJ2 files, as the calls have been inserted before the file loads go about their business.

The music is (c) Necros.

To change the music file, change 0xD1150 in the EXE to the music file's name. Remember, if it's J2b, do not include the .j2b extention. And remember to end the filename string with an 0x00.
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
Doubble Dutch

JCF Member

Joined: Mar 2004

Posts: 3,072

Doubble Dutch is doing well so far

Feb 19, 2006, 06:02 PM
Doubble Dutch is offline
Reply With Quote
O.o!

Yays!

Now all we need is to make it into an application!
__________________

nonne amicus certus in re incerta cernitur?

/)_/)
(^.^)
((")(")
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 19, 2006, 06:12 PM
UNKNOWNFILE is offline
Reply With Quote
Quote:
Originally Posted by Doubble Dutch
Now all we need is to make it into an application!
With March Break on the horizon, OK then. Todo's are:

1) make music load as an argument
2) remove unneeded code
3) try to handle CPU usage as sanely as possible without causing program errors
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
Stijn

Administrator

Joined: Mar 2001

Posts: 6,968

Stijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to beholdStijn is a splendid one to behold

Feb 20, 2006, 06:12 AM
Stijn is offline
Reply With Quote
Or just use xmplay.
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 20, 2006, 07:48 AM
UNKNOWNFILE is offline
Reply With Quote
This is useful in the job of parsing J2b's because it is (-) faster than using j2b2it, plus it converts the samples correctly.
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
Xobim

JCF Member

Joined: May 2005

Posts: 2,454

Xobim is doing well so far

Feb 20, 2006, 07:58 AM
Xobim is offline
Reply With Quote
I argee with Stijn, isn't it possible to convert the code so you can choose a song?
__________________
Earth Mantra, for all your ambient music needs.
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 20, 2006, 08:10 AM
UNKNOWNFILE is offline
Reply With Quote
I'm pretty sure it is from the command prompt. but now I must go to classes =(
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 20, 2006, 05:34 PM
UNKNOWNFILE is offline
Reply With Quote
Command prompt stuff added. A new version should be up once I test this stuff with my registry editor.

EDIT: It is done! However, the thing will hate you if you use quotes to load a module file. This will often happen with the shell's built-in file association. To fix this, you'll need to do some registry tweaking:

Change something like:

C:\games\jazz2\jj2mplay.exe "%1"

To:

C:\games\jazz2\jj2mplay.exe %1

That should fix issues.

Version 2 of the player is up, with a j2b, at this lovely little rapidshare page. =) Hey hey hey! I'm fat albert!
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.

Last edited by UNKNOWNFILE; Feb 20, 2006 at 06:05 PM.
Haze

JCF Member

Joined: Mar 2001

Posts: 535

Haze is doing well so far

Feb 21, 2006, 01:08 AM
Haze is offline
Reply With Quote
Quote:
Originally Posted by aegis
XMPlay can't handle:

-- fake pwm effect in chiptunes

la la la
If XMPlay can't handle the effects... most likely your tracker has implemented it wrong then. :P If you believe otherwise submit the tune to Ian himself via ftp://ftp.un4seen.com/incoming/.
And tried fiddling around with the settings?
__________________
Odin

Banned

Joined: Dec 2003

Posts: 3,776

Odin is doing well so far

Feb 21, 2006, 10:48 AM
Odin is offline
Reply With Quote
The main advantage of J2B2IT is that .it files can be read and edited in a tracker, such as Modplug Tracker. Therefore, if you want to make a remix of a Jazz 2 song or if you need a melody, you don't have to copy it by ear.
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 21, 2006, 12:37 PM
UNKNOWNFILE is offline
Reply With Quote
Quote:
Originally Posted by Odin
The main advantage of J2B2IT is that .it files can be read and edited in a tracker, such as Modplug Tracker. Therefore, if you want to make a remix of a Jazz 2 song or if you need a melody, you don't have to copy it by ear.
http://jazz.madskills.org/music/Jazz2Mods-LC/
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 22, 2006, 08:30 AM
UNKNOWNFILE is offline
Reply With Quote
I disabled registry reads and the splash screen. I also disabled winsock from starting up. The last thing I have to do is to get an error screen that says, "Music started successfully from $esi" where $esi is the parameters used.
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
UNKNOWNFILE

JCF Member

Joined: Aug 2005

Posts: 1,146

UNKNOWNFILE is doing well so far

Feb 22, 2006, 02:08 PM
UNKNOWNFILE is offline
Reply With Quote
Newest version released. This time, I put it on J2o. Download or I shall summon Ninja to go kung-fu on your worthless behinds.
__________________
I'm sick and tired of this community. So goodbye.

PS: Unreal > JJ2.
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 05:10 AM.