Jump to content

Photo

Enabling music & sound FX mixing within Jaguar Doom source.


52 replies to this topic

#1 DEATH OFFLINE  

DEATH

    Space Invader

  • 41 posts
  • Location:France

Posted Sun Jan 20, 2019 2:40 PM

Found this on Atari Jaguar Fans, Facebook

 

 

"Some of you might find this interesting. I figured out how to mix music and sound in Jaguar Doom, the results however are quite terrible. The music sounds quite scratchy and choppy but everything else runs fine.

Here is a better example, apologies for the poor camera work. I was trying to film and play at the same time.

It really seems like the id Software team almost had it but ran out of time, IMO."

 

 

 



#2 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 3:08 PM

Hey thanks for sharing!  This was me just messing around with the source.  I'll record a better video soon so you can hear the music a bit better. 

 

Anyone care to speculate as to what is happening to the music to make it sound the way it does?  It's interesting that it works at all!



#3 neo_rg OFFLINE  

neo_rg

    Moonsweeper

  • 388 posts
  • Location:U.K.

Posted Wed Jan 23, 2019 3:29 PM

All samples, both music and effects are played directly from cart. Probably killing the bus accessing it all.

#4 Sporadic OFFLINE  

Sporadic

    Dragonstomper

  • 537 posts
  • Probably RB+ing
  • Location:UK

Posted Wed Jan 23, 2019 4:40 PM

All samples, both music and effects are played directly from cart. Probably killing the bus accessing it all.

Any mileage in reducing the sample rate to reduce the load?



#5 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 4:42 PM

You think a bus saturation issue would also affect the sound fx which seem to playback fine. Maybe sound is prioritized over Music?


-Chad

#6 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 4:44 PM

Any mileage in reducing the sample rate to reduce the load?


I was wondering the same thing. I've tried changing a couple references I found for sample rate but couldn't hear any appreciable difference but I'll keep digging.


-Chad

#7 Sporadic OFFLINE  

Sporadic

    Dragonstomper

  • 537 posts
  • Probably RB+ing
  • Location:UK

Posted Wed Jan 23, 2019 4:47 PM

I was wondering the same thing. I've tried changing a couple references I found for sample rate but couldn't hear any appreciable difference but I'll keep digging.


-Chad

Have you tried disabling the sound FX to see if that helps the music? Just as a test



#8 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 4:49 PM

I have and the music plays perfect with sound FX disabled.


-Chad

#9 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,755 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Wed Jan 23, 2019 5:06 PM

I have and the music plays perfect with sound FX disabled.


-Chad

 

Wouldn't mind taking a look at this, any chance of posting a buildable source?



#10 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 5:13 PM

Certainly, which build you looking for? The one with music during gameplay or what I currently have with the mixing or both?


-Chad

#11 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,755 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Wed Jan 23, 2019 5:15 PM

The one with mixing enabled please :)



#12 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 5:20 PM

The one with mixing enabled please :)

 

Okay, give me just a few and I'll zip up everything I got.



#13 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 5:37 PM

Here you go!

 

https://drive.google...iew?usp=sharing

 

I've packaged it up where you can mount this folder as the c: drive in Dosbox.  I threw all the source code under Jaguar\bin.  You can run make to build a new doom.abs but I've left mine in there for now.

 

Now for the fun part, you want to navigate to the 2nd level and press the number 3 on the controller to fire up music and sound.  You can actually hear the mixing in the intro and menus though.

 

I will stay up all night if needed to provide whatever support you need!



#14 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,755 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Wed Jan 23, 2019 5:39 PM

Thanks, but - Go to bed, its 10am here and I'm at work :)

 

Will look when I get home!



#15 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 5:41 PM

Some additional notes:

 

The main change I made was in "s_sound.c"  where it literally has a section commented for /* run the mixing in parallel on the dsp */ .  Just compare the original to mine, not a big change really.

 

I setup the number 3 to run "S_StartSong(mus_e1m2, 1);" in "p_user.c"

 

If you try pressing 3 on the first level the game will freeze because it's already still playing the intro. But you can reset it by pressing the "* #" combo on the controller.

 

If you happen to be playing with a Pro Controller, use the shoulder buttons to strafe, 10x more fun that way :)

 

Again you don't even have to start the game to hear the music struggling in the intro.


