Autor
| Simple idea to integrate PT3 music player and SEE sound fx player
|
marison msx lover Mensajes: 98 | Publicado: Mayo 25 2005, 01:49   |
What about a simple method to convert both players that I will describe below:
- Change the PT3 player to write PSG register values to RAM.
- Change the SEE player to write PSG register values to RAM.
- If the priority of sound FX over music is bigger, just call SEE after PT3 and vice-versa.
- Writes the values from RAM to PSG
Or
- Each player writes PSG register values to RAM in a different address.
- Writes the values from RAM to PSG according the priority.
This way we could change only a little both codes and create few lines to support and complement them.
What do you think about these ideas?
Is there other better ways?
Will be much more slow that only use 2 channels to music and 1 channel to sound FX?
|
|
Vincent van Dam msx addict Mensajes: 382 | Publicado: Mayo 25 2005, 09:08   |
I think it's a great idea! However there are a few pitfalls you might want to be aware of; the noise register 6 and the envelope registers (11,12 & 13) are shared over all three channels. I assume you want to make the SFX values leading, but it will affect how the music will sound. Register 7 is also a special case; but that can be solved with a simple mask I guess.
|
|
ro msx guru Mensajes: 2347 | Publicado: Mayo 25 2005, 10:27   |
It might work, both replayers have to use the same schema tho...
- Store PSG reg data in a buffer (first PT3 then SEE for SFX prio above PT3)
- one general routine that just pumps the data into PSG
quite simple actually... that is if both routines update their stream every interrupt. (see does, I quess PT3 does that too mostly)
|
|
marison msx lover Mensajes: 98 | Publicado: Mayo 25 2005, 13:08   |
Quote:
| However there are a few pitfalls you might want to be aware of; the noise register 6 and the envelope registers (11,12 & 13) are shared over all three channels. I assume you want to make the SFX values leading, but it will affect how the music will sound. Register 7 is also a special case; but that can be solved with a simple mask I guess.
|
Noise is often (or always) used for percussion in music and for explosions (what come to my mind) in sound fx. Thinking about it, I always guess ideal that the sound fx and percussion come in the same channel.
Speaking of envelopes, from yours memory, there are much PT3 music that use them? I think the fact that is not possible determine a maximum and minimum values for the volume is a constraint although changes in volume in each interruption could be other constraint.
Do you agree? |
|
ro msx guru Mensajes: 2347 | Publicado: Mayo 25 2005, 13:14   |
yes, hardware envelopes are used to create soundwaves (those typical instruments with a phase effect noise)
however in SEE I have NEVER used them before, so you could savely say that SEE doensn't have to use that reg. the noisechannel however is big prio on SFX!
|
|
marison msx lover Mensajes: 98 | Publicado: Mayo 25 2005, 13:51   |
Ok.
- Hardware envelopes registers are always writes from the PT3 values.
- The percussion music channel is always off when a sound was playing, i.e, the noise registers values is totally based on the SEE when a sound fx is playing.
|
|
dioniso msx freak Mensajes: 139 | Publicado: Mayo 25 2005, 13:57   |
Yes, envelopes are almost always used in PT3 songs. Just a very few songs don't use it.
It's true that noise is mainly used for percussion but it's also used with just tone and/or envelope for playing music. If you want to play a drum and a sample with envelopes in the same channel you have to use tone, noise and envelope in just one channel.
For SFX everything can be used. For instance, in Magical Stones I use noise and envelope for the "explosion" of the stones. About register 7, I have to mask it if music (when you pass a level) is playing (just read R7, mask it and write it).
Good luck with it! It's interesting. The only negative thing that I see is that the player is already "slow" if you want to use it in a game, and adding a routine for SEE SFXs will not help ...
Regards,
Alfonso.
|
|
marison msx lover Mensajes: 98 | Publicado: Mayo 25 2005, 16:04   |
Quote:
| The only negative thing that I see is that the player is already "slow" if you want to use it in a game, and adding a routine for SEE SFXs will not help ...
|
If I can get the PSG registers and around 700 bytes (max) to VRAM writed during VBlank, will be sufficient to my needs. |
|
ARTRAG msx master Mensajes: 1747 | Publicado: Mayo 25 2005, 16:20   |
@marison
Let me guess:
max 768 bytes less an infobar...
;-)
|
|
marison msx lover Mensajes: 98 | Publicado: Mayo 25 2005, 16:25   |
Almost correct. My infobar is lateral. The game action screen utilize 576 bytes (24 x 24 tiles).
Other bytes are some in infobar (not always, only when changed) and 128 bytes of sprites attributes.
|
|
ARTRAG msx master Mensajes: 1747 | Publicado: Mayo 25 2005, 16:29   |
Do you work in scr4 ?
Have you seen TotalParody and my scroll & sprite routines in scr5 ?
|
|
marison msx lover Mensajes: 98 | Publicado: Mayo 25 2005, 18:26   |
I work in screen 2. My project is for the MSXdev05. Maybe I will use Screen 4 if MSX2 or higher is detected, only for have 8 sprites in a line. I will use this if write 16 bytes of color per sprite don't affect the speed too much.
|
|
marison msx lover Mensajes: 98 | Publicado: Mayo 25 2005, 21:19   |
Quote:
| scroll & sprite routines in scr5 ?
|
I just finished to test your demos now. I confess that I don't know that was possible to running such a scroll, in a game, in screen 5. Good!
The devpack don't worked to me, I guess. |
|
ARTRAG msx master Mensajes: 1747 | Publicado: Mayo 26 2005, 01:04   |
I am unable to send you my new devpack,
your email sends back any attach.
Do you want my code? Now I have parallax and full framerate :-)
|
|
marison msx lover Mensajes: 98 | Publicado: Mayo 26 2005, 01:50   |
Wow! You say 60/50 Hz?
Send to me in marisonparreiras@ig.com.br. Gmail is useful and almost perfect, but have this and some others issues.
Thanks, again! |
|
|
|
|