Jeff's VIC 20 Book

Discuss anything related to the VIC
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Jeff's VIC 20 Book

Post by Mike »

Richard James wrote:looking at the PDF version 1.2 the joystick section seems to have errors [...]
Both port addresses, 37151 and 37137, work for fire and the directions left, up and down.

37137 ($9111) and 37151 ($911F) both contain the ORA, i.e. the port A data register, with the same meaning of the port bits. Their difference is that $9111 controls the data handshake, whereas $911F has no effect on the data handshake. For more details, please refer to one of the original data sheets.

I prefer the use of 37151 in a joystick routine simply because it is in closer proximity to the other two necessary registers in VIA #2, 37152 (ORB, $9120, contains the joystick right direction) and 37154 (DDRB, $9122, bit 7 - value 128 - temporarily set to input).


However, as you correctly found out, the small block "JOYSTICK $911F $9120 $9122" indeed is in error. It should read:

Code: Select all

JOYSTICK                                                $911F $9120 $9122

$911F 37151    VIA #1 Port A    --FLDU--    Joystick Fire, Left, Down, Up
$9120 37152    VIA #2 Port B    R-------    Joystick Right *)

                       *) enclose between POKE37154,127 and POKE37154,255

Below that, the more verbose block with the Boolean predicates - those expressions with (PEEK(%)AND%)=0 -, is correct.

...

P.S. Welcome back! It's been a long time since. :)
User avatar
Jeff-20
Denial Founder
Posts: 5763
Joined: Wed Dec 31, 1969 6:00 pm

Re: Jeff's VIC 20 Book

Post by Jeff-20 »

Richard James wrote: Sat Jan 18, 2025 3:45 am looking at the PDF version 1.2 the joystick section seems to have errors
Thanks for this! As some of you already know, I am working on an expanded color version with tutorials and such. I welcome any corrections or additions.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Jeff-20
Denial Founder
Posts: 5763
Joined: Wed Dec 31, 1969 6:00 pm

Re: Jeff's VIC 20 Book

Post by Jeff-20 »

Someone inquired about the idea of including schematics in the revised book again. I know very little about hardware, but from my understanding, the schematics in the official reference guide are the first version of the VIC, not the cost-reduced version. If there are multiple revisions, wouldn't it be best to leave schematics out all together?

However, I like how Steve Gray's VIC Reloaded work separates parts of the system: http://cbmsteve.ca/vic20r/vic20r-schematic.pdf
High Scores, Links, and Jeff's Basic Games page.
User avatar
Mike
Herr VC
Posts: 5134
Joined: Wed Dec 01, 2004 1:57 pm
Location: Munich, Germany
Occupation: electrical engineer

Re: Jeff's VIC 20 Book

Post by Mike »

Jeff,

not only are there at least three different major versions of the VIC-20 mainboards and schematics (original VIC-1001, 2-prong, cost reduced), even with different part numbers and board positions of given ICs, I am generally wary about any modern reproductions of the schematics. Unless the people used them to actually reproduce a working layout and then brought a 'clean room' VIC-20 replica into existence, one has no guarantee that such a reproduced schematic does not introduce new errors. With the old, hand-drawn schematics as found on zimmers.net, those errors they contain are known, and for myself I only use these for reference.
Jeff-20 wrote:I like how Steve Gray's VIC Reloaded work separates parts of the system: [...]
Please note that this schematic is already edited and redesigned and does not correspond fully to any of the three original mainboard designs. In particular, to quote the schematic itself:
sjgray wrote:This is a recreation of the VIC-20-cr schematics as a base for creating customized VIC motherboards. This schematic removes cassette features and onboard power. Power supplied from simple 5V supply.
Greetings,

Michael
User avatar
VA3DSO
Vic 20 Drifter
Posts: 24
Joined: Wed Jan 18, 2023 8:00 pm
Website: https://www.vicbbs.com
Location: Canada
Occupation: Programmer

Re: Jeff's VIC 20 Book

Post by VA3DSO »

This is fantastic! I checked out the PDF and loved it. Ordered the spiral bound book from Lulu! Very exciting! This is gonna go nicely with my VIC-20 User Manual and VIC-20 Programmer's Reference Guide. Thank you!
Rick in Canada

