Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Digital Archaeology » Computer Arcana » Commodore » Commodore 8-bit » A simple RS232 bootstrap program for the VIC20
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
A simple RS232 bootstrap program for the VIC20 [message #255518] Sun, 15 June 2014 11:33
Chris Baird is currently offline  Chris Baird
Messages: 167
Registered: December 2011
Karma: 0
Senior Member
I've just tidied up a useful little program of mine that's used over the
past year to transfer games and other code to my datasette-only VIC20.
It wouldn't be difficult to modify for the '64. .tar


------------------------------------------------------------ ------------------
Here's a quick and dirty serial bootstrapping system I've been using
with my VIC20.

Cooking instructions:

Firstly, you'll need to provide a serial data connection between your
Python-loving system and the VIC-- I'm using a USB TTL Serial adaptor
borrowed from an embedded programming setup. (Connect the GNDs, TxD to
User port pins B&C, RxD to pin M.)

Secondly, you'll need to type in the BASIC bootstrap problem included
below. Stop whining, it's only 25 lines.

In "vicload", edit the serial port device to suit, and then run it
like this:

$ ./vicload start_address_decimal memory_image

or to have the first two bytes of the file used as a start address:

$ ./vicload 0 program.prg

The packet format is deliberately very simple, to make the receiving
BASIC program run fast by the use of INPUT#, which doesn't take to
binary data very well.

I've also written a machine-code version of the receiver.
"downloader.prg" runs from regular program RAM for downloading
cartridges (takes about 4 minutes) and programming projects into BLK5
RAM, and "downloader.a0" that resides in BLK5 for downloading the
other way around. The assembler code needs the cc65 tools to build.

(Still included in the source is an attempt to make the downloader
save the transfered data to tape-- unfortunately I discovered a
limitation in the VIC's ROMs when trying to save memory over location
32768, preventing saving binary cartridge images. If anyone knows of a
way around it, let me know!)

------------------------------------------------------------ ------------------
V2 BASIC bootstrap

100 OPEN2,2,3,CHR$(8)+CHR$(0)
122 DIMB(90)
130 PRINT"<BLK><CLS>";
150 L$=""
161 PRINT"<RED>----------------------<BLK>";
170 PRINT#2,LI
180 POKE36879,25
230 INPUT#2,L$
300 ER=0
310 S=VAL(LEFT$(L$,5))
320 P=0:FORI=1TOLEN(L$)-5STEP3
330 A=VAL(MID$(L$,5+I,3))
340 B(P)=A:P=P+1
345 IFP=90THENER=1:P=0
350 NEXT
390 IFER=1THENPOKE36879,42:GOTO150
505 POKE36879,93
510 LI=LI+1:GOTO150

The same code could be used for the CBM64 by changing/omitting the POKEs

------------------------------------------------------------ ------------------

Chris Baird,, <>
Dedicated to Charl and other Voodoo Castle players...
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Project 64 Reloaded update
Next Topic: 4 KB or 6 KB ML monitor?
Goto Forum:

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun May 16 17:35:37 EDT 2021

Total time taken to generate the page: 0.00514 seconds