Use the PSG
From F256 Foenix
The PSG is inside the FPGA of the F256Jr, F256K, F256Jr2 and F256K2
The F256 machines have a dual PSG based on the SN76489 inside the Beatrix FPGA which generate 3 tones of square wave
and one noise generator each.
Register Name | Address | Description |
---|---|---|
PSG_LEFT | 0xD600 | Send all formatted commands here to the left PSG |
PSG_RIGHT | 0xD610 | Send all formatted commands here to the right PSG |
PSG_COMBINED_LEFT_RIGHT | 0xD608 | Send all formatted commands here to both PSG |
SYS1 | 0xD6A1 | System Ctrl reg: bit2 sets PSG_ST = psg status. if 0, left and right are mixed to monaural output. if 1, left and right are normal stereo |
Command Formats
Example: To produce a 440 Hz A on Tone 1, send these bytes to address 0xD600 (left PSG) 0b1001 0100 (middle volume "attenuation" command) 0b1000 1101 (low byte of the note) 0b0000 1111 (high byte of the note)
to stop the sound, send to 0xD600: 0b1001 1111 (max attenuation closes off the sound)