Karoshi MSX Community

Desarrollo MSX => Rutinas - Snipets => Mensaje iniciado por: nerlaska en 17 de Julio de 2007, 04:49:52 am



Título: PT3 Player (PSG + SCC) for SDCC
Publicado por: nerlaska en 17 de Julio de 2007, 04:49:52 am
Hello. Here the routines wrotten in ANSI C for SDCC Compiler.
I hope the code could give more info about PT3 player for coders with bad reading of Assembler lines.
This code was created from 0 but using the info of Pascal Sources from VTracker II.


Título: Re: PT3 Player (PSG + SCC) for SDCC
Publicado por: ARTRAG en 17 de Julio de 2007, 12:13:17 pm
Thanks again, few questions about your code.

How do you cope with channel assignment ?
Do you simply clone AY channels to SCC+AY or you have some kind of static assignments (e.g. if SCC is present use SCC for music and PSG for FX)?



Título: Re: PT3 Player (PSG + SCC) for SDCC
Publicado por: nerlaska en 17 de Julio de 2007, 12:17:35 pm
It's free.
In "Monster Hunter" using a keyboard key .. i can enable/disable SCC during gameplay.
You can choose other like: Always ON, Find for SCC and enable if it exists, using a Menu Option, etc.


Título: Re: PT3 Player (PSG + SCC) for SDCC
Publicado por: ARTRAG en 17 de Julio de 2007, 01:24:17 pm
OK, but what about the way it works?
I mean, how do you manage the channels ?

I understand that pt3 has 3 tracks only, FX have 1 track only,
while
PSG has 3 channels and SCC has 5 channels.

How do you map tracks on channels when scc is present ?
How do you map tracks on channels when there is psg only ?

Do you select the track that has each time has the loudest volume ?
Do you use some kind of priorities ?

Do you do some kind of "cloning" when the number of channels exceed the number of tracks (in order to enrich the sound) ?

(When SCC is present you have 3+1=4 tracks against 5+3=8 channels, so in theory you could adopt a static assignment 1:2, what do you do actually ?)





Título: Re: PT3 Player (PSG + SCC) for SDCC
Publicado por: nerlaska en 17 de Julio de 2007, 02:17:52 pm
Ah, ok :)

By default (but is configurable)
SCC1,2,3 plays PSG1,2,3
AFX plays over PSG3 overlapping.

In this way i play the music of MonsterHunter and i think the result is good.



Título: Re: PT3 Player (PSG + SCC) for SDCC
Publicado por: ARTRAG en 18 de Julio de 2007, 01:25:01 pm
AFAI understand Shiru's player should have some sort of priorities,
based on the time you have been playing a sound and on the relative volumes.
(e.g. : play the 3 loudest channels at each time out of 4 tracks, or
play : always the newest sound and skip the oldest).


Título: Re: PT3 Player (PSG + SCC) for SDCC
Publicado por: nerlaska en 18 de Julio de 2007, 04:41:29 pm
Well. In my case, musician prepare the songs for avoiding the 3rd channel if it will be necessary.
Furthermore, there are only a sort number of FX in the game, is not like a Shooter ..may be in this case you need something more elaborated.