Vic 20 user port at no more than 1200 baud?

Modding and Technical Issues

Moderator: Moderators

User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

srowe wrote: Fri Apr 30, 2021 8:09 am Here's a version that loads at $0400, you'll need to SYS1033 to start it.
I'm sorry, the VIC-20 freezes when I do SYS1033

Looking at a disassembly:

d 0409
.C:0409 20 8D FD JSR $FD8D
.C:040c 20 52 FD JSR $FD52
.C:040f 20 1C 04 JSR $041C
.C:0412 20 F9 FD JSR $FDF9
.C:0415 20 18 E5 JSR $E518
.C:0418 58 CLI
.C:0419 6C 00 C0 JMP ($C000)
.C:041c AD 1B 03 LDA $031B
.C:041f C9 04 CMP #$04
.C:0421 F0 18 BEQ $043B
.C:0423 AD 1A 03 LDA $031A
.C:0426 8D FC 03 STA $03FC
.C:0429 AD 1B 03 LDA $031B
.C:042c 8D FD 03 STA $03FD
.C:042f AD 18 03 LDA $0318

^ are the JSR routines at the beginning for starting up a cartridge?

I think SYS 1052 might work. I'll let you know how it goes.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

(SYS 1052 worked by the way). So I tried this with VICTERM 40 and I can't get the RS232 fix to work with that. It appears that it only works with Plus Term--which is a BASIC program. So for whatever reason, the ML terminal programs (VICTERM and Mighty Term) do not work with it.

I'll proceed to use a dumb terminal with SCREEN 40 and see if that works.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
srowe
Vic 20 Scientist
Posts: 1443
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 user port at no more than 1200 baud?

Post by srowe »

Doh, not SYS1033 is going to wipe the RAM! Try SYS1036
User avatar
srowe
Vic 20 Scientist
Posts: 1443
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 user port at no more than 1200 baud?

Post by srowe »

Ghislain wrote: Fri Apr 30, 2021 9:15 am So I tried this with VICTERM 40 and I can't get the RS232 fix to work with that. It appears that it only works with Plus Term--which is a BASIC program. So for whatever reason, the ML terminal programs (VICTERM and Mighty Term) do not work with it.
It will depend how they call into the KERNAL. If they sidestep the vectors then they won't work.
User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

I was able to get the wedge to work with Mighty Term. Basically I used the VICE emulator's monitor to hunt for every occurrence of "CMP #$0D" until I could find the part of the program that enters terminal mode (after you press the RETURN key). Thankfully, the great Craig Bruce had padded the code with several NOPs around this part of the program, and I was able to "wedge in" (pun intended) a "JSR to RS232-fix" every time you enter terminal mode.

jaja.jpg

It now works! In the meantime, I will remove all instances of the program exiting to "NON-SUPPORTED OPTION" as well. I also notice that Mighty Term positions the screen for NTSC -- I might provide a fix for that for our PAL friends. I'll also look into modifying VICTERM 40 so that it will support the RS232 fix as well. Once I'm finished, I'll upload my work here.

Thank you @srowe for providing this great feature for the VIC-20--which I just found out about yesterday. I'm sorry I have been rather detached from all of the great things that this community has been doing--I was in the middle of my own VIC-20 project for the past few years. I've finally let go of it a few weeks ago and I'm happy to be back exploring other aspects of this great machine as a user and occasional tinkerer.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
srowe
Vic 20 Scientist
Posts: 1443
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 user port at no more than 1200 baud?

Post by srowe »

This wedge was my first step into understanding the VIC RS-232 code. I actually did a more radical rewrite

http://www.sleepingelephant.com/ipw-web ... 75#p100411

which tried to make it more usable. I can spin you a copy relocated at $0400 if you want.
User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

srowe wrote: Fri Apr 30, 2021 10:53 am This wedge was my first step into understanding the VIC RS-232 code. I actually did a more radical rewrite

http://www.sleepingelephant.com/ipw-web ... 75#p100411

which tried to make it more usable. I can spin you a copy relocated at $0400 if you want.
I won't say no of course to a better version--thank you for this. Thinking it over, perhaps it should go to $B000--just so that it becomes compatible with more memory expansion options. When I make the modified terminal programs available, I will likely provide a disk image with multiple terminal options (Mighty Term, VICTERM and Plus Term).

I've changed the text menus for Mighty Term, most notably the prompt that reads "Good day, Craig." (which is replaced with more user-friendly instructions on how to use the program). Now, I'm not excising Mr. Bruce's name completely -- I'm moving it to the Configuration menu screen. I'm also designating this upgrade as version number 1.24.00 -- to signify that 2400 baud will be supported.

realms1.jpg

realms2.jpg
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
srowe
Vic 20 Scientist
Posts: 1443
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 user port at no more than 1200 baud?

