English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   project.WHDLoad (http://eab.abime.net/forumdisplay.php?f=63)
-   -   WHDLoad patch for music/sfx .. is this even possible? (http://eab.abime.net/showthread.php?t=77886)

Shatterhand 20 April 2015 18:19

WHDLoad patch for music/sfx .. is this even possible?
 
I've been thinking about this for a while now.

While I do *love* Amiga games, grown up with them and everything, it really annoys me how many games you have to choose between Sound FX or Music. It's really weird when I came from MSX, a much inferior machine, and basically every game had Music AND SFX, and I am pretty sure that's how it worked on the C64 too.

This really kills the mood of many games.

I've always wondered why coders did this on Amiga games, and I believe mostly would be for the following reasons:

A) Memory constraints. Since music actually may get a fair amount of memory on Amiga (unlike it was on 8 bit systems), the coders would make you choose to either load the music or load the sfx, but both couldn't fit on memory.

B) Use of the sound channels. I guess many musicians didn't bother making music using fewer channels, or maybe even coding the game properly to use just 1 or 2 channels, and leave ther other 2 for music.

Now I see WHDLoad has lots of good patches on games that fixes and add stuff on games (2 button support is really *AWESOME*). I wonder, would it be possible to patch games to add a support to have both music and sfx at the same time?

I don't think Memory Constraints would be a problem anymore, since I guess most people using WHDLoad would have a fair amount of Ram anyway.

And for the use of music channels... I guess that would be the biggest problem, but many games have SFX that "silences" one of the music channels when the SFX plays. While this is also annoying, it's still better to have no music or no sfx at all. I really wouldn't care... I guess games that make you choose between Music or SFX would use all 4 channels for SFX and this could get really messy, with different music channels being silenced for different sound effects... but I still think it would be worth a shot.

Deluxe Galaga did this very smartly, by letting the player choose what channels would be used for music and which ones for sfx... you could still have a very cool soundtrack playing (Even if lacking one or two instruments) while having proper sfx within the game.

So, is any of this doable? There are lots of games that could benefit from it !

Gzegzolka 20 April 2015 18:31

I hope so :) there are games that would benefit from that fix like Lotus3, Premiere, Chuck Rock etc... :)

Akira 20 April 2015 19:37

The issue is that when you kill a channel to play an SFX the music sounds like absolute garbage. There are lots of examples of this.

For doing this right, the music should be made for 3 channels and leave 1 free for SFX, but I guess most people didn't want to do the things they had to do on the inferior machines like the 64 or MSX anymore, so they went full on and used all tracks for music ;)

I believe phx made a pretty clever system for music+sfx when he ported sqrxz.

Shatterhand 20 April 2015 19:47

It really depends on how its done. I've seen it done right, and I've seen it done in a really bad way.

Battle Squadron does that and you barely notice. Hybris does and its awful. (Both were made by the same guy :D )

Usually people kill the channel where the main melody is playing, and I really think that's the wrong way to do it. I never understood why people did it like that most of the time (All Terrain Race and Hybris both do it like this).

But I'd still prefer to have this than to not have music+sfx at all.

If the music is played in just 3 channels and its possible to have all the sfx in just one, I'd take it, but I doubt games were made like that, and I guess it would be terribly difficulty to change this with an WHDLoad fix.

BTW ,good to hear from you, mate :D

Akira 20 April 2015 21:45

Yeah man long time no talk! :D

Battle Squadron uses a special driver for music, it isn't Protracker as far as I know and I can't tell right now how it works but there is a chance the music was done in less channels than 4.

The problem is people not properly coordinating, usually the composer was left to do what they wanted and then the coder did likewise and the result was shit. There's also the case some times that because of whatever reason, the composer would switch channels for the same instruments, and this would introduce problems too because some times you would mute that and some times not.

phx's driver, if I remember correctly, would detect the least used or "best if muted" channel and play the SFX in it. Try SQRXZ and see what you think of how it deals with channel muting. Now, patching games to include a different music/sfx routine, I would think, it's more complicated than it seems.

With PSG systems it's a lot easier to circumvent these problems, especially when you don't have hard panning of stereo (another problem).
And there's also the chance of music drivers that, by software, create more than the 4 channels the Amiga hardware has (case of TFMX driver in Factor 5 games)

dlfrsilver 20 April 2015 21:45

it would require more horse power to get a CPU voice, and much more processing power, this means using 680X0, not 68000.

Akira 20 April 2015 21:52

Quote:

Originally Posted by dlfrsilver (Post 1015831)
it would require more horse power to get a CPU voice, and much more processing power, this means using 680X0, not 68000.

