Welcome to Pete Brown's 10rem.net

First time here? If you are a developer or are interested in Microsoft tools and technology, please consider subscribing to the latest posts.

You may also be interested in my blog archives, the articles section, or some of my lab projects such as the C64 emulator written in Silverlight.

(hide this)

POKE 53280,0

Pete Brown - 29 June 2007

I was doing more work in Silverlight today (the application launches next week!) and it got me to thinking about the ease of animation.

The first computer I really fell in love with was the Commodore 64 at my Jr High School. Back in sixth grade (1983 for those keeping count), the school had several Commodore VIC 20s, several Commodore 64s and several DEC VT Robins. I recall seeing a Plus 4 around somewhere, but I don't remember if it was there.

It was on the DEC Robins (running CP/M) that I wrote my very first program. It was in MBASIC and all it did was display characters that created the effect of a rocket launching up the screen. Something like this:

10 PRINT "      * "
20 PRINT "     ***"
30 PRINT "    *****"
40 PRINT "   *******"
50 PRINT "   *******"
60 PRINT "   *******"
70 PRINT "   *******"
80 PRINT "   *******"
90 PRINT "  /*******\"
100 PRINT" / ******* \"

.. anyway, you get the idea :) (for those of you on RSS readers that strip out the html, that's fixed width with a black background)

The screen refresh, when running in smooth scrolling, was so slow, that it was a nice smooth slow rocket launch. In effect, this was my first computer animation, and my first program. The DEC, while interesting with its huge case and overly difficult to press keyboard (and two 5 1/4" floppy drives on the top) kept my interest for a little bit, until I noticed that the Commodores, all with official Commodore monitors and 1531 disk drives, could do basic in color.

The Commodore 64 

Once I got going on the Commodores I didn't go back to the Digitals until the first time I used the then non-public internet at a computer camp in the late 80s.

The Commodore 64 had a pretty easy syntax. You were running in a BASIC programming environment by default. Anyone who played games with them quickly learned LOAD "*", 8, 1 to load a compiled game from drive #8 (LOAD "$",8 for a directory listing), and anyone messing around in BASIC learned the commands to change the screen colors (POKE 53280,0 and POKE 53281,0) as well as the SYS code to reset the system (which I now forget, SYS 64738, IIRC). Run-stop/Restore was also a good friend when you got stuck in a loop :)

When I went to learn basic on the commodore, I went through the spiral-bound C64 manual and quickly came across two things that interested me immediately: SID chip sound programming (and what happens when you don't POKE the right values to turn it off!) and sprites. My first BASIC programs on the Commodore were all about moving sprites around the screen, something which was a lot of fun, especially since the sprites would continue to move across the screen even after your code ended, and you could change their direction in real time by executing statements. To program sprites, which were single-color in their basic version, you coded up against basically a grid of pixels which on today's displays would end up the size of the toolbar icons in Word, then gave it direction and speed.

While I did once create my own character set that looked ver D&D-ish, unfortunately, I never got into collision detection or any advanced sprite stuff before I found out that the Commodore could run games. I spent the second half of seventh grade (back when we still had recess, me and my friend would spent it in the computer lab every day, and also stay after school) playing games like Seven Cities of Gold (I can still remember the music), Ghostbusters, Impossible Mission ("Another Visitor. Stay a while. Stay forever!") and others. I also used Logo, but that was when the math class would bring us in for a "computer day". Sometimes I would look at the BASIC listings of the programs the classes were using ("Educational games") and I would even change them to say pretty nasty things when the user got a question wrong. :)

On the weekends or evenings, I would sometimes go to my friend's house upstairs where we'd play board games like Axis and Allies (which took so long to set up, you never finished a game), Statego and Risk, but also type in the huge piles of machine language that would take up pages in the magazines like Compute!. If you were able to type in all those hex numbers (the first used decimal which required 1/3 more typing!) you would end up with a simple game or something along those lines. It was sort of the 80's nerd version of the Little Orphan Annie decoder ring messages from the 40's. This was all back in the day when any serious Commodore user had the pink copy-protection bypassing disk and a square punch that let you turn a single-sided disk into a double-sided one. That and a pile of disk labels and those little write protect tabs (the silver paper ones stuck better than the black plastic ones - which often got stuck in a drive and made it hard to remove the disk without jamming a pen or something in there to free it)

When I got to highschool, they had Apples (Apple II, IIe, II+, and one IIgs), and it felt like a huge step back. The sound was really primative and the graphics were terrible. They also had one IBM clone, and that was even worse. However, on the apple, I learned Pascal, my first "real" programming language. I later found a black & white Mac with a tiny screen sitting relatively unused in a different lab there, and played with that for a while, experimenting with MIDI with the Yamaha DX-7 keyboard.

In tenth grade, my parents were able to fork out for a great Christmas present (supposedly for the whole family, but I hogged it all the time <g>): a Commodore 128 complete with commodore 80 column monitor (my friend's c64 was attached to an old TV), disk drive and Okidata color thermal transfer printer. That brings to mind another interesting way Commodore was way ahead of time: they had their own usb-like connection mechanism for peripherals. You connected the disk drive to the computer via a DIN cable, and then connected that disk drive to a second drive (if you had one), and then to the printer. It was all daisy chained together in SCSI-like fashion, and was dead easy to connect up.

On the Commodore 128, besides the useful things like GEOS to write my papers for school (the teacher hated that I used fonts, as she found them harder to read than everyone else's typewritten papers. Yes, I had a point and click WYSIWYG word processor on a non-apple platform while DOS people were still dealing with key combinations and lovely wordstar/wordperfect commands. GEOS was a great GUI long before Windows, heck the GeoWorks Ensemble I ran on my first 286 even had a GUI far superior than any other out there, and ran a lot faster than Windows 3.0 on the same hardware.

Anyway, besides the obvious productivity stuff and the CP/M disk I booted a few times and could never figure out what to do with, and the time spent playing Bruce Lee and Times of Lore, Starcross (it's dark, you'll be eaten by a grue), Suspended and other great Commodore games, I did more programming. I wrote some pretty long basic programs that did things as simple as simulate the Q&A WarGames (10 PRINT "Would you like to Play a Game?" 20 INPUT A$), all the way to more sprite animation. I also did a lot with Adventure Construction Set and GameMaker, two really creative and incredibly powerful applications of the time. Of the two, I liked Adventure Construction Set a lot more, as I liked the Ultima-style games. My wife with attest that one trait that I had back then that I still have now, is that I rarely finished any of the games I wrote :)

Rise of the PC

Eventually the PC won out, and I bought a 286 while in college. That was the last time my personal computer was bought and not build. I have built every one since then from my first 486 DX/33 onward, often turning the old ones into servers or sometimes just a pile of parts. I learned DOS programming early on, using TurboC and TurboPascal on my own personal projects. I finally threw away my DOS Interrupt Programming book a few weeks go (no, I haven't used it in a long time <g>). Eventually I moved to Borland C++ (the enormous blue box) for Windows. I even started to create an early Windows 3 BBS server that delivered vector graphics (think SVG now), but never went really far with it before a real company beat me to it with their Excalibur BBS for Windows

Then, since I was now getting paid for it, I did the usual dBase (DOS), FoxPro (DOS), PowerBuilder, Delphi 1.0 (the BDE was DOG Slow!) and then Visual Basic from version 3 to .NET, and then C# from the first version on. The first programming job I had required me to buy all my own software (the rationale the management used was that carpenters needed to buy their own tools), so I ran up lots of CC charges with FoxPro, Delphi, PowerBuilder, VB3 and Borland C++ 3.0. The first app I wrote was a database applicaton for DOS using files indexed with a BTREE (a lot of the code was from a yellow book titled "Build Your own Database in C++" or something like that), and a simple window management system for the UI.

What the heck is this leading to?

Not a whole lot, really :)

Well, after all this time, the first time I have used a platform that makes graphics and animation as exciting and as simple as those early days on the Commodore is when I started using WPF and Silverlight. While nothing quite capture the magic of doing it the first time back on the C64, this comes pretty close. I'll never write a Silverlight app that will run in 32K of memory, especially since the bar for what users expect in terms of the crispness of the graphics is a lot higher,  but at least I can use more than 3 colors when creating elements to animate across the screen :)

If you made it this far, thanks for walking along with me. If you grew up to be a teenager in the 80s like I did, you may have a lot of similar memories. Post if you do!

PS. Early game programmers could get away without being artists. Heck, just look at the graphics they did on some of those games! When you're looking at an entire screen only having 320x200 pixels and sprites under 24x24 pixels, most anyone could do something reasonable and not get laughed out of the market.

 

   
posted by Pete Brown on Friday, June 29, 2007
filed under:    

7 comments for “POKE 53280,0”

  1. Rocky Mooresays:
    Yeah, been there done that! I started developing on a Commodore VIC 20 with 3.5K of RAM and a datacassette for storage (stored your programs on a regular audio cassette tape). That is what started my addiction. I actually built a commerical application that sold very few copies called "Graphics 52" that added 52 commands to the Commodore 64/128 BASIC language primarly for working with graphics and animation.

    Anyway, I get the same feelings about most of Microsoft's technologies they have released lately, it is finally an exciting time to be a developer again!
  2. Pete Brownsays:
    My friend's computer only had the tape drive. It took forever to load games on it. Of course, if they were available, the cartridge games were the best performers with no real load time.

    Later when I got my own Commodore and had a disk drive, my friends were all jealous. Of course, then my friend went and got an Amiga 500, which had me drooling again :)
  3. Rocky Mooresays:
    Oh boy, that Amiga was something else at the time. I did not actually play with it as I knew it could spell the end of my budget ;) Shortly after that though, I moved to a PC XT with 512K of RAM and two full height 5 1/4 floppy drives, thought I had arrived to the end all system ;)
  4. Pete Brownsays:
    I decided to add something slightly retro to the title of my blog. At first, I thought about changing the name to "run stop restore" (the old commodore command the nuke your running program), but that was taken by at least one band. Then I looked at SYS 64738 and not only were there bands there, but some other sites and some p0rn comic strip. Forget that :) So, in the end, the title comes from this blog post...for now :)
  5. Danielsays:
    Enjoyed that retrospective. My version that I wrote a couple of years ago:
    http://www.danielbowen.com/2004/05/11/how-i-became-a-geek

    When you changed the blog name, shouldn't you have made the border black? :-)

    Wait, was 53280 the border, or the main part of the screen? 53281 was the other...
  6. Kalsays:
    this takes me back. my brother just recently sent me facebook wall post: poke 53281,1 - change screen color to white. thanks for the post, I think I'll go visit some of the emulator pages... keep on rockin' Pete!!!!

Comment on this Post

Remember me