Thanks for the quick responses and suggestions. I have reset the IO address back to the default 0x32.
I have made the change to the ay38910.asm file. The changes need to go in the #AYMODE area as per the mode chosen in the the config file which in my case is RCZ80.
#IF (AYMODE == AYMODE_RCZ80)
;AY_RSEL .EQU $D8
;AY_RDAT .EQU $D0
;AY_RIN .EQU AY_RSEL+AY_RCSND
AY_RSEL .EQU $32
AY_RDAT .EQU $33
AY_RIN .EQU AY_RSEL
#ENDIF
My config file has:
AY38910ENABLE .SET TRUE ; AY: AY-3-8910 / YM2149 SOUND DRIVER
AY_CLK .SET CPUOSC / 4 ; DEFAULT TO CPUOSC / 4
AYMODE .SET AYMODE_RCZ80 ; AY: DRIVER MODE: AYMODE_[SCG/N8/RCZ80/RCZ180]
Processor clock has been set back to 7.372MHz and the boot message says:
RomWBW HBIOS v3.1.1-pre.101, 2021-08-14
RC2014 Z80 @ 7.372MHz
0 MEM W/S, 1 I/O W/S, INT MODE 1, Z2 MMU
512KB ROM, 512KB RAM
ROM VERIFY: 00 00 00 00 PASS
AY: IO=0x32 NOT PRESENT
So I have correctly changed the IO address but it is still not being recognised.
I have changed the IO addresses on the card and have been using the following sample BASIC program to check my IO address settings are working.
1 REM Output ascending and descending "siren" using all three channels
2 REM Addresses 0x32 (data) and 0x33 (register) = 50, 51 decimal:
3 REM Mixer value for A+B+C Tone, no Noise, IO as OUT = 248 decimal/0xFE hex
10 R=51
20 D=50
30 OUT R, 7
40 OUT D,248
41 OUT R, 8
42 OUT D, 15
43 OUT R, 9
44 OUT D, 15
45 OUT R, 10
46 OUT D, 15
50 FOR N = 32 TO 250
55 M = 251 - N
56 O = ABS(M-N)
60 OUT R, 0
61 OUT D, N
62 OUT R, 2
63 OUT D, M
64 OUT R, 4
65 OUT D, O
70 GOSUB 200
80 NEXT
90 GOTO 50
200 FOR X=1 TO 64
210 NEXT
220 RETURN
When running the BASIC program, I get the stereo siren sound all ok. BTW, the only difference between 7, 14 and 20MHz clock speeds is how fast the siren ramps up and down. The sounds pitch remains the same.
My test system is a Frankenstein of various parts. From left to right it is an SC109 back-plane plugged in to an SC112 back-plane.
The cards from left to right are:
Z50Bus - Empty
Z50Bus - LiNC sound card
RC80 - MG001 7 seg display module
RC80 - Rotten Snow missing link module (serial and CF)
RC80 - SC129 Digital IO
--------
RC80 - SC137 I2C bus master (for LCD)
RC80 - Rotten Snow RAM/ROM module
RC80 - Empty
RC80 - Dtronixs Z80 CPU module
RC80 - Empty
RC80 - Empty
*Note: The photo has the original IO settings on the LiNC sound card. They are now set to:
A7 - Off
A6 - Off
A5 - On
A4 - On
A3 - Off
A2 - Off
A1 - On
A0 - Off
The system is powered from a high power USB hub that has dedicated 2.1A power only outlets. When I first started experimenting with different clock speeds, I had no end of problems due to powering via the 5V from the FTDI adapter which I soon learnt was a BAD idea!
The board with the LED's in the background is a little comms breakout board in made up which enables at a glance to see whats happening on the coms port and has a jumper for easy enable/disable 5V to the system. Gotta have blinkenlights. ;)
If anyone wants the STL files for the SC109 and SC112 back-plane bases to 3D print their own, let me know.