Post by srowe »

Would be interested how you get on with this version
rs-232-rewrite-b000.zip
(11.51 KiB) Downloaded 144 times
It only supports 8 data bits, 1 stop bit, no parity.

Load it with SYS45071.
User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

realms3.jpg

I made a disk image that contains VIC-20 terminal programs that will work with srowe's rs232 fix at 2400 baud. Most notably, the versions of Mighty Term and VICTERM have been modified to enable the fix if you choose options 2 and 6 from the menu (I had to JSR to the rs232 fix when the terminal option is chosen from these programs).

Plus/Term and Ninjaterm already work with the fix without any modification.

Other notable enhancements to Mighty Term and VICTERM that I did is that the screen positions will be adjusted if you're using the PAL version of the VIC-20.

I also fixed Mighty Term so that it will not exit to the "NON-SUPPORTED OPTION" message if you press CRSR-DOWN from the main menu or try to access other menus. I basically disabled all of the possible exits so that you don't inadvertently exit out of Mighty Term.

I also included versions of MIghty Term and VICTERM that do not implement the fix.

Memory requirements: 8K at $2000 for Mighty Term, 24K at $2000 for Ninja Term, 16K at $2000 for Plus/Term and 8K at $A000 for VICTERM. The RS232 fix will be loaded at $0400, so you will need 3K of expansion memory placed there. Unfortunately, I was not able to get srowe's build of his fix that is located at memory location $B000 to work.
Attachments
term2400.rar
(19.53 KiB) Downloaded 135 times
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
srowe
Vic 20 Scientist
Posts: 1443
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 user port at no more than 1200 baud?

Post by srowe »

Ghislain wrote: Sat May 08, 2021 10:55 am Unfortunately, I was not able to get srowe's build of his fix that is located at memory location $B000 to work.
Did this not work at all for you?
User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

srowe wrote: Sat May 08, 2021 12:20 pm Did this not work at all for you?
If I SYS 45071, it brings me back to the startup screen:

**** cbm basic v2 ****
28159 bytes free
ready.

This works fine if I run this manually--but only with PLUS/TERM and NINJATERM. Is there an SYS or JSR entry point that will not reset the VIC-20 to the startup screen? I would need this so that I can have Mighty Term and VICTERM make a JSR call to your fix so that it can work with those programs as well.

Anyway, thank for you for creating this routine because doubling the baud rate is certainly very useful for the VIC-20.
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
srowe
Vic 20 Scientist
Posts: 1443
Joined: Mon Jun 16, 2014 3:19 pm

Re: Vic 20 user port at no more than 1200 baud?

Post by srowe »

Ghislain wrote: Sun May 09, 2021 1:29 am Is there an SYS or JSR entry point that will not reset the VIC-20 to the startup screen? I would need this so that I can have Mighty Term and VICTERM make a JSR call to your fix so that it can work with those programs as well.
Try $B031 (SYS45105), that just patches the vectors.
User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

srowe wrote: Sun May 09, 2021 3:42 amTry $B031 (SYS45105), that just patches the vectors.
Thank you for this. I've created a D64 image that integrates your build of the fix that is located at $B000.
Attachments
term0400-b000.rar
(39.15 KiB) Downloaded 133 times
"A slave is one who waits for someone to come and free him." -- Ezra Pound
User avatar
beamrider
Vic 20 Scientist
Posts: 1456
Joined: Sun Oct 17, 2010 2:28 pm
Location: UK

Re: Vic 20 user port at no more than 1200 baud?

Post by beamrider »

Good work chaps.

Any recommendations of boards to connect to?
User avatar
Ghislain
Realms of Quest
Posts: 1283
Joined: Sun Aug 08, 2004 12:54 am

Re: Vic 20 user port at no more than 1200 baud?

Post by Ghislain »

beamrider wrote: Tue May 11, 2021 1:28 am Good work chaps.

Any recommendations of boards to connect to?
I find Mighty Term to be the most useful terminal program for the VIC-20. It's quite versatile, and it works very well at displaying Commodore graphics in 40 columns (albeit in a single color). And there is also a simulated 80 column mode where you can toggle 40 columns at a time with a keypress.

I use these BBSes the most on the VIC-20:

particlesbbs.dyndns.org:6400 (Commodore BBS)
telehack.com:23 (Simple shell - works on VIC-20)
realitycheckbbs.org:23 (Synchronet BBS)

You can also find a comprehensive list of BBSes here:

http://cbbsoutpost.servebbs.com/ (for Commodore boards)
https://www.telnetbbsguide.com/bbs/list/detail/ (for normal 80 column BBSes)
"A slave is one who waits for someone to come and free him." -- Ezra Pound
Post Reply