Computers: two VIC-20s with Gold Labels, Mustard Keys
Sysop of DeepSkies BBS (bbs.deepskies.com:6400)
User avatar
Soloman
Vic 20 Amateur
Posts: 65
Joined: Fri Sep 22, 2023 1:46 am
Location: Bilthoven, Netherlan
Occupation: Data-analyst

Re: Jeff's VIC 20 Book

Post by Soloman »

Jeff-20 wrote: Tue Jan 21, 2025 2:49 am
Richard James wrote: Sat Jan 18, 2025 3:45 am looking at the PDF version 1.2 the joystick section seems to have errors
Thanks for this! As some of you already know, I am working on an expanded color version with tutorials and such. I welcome any corrections or additions.
I own the book and it's tremendous. I use it everytime when I'm programming te VIC. I found the part of the screenaddresses somewhat unclear. I will come back later with my findings.
The part at the end with the few-line-gameprograms was an eyeopener for me. On internet I found explanations of these programs.

There are some bugs in the VIC. Maybe an idea to mention them? Like the INPUT-bug (When you program an INPUT with a question that ends in the next screen-line, the INPUT doesn't work, and it doesn't work either when you use a PRINT "long question";:INPUT field)
User avatar
Jeff-20
Denial Founder
Posts: 5763
Joined: Wed Dec 31, 1969 6:00 pm

Re: Jeff's VIC 20 Book

Post by Jeff-20 »

Mike wrote: Thu Jan 23, 2025 4:38 am Please note that this schematic is already edited and redesigned and does not correspond fully to any of the three original mainboard designs. In particular, to quote the schematic itself:
Yes, I know Reloaded is a redesign. And like I said, I am also aware of the many versions making a schematic impractical to implement. What I am saying is I like the style of presentation (isolating certain areas). I am wondering if any ideas could be gained by that effort to recreate a schematic. For example, what parts of the schematic are most often used and could be focused on. Even the size of the book makes it impossible to offer the quality of schematic offered in the original reference guide.
Rick-T137 wrote: Thu Jan 23, 2025 8:53 pm This is fantastic! I checked out the PDF and loved it. Ordered the spiral bound book from Lulu! Very exciting! This is gonna go nicely with my VIC-20 User Manual and VIC-20 Programmer's Reference Guide. Thank you!
Thanks for the supportive words, Rick! I'm aiming to have a color version twice the page count eventually.
Soloman wrote: Sat Jan 25, 2025 8:58 am I own the book and it's tremendous. I use it everytime when I'm programming te VIC. I found the part of the screenaddresses somewhat unclear. I will come back later with my findings.
The part at the end with the few-line-gameprograms was an eyeopener for me. On internet I found explanations of these programs.
Thanks for helping here! I found many of the pages to be difficult to use and will redesign the layout. I can also include explications for my little games.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Jeff-20
Denial Founder
Posts: 5763
Joined: Wed Dec 31, 1969 6:00 pm

Re: Jeff's VIC 20 Book

Post by Jeff-20 »

This is my first draft on BASIC statements. I welcome any constructive notes: PDFdraft

Edit: I suspect some of this info is not correct. I struggled with some of the statements I never use like trig functions. Just a warning.
High Scores, Links, and Jeff's Basic Games page.
User avatar
Orangeman96
Vic 20 Enthusiast
Posts: 183
Joined: Tue Jan 16, 2024 3:42 pm
Location: U.S.A.

Re: Jeff's VIC 20 Book

Post by Orangeman96 »

Jeff-20 wrote: Tue Mar 04, 2025 2:32 pm This is my first draft on BASIC statements. I welcome any constructive notes: PDFdraft

Edit: I suspect some of this info is not correct. I struggled with some of the statements I never use like trig functions. Just a warning.
I have, Jeff; happily reviewing... -OGM
User avatar
huffelduff
Vic 20 Enthusiast
Posts: 154
Joined: Sat Sep 05, 2020 9:14 am

Re: Jeff's VIC 20 Book

Post by huffelduff »

Hey Jeff,

Hope you are keeping well. I use the Programmers Reference for Basic from time to time (Specifically the 10 liner competition)
One frustration I have is the original ordering of the BASIC Command reference: Statements, IO statements then Functions.
Very useful for when one is starting out and for understanding, but a bit frustrating for lookup.
So I appreciate your alphabetical ordering a big bunch. Thank you.

Greetings

H
Post Reply