Psycho World PSG noise trick

بواسطة JohnHassink

Ambassador (5606)

صورة JohnHassink

25-08-2014, 02:21

The PSG versions of the Psycho World music are always built like this (only exception being the titlescreen tune):

channel 1: melody
channel 2: accompaniment + noise (percussion)
channel 3: bassline

Today, I noticed again that the accompaniment (in channel 2) always goes its merry way volume-wise, while the 'noise track' on the same channel seems to be running completely independent. How this works concerning noise frequency I get, but what really puzzles me is the discrepancy between actual tone events and - especially - noise volume.
If you want to hear this really clear, check out for instance channel 2 of the ending theme.

I'm pretty much in the dark as to how on earth this could be done, since as far as I know, none of the 14 PSG registers can actually hold a value for independent noise volumes, and I know no better than noise volume (let alone noise event presence) being directly linked to an actual 'note' being played on a channel.

Does anyone have any thoughts on this? I'm thinking the answer may be in registers 6 and/or 7.

Login أوregister لوضع تعليقاتك


Enlighted (5940)


25-08-2014, 09:42

I don't know this case, but indeed noise does not have it's own volume. It can use volume of any of the sound channels (or even all, volumes are summed up) by adjusting reg 7 bits 3-5. If you hear that there is own volume for noise, it can be that there is some other channel volume used. In case there is no sound on that channel you can disable the actual voice by using reg 7 bits 0-2 or by setting the frequency of the voice to 0.

بواسطة hap

Paragon (2041)

صورة hap

25-08-2014, 13:15

Psycho World composer is tricking JohnHassink, not the PSG Smile

بواسطة Grauw

Ascended (10617)

صورة Grauw

25-08-2014, 13:20

What is this magic!

بواسطة slumpmax

Rookie (26)

صورة slumpmax

25-08-2014, 14:55

I checked the code to play music of Psycho World and recode it twenty years ago.
I do not remember clearly, but Psycho World had its own sound simulator routine.
It used to change a sound volume frequently to simulate many of fantastic melody
similar to the simulation of speech.
It's used vertical sync interrupt to do this.

بواسطة JohnHassink

Ambassador (5606)

صورة JohnHassink

25-08-2014, 23:47

@ NYYRIKKI: That's the thing, the other two channels are constantly doing their own stuff as well.

@ hap: Probably a better way of putting it, yes. But the main point is: how? Smile

@ Grauw:

@ slumpmax: Interesting! Have you documented your findings?

بواسطة slumpmax

Rookie (26)

صورة slumpmax

26-08-2014, 08:58

PSGSUB.BIN file have routine start at location 1D00H

1D00 jp 214FH
1D03 jp 1D12H
1D06 jp 2031H
1D09 jp 1D62H
1D0C jp 2142H
1D0F jp 1F3DH

بواسطة hit9918

Prophet (2925)

صورة hit9918

26-08-2014, 13:44

topic "volume priority sheduler".

When you listen to the radio.
The trick is that the radio needs no PSG channels the moment you crash into the truck Big smile
The crash can steal PSG channels but the ear can't tell that the radio is missing.
When the dust settles, oh, the radio is still running.

Same works when a drum spikes thru something else.

A demo where I used 4 channels:
3 things are going, but one is a string instrument that needs combining two channels, so 4 channels are needed.

"the virtual AY".
the player calculates more than 3 channels in memory. like they all were full channels with own ADSR.
then sort by volume and the top 3 make it to the PSG.
I guess games made some shortcuts, but most powerful is a generic method.

One could have the feature that same tune, "same binary", runs on a double PSG config in full channels.
While in zero development time you always got something for the base config.
But dont forget that the base config already runs better than ordinary PSG.

The AY is the sheduling master.
All state can be changed completely at interrupt rate, SCC SID OPL can't do this.
Further the AY got a lot more cpu time.
Because neither does it need slow writing like SCC, nor does it sit in a computer with low cpu like a SID.

Something needs to be done when more than 1 channel want to use the envelope or the noise.
The highest priority user does dictate the envelope rate or noise rate.
Then one can have two policies:
#1 the lesser channel blindly plays with false parameters
#2 the lesser channel plays only if it has same parameters, else it is skipped and someone else gets the PSG.

I guess method 1 is prefered for noise while method 2 is for envelope.
A bit in the virtual channel could select the two methods.

Each virtual channel got noise frequency and envelope mode and envelope frequency.
I.e. each one has full feature and then we gonna see who makes it to the PSG.
And each one has a register 7 with the bit positions like channel A (this one for algorithm ease to compile PSG register 7).

A game could do crazy things like add 3 virtual channels for bats.
Then sort 20 bats by volume. Their volume goes by how close they are to the player.
The near bats scream into your ear, you cant hear the other dozen.
And when they are very near, can't hear the ambient music.
Then the game has music plus 20 bats :)

Without music, the AY could have scary subtle whistle far away.
And suddenly a loud monster jumps out of the bush.
The exponential volume makes a huge range and things far away still got good ADSR.
And it goes without multiplying the ADSR samples, just simply add the volume value.