Thursday, August 30, 2018

Gakken Mini Blocks - Blink and You Miss It

I discovered sadly that Gakken made a cute little version of their EX system called Gakken Mini Blocks, but they stopped making them before I noticed.  I think this is so neat.  I blogged about my love of the Gakken Denshi Blocks a long time back.  See http://microcomputing.blogspot.com/2007/

Some people are selling these on ebay, but they are discontinued.  :-(  Too bad.

Here is a photo.


I also found a link to a video about it.  The presenter explains the product and assembles a simple computer circuit.



Wednesday, August 29, 2018

Upgrading to a Soldering Station

For some years now I have been using a cheap soldering iron with a 15W/30W switch that I purchased from Radio Shack (I miss them).  This has been just fine for the electric guitar modifications that I like to make, but I'm not comfortable using this iron for the Final Expansion 3 cartridge for my VIC-20.  I decided to purchase a soldering station with temperature control so I can tweak it while I'm doing my work.

Here is the station I bought on Amazon for about $30.

This is an AOYUE 469, which is a 60W iron.  It has a nice steel spring to keep the iron, which is much better than the cheap stamped stand I was using.  It has a place to put your spool of solder, and a place for a sponge (that's not a Post-it note!) to keep the iron tip clean.


Here you can see this does not let you specify a temperature.  The specifications provided state that the temperature is from 300F to 480F.  But, the dial goes to from 1 to 8 (not to 11)!


This is a photo of iron tip.  If you look carefully, it seems they have pre-tinned it for me.







Monday, August 27, 2018

Prelude to a Kit (Final Expansion 3)

Let me just show a few photos of what came in the Final Expansion 3 kit for the VIC-20 (that I ordered from SkydivinGirl over on the Atari Age forum) before I get down to beginning assembly, just so people can see what is in the box.

Here is how it came packaged.  I think this is fine because there is nothing in here that could be considered fragile, at least in the sense that glass is fragile.  ;-)


This is the bare board in a nice bright fire engine red.  You may notice there are a few spots where parts will need to be surface mounted, but its mostly thru-hole.  It should be a pretty easy build.  I used to do a lot of PCB assembly in my youth, so I'm comfortable with this.



The ICs came in this anti static bag. My understanding is that the ROMs are already programmed.


Here are the capacitors, resistors and other parts.


Finally it comes with two different kinds of stickers to choose from for the top of the cartridge case, which is not included.




I decided that I would not buy the optional case, which is more than $20 by itself.  Instead I decided to sacrifice an original VIC-20 Mole Attack! game to provide a cartridge.  I will need to cut some openings for the SIO ports that Final Expansion 3 uses to connect to the VIC-20 serial port and also out to another serial device such as a floppy drive.  Also openings for the SD card slot and for a bank of DIP switches will be needed.



Finally I'll note that the kit doesn't come with any assembly instructions, which surprised me.  Instead I needed to Google for them.  Save a tree?

Here's the link for the instructions.  They are for an older version of the board, but they should suffice.   http://www.lemon64.com/forum/viewtopic.php?p=767044

Saturday, August 25, 2018

Starfield Simulation in Liberty BASIC

Here is the starfield simulation that for the VIC-20 that I posted a few days ago, but ported as simply as possible to Windows using the Liberty BASIC language (http://www.libertybasic.com).  If you compare them side by side you can see that a lot of the original code is preserved across the translation.

Enjoy!

 dim st(9,1)  
 gosub [setup]  
 timer 20, [cycle]  
 [cycle]  
   for c=0 to n  
     xold=st(c,0)  
     yold=st(c,1)  
     st(c,0)=xold*1.23  
     st(c,1)=yold*1.23  
     x=int(st(c,0))  
     y=int(st(c,1))  
     if abs(x)<15 and abs(y)<15 then  
       gosub [clearStar]  
      else  
       if abs(x)>200 or abs(y)>200 then  
         st(c,0)=(rnd(1)-0.5)*3  
         st(c,1)=(rnd(1)-0.5)*3  
        else  
         gosub [drawStar]  
       end if  
     end if  
   next c  
   wait  
   goto [cycle]  
 [clearStar]  
   #starfield "color black ; place "; xCenter + xold; " "; yCenter + yold  
   #starfield "\."  
   return  
 [drawStar]  
   gosub [clearStar]  
   #starfield "color white ; place "; xCenter + x; " "; yCenter + y  
   #starfield "\."  
   return  
 [setup]  
   input"# stars (1-10)";n  
   n=n-1  
   for x=0 to n  
     st(x,0)=(rnd(1)-0.5)*200  
     st(x,1)=(rnd(1)-0.5)*200  
   next x  
   open "starfield" for graphics as #starfield  
   #starfield "home ; posxy xCenter yCenter"  
   #starfield "down ; fill black ; backcolor black"  
   #starfield "trapclose [quit]"  
   return  
 [quit]  
   close #starfield  
   end  
Here is a quick video I did to showcase my VIC-20 and my other 6502 computers including a Commodore 128, an Apple Iic, and an Atari 800XL.  Enjoy!


The next video will be about the Final Expansion 3 kit that I will be soldering together.

Wednesday, August 22, 2018

VIC-20 Final Expansion 3 kit

In order to get serious about doing anything on the Commodore VIC-20 you really need to be able to get files into and out of the real machine, in my humble opinion.  I have also started using the VICE emulator, but whatever you do should be tested on the real hardware, and ultimately that's where the fun is.  ;-)

So, I've looked at a few options and I've settled on the Final Expansion 3 (FE3) cartridge kit.  I'm very comfortable soldering things together, and it makes things more interesting.  I also purchased a budget temperature controlled soldering station because the cheap iron I've been using for years doesn't seem suitable to me for doing this project because there is a little bit of surface mount soldering involved.

Here are a couple of photos of the blank board.



One really cool feature of this board the serial ports that hang off the back.  I can plug my VIC-20 serial port into the FE3 and use it's 512K of flash RAM (or an inserted SD card) as a huge floppy disk, and I'm told that I can even plug my Commodore 128 into it while it is being powered by the VIC-20, and use it as a floppy drive for that machine too!  Very cool!

Tuesday, August 21, 2018

Starfield Simulation in Commodore BASIC

I posted a challenge in the VIC-20 group on Facebook.  The idea was to replicate the forward screen of the starship Enterprise from Star Trek.  This shows stars moving from the center of the screen to the edges, simulating forward motion.  It isn't meant to be an accurate 3D simulation.  ;-)

Here is my code of this.  One other person also submitted a version of it.  This could form the basis for a game.

[Update] --- I made a new version of this in Liberty BASIC!  Click to see the new version

 10 gosub 500  
 100 for c=0 to n  
 110 xold=st(c,0)  
 120 yold=st(c,1)  
 130 st(c,0)=xold*1.23  
 140 st(c,1)=yold*1.23  
 150 x=int(st(c,0))  
 160 y=int(st(c,1))  
 165 if abs(x)<2 and abs(y)<2 then 320  
 170 if abs(x)>10 or abs(y)>10 thenst(c,0)=(rnd(1)-.5)*3:st(c,1)=(rnd(1)-.5)*3:goto150  
 180 pstar=center+x+y*22  
 190 poke center+int(xold)+int(yold)*22,32  
 200 poke pstar,108  
 300 next c  
 310 goto 100  
 320 poke center+int(xold)+int(yold)*22,32  
 400 next c  
 410 goto 100  
 500 poke 36879,14  
 501 input"# stars (1-10)";n  
 502 n=n-1  
 505 print"{clrscrn}";  
 510 dim st(9,1)  
 520 for x=0 to n  
 530 st(x,0)=(rnd(1)-.5)*10  
 540 st(x,1)=(rnd(1)-.5)*10  
 550 next x  
 590 center=7932  
 600 return  

Monday, August 20, 2018

Introducing The Friendly Computer!

When Commodore introduced the VIC-20 they called it The Friendly Computer.  This is probably more because of the manual they included with it than because of anything else.  The book was really easy to understand.


Here is my own VIC-20.  This is an early one, with the squared off keys and the two-prong power plug.  I've got it plugged into a Sylvania TV using an RF modulator.

If you look closely at the screen it reports CBM BASIC V2, and 3583 BYTES FREE.  The computer comes with 5K RAM, but it uses some of that to map the screen, and some more for managing the BASIC interpreter.  If they had thought to provide 8K RAM this would have doubled the amount the programmer has access to.  This would have made the VIC-20 a lot more powerful.

Nowadays people wonder how anything could every be written with only 3.5K RAM, but we were so used to this back then.  You might be surprised how much can be done with a little ingenuity.  As a comparison, the original Atari 2600 VCS game console had only 128 bytes of RAM.  The VIC-20 has 28 times more RAM!  In addition, you could plug a RAM expansion cartridge into the VIC-20 to add more RAM.  Commodore made several sizes up to 16K RAM, and other companies made bigger ones.

I also have a Commodore C2N cassette drive.  I also had one of these in the 80's.  I have been using the tape drive to save some small programs.  This is nothing like a floppy drive, but you can save programs by name, and it sure beats retyping in programs every time you want to use them.

I also have a Commodore 1571 floppy drive.  These are great, but they don't make it possible to send and received programs to and from other people on the Internet because the disks have a format that can't be read on Macs or PCs.  I want to share what I'm doing, so I have purchased a kit to build my own SD flash memory adapter that will behave like a floppy drive and also let me use the SD card to copy files to other computers so I can share with others.  I'm very excited about that and I'll blog about it also.

Back to BASICs

Some time ago I began to assemble a small collection of vintage home computers in order to begin blogging about what makes these machines so appealing.  In particular, programming these computers in BASIC in my early years made a huge impression on me and my creation of Liberty BASIC was inspired by my love for BASIC.

I have obtained the following machines in working condition.

Apple //c
Commodore 128 (a Commodore 64 compatible machine which also has a Z80 processor)
Commodore VIC-20
Atari 800XL
TRS-80 Color Computer 2 (not sure I will actually use this one)
And a few less popular computers that might make guest appearances.

To begin with, I am focusing on the Commodore VIC-20.  I have some ideas about very simple and fun projects in BASIC, and some Forth.  Since most of these machine also have a 6502 processor, perhaps there will also be some posts about that.