the basic MSX soundchip - BASIC "Sound" command

Страница 2/2
1 |

By DamageX

Master (217)

Аватар пользователя DamageX

10-11-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)?

By AuroraMSX

Paragon (1902)

Аватар пользователя AuroraMSX

11-11-2006, 12:04

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 Eek!

By NYYRIKKI

Enlighted (6092)

Аватар пользователя NYYRIKKI

11-11-2006, 17:03

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.

By Udo29

Supporter (4)

Аватар пользователя Udo29

11-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 ! Big smile

By Alex51

Resident (44)

Аватар пользователя Alex51

07-09-2015, 16:32

It's not sloppy.. Its dangerous programming.
Checking SEE3PLAY.ASC source code provided as player...

; Shut up PSG!
PSGOFF: LD A,7
OUT (&HA0),A
LD A,&H3F
OUT (&HA1),A
RET

In this topic mentioned that register7 must be %b10...
Damn!

By Parn

Paladin (854)

Аватар пользователя Parn

08-09-2015, 14:03

The two most significant bits in PSG register 7 define which of its two I/O ports are inputs or outputs. According to the spec, in MSX bit 7 should be 1 and bit 6 should be 0, but to be completely safe you should read register 7 before writing it, not changing the two most significant bits' value.

How do you intend to generate a sinus wave from the PSG, since it only has square wave generators?

Страница 2/2
1 |