TFMX does not require 680x0 and it has 7 voices. There are other drivers that add software voices without being a CPU drag.

Shatterhand 20 April 2015 22:02

Quote:

Originally Posted by Akira (Post 1015830)
Yeah man long time no talk! :D

Battle Squadron uses a special driver for music, it isn't Protracker as far as I know and I can't tell right now how it works but there is a chance the music was done in less channels than 4.

The problem is people not properly coordinating, usually the composer was left to do what they wanted and then the coder did likewise and the result was shit. There's also the case some times that because of whatever reason, the composer would switch channels for the same instruments, and this would introduce problems too because some times you would mute that and some times not.

phx's driver, if I remember correctly, would detect the least used or "best if muted" channel and play the SFX in it. Try SQRXZ and see what you think of how it deals with channel muting. Now, patching games to include a different music/sfx routine, I would think, it's more complicated than it seems.

With PSG systems it's a lot easier to circumvent these problems, especially when you don't have hard panning of stereo (another problem).
And there's also the chance of music drivers that, by software, create more than the 4 channels the Amiga hardware has (case of TFMX driver in Factor 5 games)

I didn't know about SQRXZ, looks like a sweet game!

The games that use more than 4 channels normally will already have music + sfx anyway, so no need to worry about those.

I had thought about the hard stereo panning and I'd imagine this would be a problem too. I believe certain games use 2 channels for music and 2 for sfx exactly to be able to have the sfx playing at either left or right channel.

Battle Squadron music works with Deliplayer, and it shows 4 channels there.

I am not even thinking about a new music/sfx routine, just something that turns both music and SFX at the same time, loads both in memory , let the SFX have priority over music, and just hope for the best. I am not sure even this is possible, I am certain trying to change how a game plays sfx/music, make it choose the best channel for muting etc, would be extremely difficult to do.

Shatterhand 20 April 2015 22:10

I mean, I believe in all those games, there's a variable that holds either if player chooses SFX or MUSIC, and then the code checks the value of this variable to load the sounds in memory, choose what to play, etc.

Just remove the check, let the game load everything, try to play everything at the same time and see what results we get. I still believe there's a chance it could work well with some games.

But I don't know if doing something like this is just a matter of "remove a couple of checks" in the code. And there's a big possibility that in certain games, it would suck beyond acceptable :)

But take, say, Chuck Rock for example, that game has the instruments separated very clear at each channel. If the SFX doesn't use all the channels, chances are the same instruments will always be muted to play the sfx. I'd rather have that great track playing and being butchered while having the SFX than have huge silence for most of time and a few sfx here and there, or a game that seems to be completely mute and a soundtrack playing that feels like it has nothing do with the game.

Cobe 20 April 2015 22:24

Music/SFX choice is really annoying thing. I remember back in a days I always chose SFX and played some music on tape... Today I avoid such games.
Maybe if it would be easier for coding instead of killing one channel better will be if music and sfx would be mixed and played through AHI?

Shatterhand 20 April 2015 22:29

That would be great for people with beefed-up amigas, but of no use with people like me with just an A600 with a 68000 :D

I dunno it would be easier, but it would be better for people with better computers for sure.

dlfrsilver 20 April 2015 23:47

Quote:

Originally Posted by Akira (Post 1015833)
TFMX does not require 680x0 and it has 7 voices. There are other drivers that add software voices without being a CPU drag.

Good answer, but bad reason.

The 7 voices are only used in the intros and outros. TFMX system use only 4 voices during the game, because having more voices uses too much CPU.

Some games would need 6 voices to get music and effects, and this is something that only 68020 or 68030 could cope with.

And hoping this won't make problems inside the game engine (because everything was made in a certain way from the start).

slowtide 21 April 2015 11:31

Thanks for bringing this up, Shatterhand! :) Ever since I worked with Octamed back in the day, I've been thinking about the same thing.

I assume that additional software mixing of voices could cause timing issues, especially for games with highly optimized code. It definitely wouldn't work on plain 68000 Amigas, but it might work on faster CPUs for some titles. Maybe someone with more expertise can give us an insight into this.

A mixdown of multiple channels would also require a half-volume decrease (at least) to avoid channel-clipping, which might lead to an odd balance between music and SFX.

In the end, you would certainly need someone with expert coding skills and motivation to work on this. ;)

Sandro 21 April 2015 13:13

Quote:

Originally Posted by Shatterhand (Post 1015796)
I've been thinking about this for a while now.

While I do *love* Amiga games, grown up with them and everything, it really annoys me how many games you have to choose between Sound FX or Music. It's really weird when I came from MSX, a much inferior machine, and basically every game had Music AND SFX, and I am pretty sure that's how it worked on the C64 too.

