New portio.c module following the virmem.c dispatch-by-address pattern, emulating 8253 PIT channel 2 (speaker frequency), PPI port B (speaker on/off), CGA mode/color select registers, game port (joystick stub), COM1 serial (transmitter-ready stub), and floating bus default (0xFF). OUT/WAIT/MOTOR statements and INP()/STICK()/STRIG() functions now fully functional. Continuous tone generation via PulseAudio pthread worker for programs that drive the speaker through OUT &H43/&H42/&H61.
10 lines
212 B
QBasic
10 lines
212 B
QBasic
10 REM Test speaker via OUT (PIT + PPI)
|
|
20 OUT &H43, &HB6
|
|
30 OUT &H42, &HD3
|
|
40 OUT &H42, &H04
|
|
50 OUT &H61, INP(&H61) OR 3
|
|
60 REM Speaker on briefly
|
|
70 OUT &H61, INP(&H61) AND &HFC
|
|
80 PRINT "SPEAKER OK"
|
|
90 SYSTEM
|