Playing a bell character tone with emulated AY-3-8910

126 views
Skip to first unread message

Alastair Patrick

unread,
Jun 13, 2022, 5:35:27 PM6/13/22
to retro-comp
Hi!

I've made a AY-3-8910 emulator for my Pico-VDP board. It plays tunes with TUNE.COM okay. What I can't figure out is how to make it play a beep for terminal bell characters.

This is what I've done. First I added to STD.ASM:

AYMODE_PVDP    .EQU    5

Then I added this to AY.ASM to point it at my AY-3-8910 IO ports:

#IF (AYMODE == AYMODE_PVDP)
AY_RSEL        .EQU    $B1
AY_RDAT        .EQU    $B0
#ENDIF

I turned it on for CFG_SCZ180.ASM:

AYENABLE        .EQU    TRUE
AYMODE        .EQU    AYMODE_PVDP

With those changes, I hear a tone on boot. So it's using the right IO ports.

I expected that if I executed this command from Microsoft BASIC, it would beep:

PRINT CHR$(7)

Nothing.

I also wasn't sure if my VDA driver VDAWRC entry point might get called with E=7. So I also tried playing a tone there if E=7 but again nothing.

What am I missing? Does my approach to triggering a bell from BASIC actually work?

Al

Wayne Warthen

unread,
Jun 13, 2022, 8:12:05 PM6/13/22
to retro-comp
This should work, but it does not currently due to a deficiency in the ANSI emulation code in RomWBW.  The ANSI emulator does not look for a BELL character at all.  The ANSI emulator could easily look for this character, but it is a little tricky for the ANSI emulator to determine if a sound driver exists and call it.

I can look into this, but I am in the middle of multiple other projects, so it will be a couple weeks before I can get to it.

Thanks,

Wayne

Alastair Patrick

unread,
Jun 13, 2022, 8:32:32 PM6/13/22
to Wayne Warthen, retro-comp
My concern was there might be something more I ought to be doing in the Pico-VDP driver relating to bell characters or that maybe there was a bug in my AY-3-8910 emulator. If the issue is that the feature isn't finished in ANSI terminal yet, I'm not troubled.

Thanks!
Al

Wayne Warthen

unread,
Jun 27, 2022, 6:40:01 PM6/27/22
to retro-comp
On Monday, June 13, 2022 at 5:32:32 PM UTC-7 alastai...@gmail.com wrote:
My concern was there might be something more I ought to be doing in the Pico-VDP driver relating to bell characters or that maybe there was a bug in my AY-3-8910 emulator. If the issue is that the feature isn't finished in ANSI terminal yet, I'm not troubled.

I have implemented a generic beep routine in v3.1.1-pre.177 (dev branch).  This will beep the speaker of the first audio device found in the system.  If there are no audio devices, it is ignored.  The terminal emulation code within RomWBW has been updated to play the beep whenever it sees an ASCII code 7.

Thanks,

Wayne 

Alastair Patrick

unread,
Jun 30, 2022, 5:42:37 PM6/30/22
to retro-comp
Great! I'll give this another shot soon.
Reply all
Reply to author
Forward
0 new messages