This really kills the mood of many games.

I've always wondered why coders did this on Amiga games, and I believe mostly would be for the following reasons:

A) Memory constraints. Since music actually may get a fair amount of memory on Amiga (unlike it was on 8 bit systems), the coders would make you choose to either load the music or load the sfx, but both couldn't fit on memory.

B) Use of the sound channels. I guess many musicians didn't bother making music using fewer channels, or maybe even coding the game properly to use just 1 or 2 channels, and leave ther other 2 for music.

Now I see WHDLoad has lots of good patches on games that fixes and add stuff on games (2 button support is really *AWESOME*). I wonder, would it be possible to patch games to add a support to have both music and sfx at the same time?

I don't think Memory Constraints would be a problem anymore, since I guess most people using WHDLoad would have a fair amount of Ram anyway.

And for the use of music channels... I guess that would be the biggest problem, but many games have SFX that "silences" one of the music channels when the SFX plays. While this is also annoying, it's still better to have no music or no sfx at all. I really wouldn't care... I guess games that make you choose between Music or SFX would use all 4 channels for SFX and this could get really messy, with different music channels being silenced for different sound effects... but I still think it would be worth a shot.

Deluxe Galaga did this very smartly, by letting the player choose what channels would be used for music and which ones for sfx... you could still have a very cool soundtrack playing (Even if lacking one or two instruments) while having proper sfx within the game.

So, is any of this doable? There are lots of games that could benefit from it !

fact is most amiga games features music+sfx

the games which you can chose music or sfx are a minority /were done by lame coders which were so lazy could not solve the 4 channels limitation

examples:

zool 1 and 2
lollypop
wonderdog
gods

for these: play the PC or the console version:

Shatterhand 21 April 2015 19:45

I don't want to play on PC or console, I want to play them on my powerful A600 :D

The Killing Game Show, for example, is way better on Amiga than the Mega-Drive version, but the lack of music+sfx is really annoying.

Quote:

Originally Posted by dlfrsilver (Post 1015853)
Good answer, but bad reason.

The 7 voices are only used in the intros and outros. TFMX system use only 4 voices during the game, because having more voices uses too much CPU.

Some games would need 6 voices to get music and effects, and this is something that only 68020 or 68030 could cope with.

And hoping this won't make problems inside the game engine (because everything was made in a certain way from the start).

How come all Huelsbeck's games have in-game music with 4 channels AND SFX without muting channels?

You can play any of those songs in Deliplayer, it clearly shows 4 channels. The intro songs use 6 or 7 channels, while the in-game music always use 4.

And *all* of his games have music + sfx together.

Akira 21 April 2015 19:51

Quote:

Originally Posted by Shatterhand (Post 1015946)
How come all Huelsbeck's games have in-game music with 4 channels AND SFX without muting channels?

Because they probably allow an extra channel for the SFX, depsite what drfsilver says.

Retro-Nerd 21 April 2015 19:51

I assume they share one of the 4 channels for music & sfx together.

dlfrsilver 22 April 2015 02:12

the TFMX system, when using 7 voices, is made of 3 hardware channels used + 3 software channels joined in 1 hardware channel (wikipedia is your friend).

such a feat inside a game running at 50 fps + 32 colors or more + many enemies on screen = crawling down with a regular 68000 CPU. That's why Huelsbeck never used the 7 voices routines inside a game, but only on intros and outros.

When in game, the system use 4 hardware channels (i don't know for the SFX thought),

Quote:

"Because they probably allow an extra channel for the SFX, despite what dlfrsilver says."
I think you "mixing" (ahah ;) ) two things :

1) a number of games cut one channels when an SFX is played
2) there is no extra channel used (in software).

The trick of adding one or more channels is very CPU intensive, meaning a loss of processing power for other effects (game logic, game engine, or graphical effects display).

Shatterhand 22 April 2015 06:57

I am sure SFX doesn't mute any music channels on any Huelsbeck's game.

I am also pretty sure other games do that. Stardust come to mind now. NEarly sure Elfmania does it too.

dlfrsilver 22 April 2015 12:02

Well, some games are using custom drivers, with custom modules. In this case, there is no problem. You have music and SFX.

The problem arise with games that are NOT using such schemes. And those are numerous.

this means changing the way the music operates with SFX, reprogram fully the sound driver, and modify the game engine, which can lead to timing or behavioral problems because of the way it was coded from the start.

It's not as easy as it sounds, it's not like reprograming a coin-op sound processor ROM which operates seperately from the main processor.


All times are GMT +2. The time now is 01:03.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.

Page generated in 0.07531 seconds with 11 queries