WinVICE is a Commodore emulator that lets you run Commodore 64, VIC-20, PET, etc programs on your modern computer. I prefer an older version (2.4) the most as I feel newer versions have too many extra features that I don't require.
I am also interested in Bulletin Board Systems (BBS), and I'd like to set up WinVICE on an older computer and run a Commodore BBS on it. One item has gotten in my way: any versions of WinVICE that I use will not report the presence of a modem carrier tone to the BBS software (DCD). I think this is because of this line of code in the RS232 emulation source:
return rsuser_get_rx_bit() | CTS_IN | (rsuser_baudrate > 2400 ? 0 : DCD_IN);
I believe this is raising the DCD line (Carrier Detect) but only if the baud rate of the connection is over 2400. I prefer to use a baud rate of 300 as that was the speed of my actual Commodore modem back in the 1980's when I ran real Commodore BBSes.
So I found a patched version here:
and all I needed to do is rebuild VICE. That turned out to be the more difficult part. I went through various gyrations, and eventually found the following solution:
The resulting xvic.exe did run (although it came up with an exception error that only happened the first time I ran it - subsequent runs were fine?!). My next task is to test it and see if the DCD line in xvic.exe actually changes when an external connection is made (via tcpser). We'll see!
[UPDATE] Fantastic news! I wrote a quick terminal program in BASIC that allows me to open a modem channel, and then process modem input and keyboard output. Here is a simplified version:
10 OPEN 5,2,0,CHR$(6)+CHR$(0) 20 GETA$:GET#5,B$:PRINTA$;B$;:PRINT#5,A$:GOTO20
My terminal is a bit more sophisticated, and when I press F2 on my keyboard, it outputs all the bits of address 37136 which is the output register for the RS232 port (user port). What I was expecting is that bit 16 would go high (on) when there was no carrier, and go low (off) when there is a carrier (which sounds backwards, but this is how it is supposed to work). Unfortunately, with the stock xvic.exe there were no differences of 37136's value regardless of the connection state. One of the keys for a BBS to work is it has to realize when the user has disconnected. But after patching and building my new xvic.exe, it works! When my remove connection (through tcpser) is down, the value of bit 16 is 1. When the connection is made, it goes to 0! Now, my BBS program can know when someone is connected or not. Fantastic!
My name is Rick Towns and I am an amateur astronomer and computer programmer from Canada. This is a collection of interesting posts I've gathered over the years.