RAW PSG Programming?

By First Spear

Supporter (10)

First Spear's picture

11-09-2015, 22:29

Hey all. I am very new to the MSX, and am excited to learn about this system. Very cool stuff!

One of the things I am most interested in is learning how to make sound effects with/on the stock AY-3-8910 sound chip, programming the PSG "raw". I would like to use BASIC to make simple calls to the chip. Can anyone share starter links/resources to do that?

I am currently running OpenMSX on a Windows PC, still shopping for real hardware.

Thanks!

Login or register to post comments

By ARTRAG

Enlighted (6935)

ARTRAG's picture

12-09-2015, 08:13

Hi
In basic using the sole sound command it is hard to get something decent.
The best solution is to use a replayer on the ISR able to update the psg regester at each interrupt.
In this latter case look for aysfx edit or for SEE on the forum. Their players can be called from basic using USR()
They come with sfx editors for windows and there are quite a lot of free sfx already on the net.

If you want to use basic only, you could try to use on interval gosub and code your own ISR that loads the psg registers using the sound comand, It would be possible but not very efficient.

By ARTRAG

Enlighted (6935)

ARTRAG's picture

12-09-2015, 11:37

Btw the command

Sound n,x

Allow to write the value of x in register n of the ay8910

By Lord_Zett

Paladin (807)

Lord_Zett's picture

12-09-2015, 16:13

play"CDE"

By Manuel

Ascended (19467)

Manuel's picture

12-09-2015, 21:41

Yes, what you are asking for is exactly what the SOUND instruction in MSX-BASIC provides: directly programming the PSG sound registers.

By First Spear

Supporter (10)

First Spear's picture

04-10-2015, 18:53

Can you point me to any repositories of BASIC songs that use the sound command?

Thanks.

Manuel wrote:

Yes, what you are asking for is exactly what the SOUND instruction in MSX-BASIC provides: directly programming the PSG sound registers.

By Lord_Zett

Paladin (807)

Lord_Zett's picture

04-10-2015, 19:31

really?

By Manuel

Ascended (19467)

Manuel's picture

04-10-2015, 20:13

No one ever created songs with the SOUND command, as far as I know. It is only used for sound effects. Try almost any game in MSX-BASIC.

(Music in MSX-BASIC is usually done with the PLAY command as Lord_Zett wrote.)