Page 1 of 4

Release: CBC News App (RSS Reader)

Posted: Tue Dec 13, 2016 3:34 pm
by Bobbi
VIC-20 RSS Reader

Hardware Requirements

- VIC-20 + 32K expansion
- User-port modem
- Some way to load the program (disk, tape, SD2IEC)

I developed and tested this code using the WiModem from cbmstuff.com (Jim Drew). It should also work with other Internet modems that are able to 'dial' URLs using the following syntax:

Code: Select all

ATDT www.cbc.ca:80
I use an SD2IEC type drive, but as long as you can load the executable the type of drive is unimportant.

Modem Setup

Be sure to set your modem for 300 baud operation. Usually this is done using the following Hayes commands in a terminal program:

Code: Select all

 
 AT*B300
 AT&W
The second command saves the settings - you may decide not to do this, but it makes power cycling the system much more convenient when you do not have to keep resetting the baud rate.

How to Run

Run RSS.PRG as follows:

Code: Select all

LOAD"RSS.PRG",8
RUN
Main menu
Main menu
You can select one of four CBC news RSS feeds using the function keys. The RSS reader will then 'dial' the website and make an HTTP request for the XML page containing the RSS news feed.
Initial loading of data
Initial loading of data
If all is well, the screen will clear, then you should see a row of dots followed by the text:
HTTP/1.1 200 OK
and then a few more lines of response from the web server. The RSS reader shows you the first 100 characters of response in order to help debug broken connections. After four lines or so, the RSS reader will stop echoing the output and will begin parsing the data stream (which is assumed to be the XML document containing the RSS data.) As the code parses the input it shows a simple spinner. A horizontal blue bar is shown when a new story tag is encountered. After 30 seconds or so, the first story will be displayed, and then parsing will continue for the following stories in the feed.
Formatted article
Formatted article
Problems?

If there are problems with your setup you may be able to diagnose them with the aid of the first 100 characters of output displayed above. Additionally, the display or LED on your modem can help you determine if a connection was successfully established or not.

This code is very much of alpha quality and has some known bugs. It often crashes or displays corrupt output. In particular some UTF-8 characters in the RSS feed can mess up the screen. Don't trust your life or your livelihood to it!
WiModem
WiModem

Re: Release: CBC News App (RSS Reader)

Posted: Tue Dec 13, 2016 7:45 pm
by akator
Super cool. Now I have to add one of those WiModems to my wish list so I can use this :D

Re: Release: CBC News App (RSS Reader)

Posted: Wed Dec 14, 2016 6:18 am
by beamrider
Magnificent.. will give it a try this weekend.

Re: Release: CBC News App (RSS Reader)

Posted: Sat Dec 17, 2016 2:13 pm
by Bobbi
I am curious to know if anyone gave this a try?

I am still investigating what I have to do to make it more reliable and to work at 1200 baud. It is a shame the RS232 routines in the Kernal are such a mess!

Re: Release: CBC News App (RSS Reader)

Posted: Sat Dec 17, 2016 2:34 pm
by joshuadenmark
Bobbi wrote:I am curious to know if anyone gave this a try?

I am still investigating what I have to do to make it more reliable and to work at 1200 baud. It is a shame the RS232 routines in the Kernal are such a mess!
haven't got a modem... :cry:

Re: Release: CBC News App (RSS Reader)

Posted: Sat Dec 17, 2016 2:47 pm
by Bobbi
I have been having fun with the WiModem. I totally recommend it if you can find the cash for it ($55 US for the version with the screen.)

Re: Release: CBC News App (RSS Reader)

Posted: Sat Dec 17, 2016 3:58 pm
by akator
After the holidays I hope to buy a WiModem and play with this. The whole idea is very cool.

I keep wondering if there is some way to use the WiModem to access a "chat room" using our VICs. Probably completely impractical, but that doesn't stop me from thinking about it. :)

Re: Release: CBC News App (RSS Reader)

Posted: Sat Dec 17, 2016 4:00 pm
by Bobbi
Seems like a practical idea to me. You can do live chat on BBS systems (sysop to single logged in user) but I don't see why an irc client is impossible for example.

I am looking into making a telnet client for the VIC-20 once I get my RS-232 flow control sorted out!

Re: Release: CBC News App (RSS Reader)

Posted: Sun Dec 18, 2016 10:38 am
by Bobbi
New interim release (v0.2) attached.

Changes since v0.1:

1) Reduced oversized (20K) display buffer that had the potential to trash the RS232 buffers (but I don't think it was a problem in practice.) Added some paranoia to make sure we don't run off the end of the allocated buffer space.

2) Added handling to terminate program when </channel> tag is seen.

3) Added debug code to flash the border for every 10 characters read. If the border is flashing, RS232 data is being received.

4) Added debug code to print out a period when the RS232 RX buffer has more than 10 chars, an 'x' more than 100 chars and an 'X' more than 200 chars. This is to verify I am not letting the RS232 RX buffer overflow. I am not, as far as I can tell.

This release is reasonably reliable at 300 baud, but I have not had much luck yet with 600 or 1200 baud.

Re: Release: CBC News App (RSS Reader)

Posted: Sun Dec 18, 2016 1:42 pm
by litody
This looks such a cool application that I have just placed my order for a Wimodem. I can't wait to start playing around with this and the modem, can't quite believe my VIC will be able to talk to (or at least listen to) the outside world. :)

Re: Release: CBC News App (RSS Reader)

Posted: Mon Dec 19, 2016 8:16 am
by Bobbi
I got 1200 baud working reasonably reliably last night, but I still need to do a bit of work to get it into a releasable state.

Re: Release: CBC News App (RSS Reader)

Posted: Sun Feb 05, 2017 10:15 pm
by Bobbi
Here is v0.3 for the VIC-20 (and also for the C64.) Instructions are included in the ZIP file.

Works at 1200 baud (and expects the WiModem to have been set to 1200 baud ahead of time.)

This code seems to be reliable on the C64 but not on the VIC-20 (although it works reasonably well on the VIC too). On the VIC-20 we lose some characters on occasion due to the broken X-wire RS232 flow control in the kernal.

Re: Release: CBC News App (RSS Reader)

Posted: Mon Feb 06, 2017 6:11 pm
by Bobbi
Here is v0.4 with some improvements. Eight feeds to choose from now. Still not reliable on VIC-20 for reasons mentioned above, but works pretty well on C64.

Re: Release: CBC News App (RSS Reader)

Posted: Fri Feb 10, 2017 2:57 pm
by Bobbi
Here is v0.5 with some further improvements, including a 'kiosk mode' that cycles through all the RSS feeds forever. The program is now working very well on C64 but still has some issues with flaky RS232 on VIC-20.

Re: Release: RSS Reader - Internet News on the VIC20

Posted: Sun Feb 12, 2017 8:33 pm
by Bobbi
Here is v0.6. The big change is that I added the New York Times (so it's not just the CBC News App anymore!)

If anyone has any special requests for RSS feeds to add, drop me a private message!

I did a bunch of testing using srowe's RS-232 wedge. Seems to be working better with the wedge although we still get some corruption. (See here http://sleepingelephant.com/ipw-web/bul ... f=2&t=8307 for details.)