the basic MSX soundchip - BASIC "Sound" command (Development Foros MSX)MSX Resource Center MSX Info Update - Finnish MSX madness at its best           
                       
English Nederlands Español Português Russian                  
 Noticias
   Página principal
  Almacén de noticias
  Temas de noticias

 Recursos
   Foros MSX
  Artículos
  Analisis
  Informe de ferias/RUs
  Álbum de fotos
  Ferias y encuentros
  Encuestas
  Enlaces
  Buscar

 Software
   Descargas
  Tienda Online

 MRC
   Quiénes somos
  Únete a nuestro equipo
  Donar
  Políticas
  Contacta con nosotros
  Enlázanos
  Estadísticas

 Buscar
 
  

  

 Login
 

Login

Contraseña




¿Aún no tienes una cuenta? ¡Conviértete en miembro del MSX Resource Center! ¡Únete a nosotros!.


 Estadísticas
 

Hay 128 invitados y 3 miembros en línea

Eres un usuario anónimo.
 

Foros MSX


Foros MSX

Development - the basic MSX soundchip - BASIC "Sound" command

Autor

the basic MSX soundchip - BASIC "Sound" command

Udo29
msx friend
Mensajes: 4
Publicado: Noviembre 05 2006, 11:30   
Hi all,

i'm one of the thirty-something guys who used to have an MSX-1 (Sony with 16k)
and even then I was already very interested in the sound-command.
Unfortunately after 20 years I forgot all of it and i don't have the machine nor
the books anymore.

I used to have a program on tape from a zine, this program showed a screenfull
of parameters to tweak for the soundchip. it was like playing with an analogue synthesizer , only without the keys

Does anyone have a good guide on the Sound command (NOT using the special
sound cards like SCC or MSX Audio)
When I try to use it i mostly get "illegal function call"s.

I tried "googling" it but it's a dead end. most of it is related to the soundcard extentions.
or in Assembly and not comprehensive enough.

Thanks!


AuroraMSX

msx master
Mensajes: 1248
Publicado: Noviembre 05 2006, 12:04   
The SOUND command directly sets a value into a PSG register.
Basic syntax for the SOUND command is
SOUND <register>,<value>

Where <register> is in the range of 0 upto 15 and <value> is in the range of 0 upto 255.
The Wikipedia page for the PSG contins a lot of links to resources for your reading pleasure.
Happy MSX-ing!

(sorry, /me too lazy to write a complete PSG tutorial right now )
Udo29
msx friend
Mensajes: 4
Publicado: Noviembre 05 2006, 12:08   
Thanks! this is one step closer, i'll just have to pick my own technical brain and
see what I can come up with.

cheers!
pitpan
msx master
Mensajes: 1379
Publicado: Noviembre 05 2006, 12:10   
Get the PSG doc at http://www.robsy.net/ay38910.pdf or check the PSG part of the excellent MSX Red Book, that you can grab at http://www.robsy.net/tredbook.txt

Of course, I'm afraid it is not very straightforward.
Edwin
msx professional
Mensajes: 620
Publicado: Noviembre 05 2006, 12:22   
You can also download SEE (from here). It's basically a front-end to the PSG registers with a few extra commands. Useful to help get a feel for it.
djh1697
msx professional
Mensajes: 549
Publicado: Noviembre 05 2006, 19:56   
The play command is really easy to use.
Play "abc" will do just that!
Udo29
msx friend
Mensajes: 4
Publicado: Noviembre 10 2006, 18:31   
Edwin, the SEE program doesn't seem to work on BlueMSX, i get a good logo but the tekst display
is scrambled. trying to tweak the settings of BlueMSX but no luck.

Anyway, for the moment i'm looking for assembly code to make a sinus wave, then gimme 2 more years to make a synth with LFO and arpegiator

thanks all again for the information. hope to come back soon with some more "geekyfreaky" questions...


mars2000you
msx master
Mensajes: 1723
Publicado: Noviembre 10 2006, 18:39   
wolf_

msx legend
Mensajes: 4707
Publicado: Noviembre 10 2006, 18:39   
Try to find another version, iirc one of the SEE versions was made on a sunday-morning after Ro tried to break the national boozing-record..

[edit] arf ^_^
Edwin
msx professional
Mensajes: 620
Publicado: Noviembre 10 2006, 20:56   
SEE is a bit tricky. You have to start it from 80 column mode, otherwise the screen gets messed up.
AuroraMSX

msx master
Mensajes: 1248
Publicado: Noviembre 10 2006, 21:03   
That's not "a bit tricky", that's sloppy programming
DamageX
msx freak
Mensajes: 168
Publicado: Noviembre 10 2006, 22:23   
isn't there a PSG register bit you're not supposed to change? does the SOUND command have a safeguard for that (I hope)?
AuroraMSX

msx master
Mensajes: 1248
Publicado: Noviembre 11 2006, 12:04   
Quote:

isn't there a PSG register bit you're not supposed to change? does the SOUND command have a safeguard for that (I hope)?


Register 14 and 15 are better left untouched. These two registers control the joystick ports.
The two most significant bits of register 7 should always be 10 (so reg 7 has a value of 10xx xxxx).
The two bits of reg 7 specify how the registers 14 and 15 are used.

SOUND 14,x or SOUND 15,x gives an illegal function call, but there's no safegueard against putting wrong values into register 7.
And apparently it is possible to damage hardware when writing values other than 10xx xxxx to register 7
NYYRIKKI
msx master
Mensajes: 1509
Publicado: Noviembre 11 2006, 17:03   
Quote:

isn't there a PSG register bit you're not supposed to change? does the SOUND command have a safeguard for that (I hope)?



You mean two most high bits of register 7. They should always be %10. When using sound command, these bits will be set automatically to %10.

Udo29
msx friend
Mensajes: 4
Publicado: Noviembre 11 2006, 20:30   
Yes , i read that part about the register mandatory settings.
but after reviewing the specs I think my biggest concern is adding modulation to the tuning...
every time the value changes, the adsr will be retriggered i think and that's not what i need...
i'll have to test it out....


Another thing, are there any binary files available with pre-calculated sinus-values
to create an LFO ? (low freq osc)

Creating a math routine is just ridiculous...what was i thinking !



 
 







(c) 1994 - 2008 Fundación MSX Resource Center. MSX es una marca registrada de MSX Licensing Corporation