Edited by BeefMan, Wed Jan 23, 2019 6:37 PM.


#16 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Wed Jan 23, 2019 6:16 PM

Tried recording another video.  On my phone it sounds fairly loud so youtube must be lowering the volume.  Right about the time I fire the shotgun the song loops back to the beginning where it's fairly quiet.

 


Edited by BeefMan, Wed Jan 23, 2019 6:17 PM.


#17 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,755 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Thu Jan 24, 2019 12:51 AM

Could be completely wrong here (20 minutes of looking)

 

but, in dspbase.gas:

ALT_SAMPLE_P (r21) is used as the sample pointer for the audio to play

 

r21 is set in both music.gas and sfx.gas

 

You'd need to re-code one of them to use another pointer, then modify the replayer in dspbase.gas to read and mix them into the output stream.

 

Code is a bag of snakes having an orgy. Might be easier to rip it all out and replace with u235, hack it into the sample player, and use modules.



#18 BeefMan OFFLINE  

BeefMan

    Chopper Commander

  • 100 posts

Posted Thu Jan 24, 2019 6:40 AM

Could be completely wrong here (20 minutes of looking)
 
but, in dspbase.gas:
ALT_SAMPLE_P (r21) is used as the sample pointer for the audio to play
 
r21 is set in both music.gas and sfx.gas
 
You'd need to re-code one of them to use another pointer, then modify the replayer in dspbase.gas to read and mix them into the output stream.
 
Code is a bag of snakes having an orgy. Might be easier to rip it all out and replace with u235, hack it into the sample player, and use modules.

Thank you for taking a peak! I’m really lost when it comes to assembly but I’ll start reading up.

Do you think the soundFx data is basically corrupting the music data because they are sharing the same pointer?

It really seems like it might be possible to make this work, or am I being optimistic?

If so maybe we should consider setting up a bounty for someone to claim if they were to get it working. Not that it would be me lol.

We need a coding hero!

cf550d576f2af4f10cee9246a16de88a.jpg


-Chad

Edited by BeefMan, Thu Jan 24, 2019 6:55 AM.


#19 leech OFFLINE  

leech

    Stargunner

  • 1,406 posts

Posted Thu Jan 24, 2019 7:55 AM

This would be cool. As far as Doom on consoles go, the Jaguar one is always rated the best, but always lowered because of the lack of music.

#20 philipj OFFLINE  

philipj

    Dragonstomper

  • 567 posts
  • Location:Birmingham, Alabama

Posted Thu Jan 24, 2019 11:36 PM

Wasn't a custom C compiler used to program Doom for the Jag...? Every one and their mother was looking for the compiler at one time before they gave up.



#21 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,755 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Fri Jan 25, 2019 12:27 AM

Wasn't a custom C compiler used to program Doom for the Jag...? Every one and their mother was looking for the compiler at one time before they gave up.


No.

#22 philipj OFFLINE  

philipj

    Dragonstomper

  • 567 posts
  • Location:Birmingham, Alabama

Posted Fri Jan 25, 2019 12:50 AM

No.

 

Quote from John Carmack:

 

 

I actually dug up all my old jaguar development hardware to give to these

guys a year or two ago.
 
Unfortunately, it turned out that I had lost the C compiler that I had retargeted
to the jaguar RISC engines, so DOOM was no longer buildable.


#23 neo_rg OFFLINE  

neo_rg

    Moonsweeper

  • 388 posts
  • Location:U.K.

Posted Fri Jan 25, 2019 12:52 AM

If that's the case then we couldn't build doom from source now...

#pennydrop

Edited by neo_rg, Fri Jan 25, 2019 12:53 AM.


#24 CyranoJ OFFLINE  

CyranoJ

    RAPTOR Wrangler

  • 5,755 posts
  • reBOOTed
  • Location:Adelaide, SA

Posted Fri Jan 25, 2019 2:32 AM

Thanks for stating the blindingly obvious, Neo :)

 

Answer is still no.



#25 JagChris OFFLINE  

JagChris

    River Patroller

  • 3,645 posts
  • Location:Oregon

Posted Fri Jan 25, 2019 2:56 AM

I'm sure he meant that about the initial state the makefile was in when he first dug everything out. Then later tweaked it before releasing so it would build.

I'm sure these guys are just kidding with you Phillip.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users