Retrochallenge 2016/01

To jump to a specific update, select from the list below:

It’s that time of year when the bi-annual Retrochallenge prepares to begin with a new list of challenge entries, all in the name of vintage computing. For the next challenge, I choose NOT to continue with my repeatedly failed attempts at finishing a Retrochallenge. Instead, I plan to move forward with a self-imposed challenge that has an HONEST TO GOODNESS chance of completion!

  • No out-of-reach goals…
  • No complicated plans…
  • No gimmicks…
  • …and furthermore, NO EXCUSES!!!

My Retrochallenge for the upcoming January 2016 period is to live my life as a teenager again! Or at least pretend I’m that near coming-of-age teen I used to be back in the heyday of 8-bit personal computing.

Now, I don’t mean that I will be hanging around the mall arcades (because they’re ALL GONE!!!), nor will I go into the local Spenser’s store and giggle over the fake poop and other gag gifts (while thinking that it’ll never be old enough to qualify for one of their “Over 40” gifts). In fact, I still reserve the option to drink beer while performing the challenge!

My challenge is grueling, time-consuming, and absolutely unheard of by modern generations. It could even be classified as TORTURE!

I will be… typing in a program from a COMPUTER MAGAZINE!!!!

YES, this challenge is REAL!!! I will attempt to type in a complete working program from a formerly published computer magazine. Not one of those newer computer magazines which are 65% advertisement and 35% opinionated editorials. This program (whatever is chosen) will come from the likes of actual paper based magazines from the late 1970’s through the 1980’s. It might be a COMPUTE! magazine, or COMPUTE’S Gazette, or RUN, or Home Computer Magazine, or 99’er, or whatever magazines I find in my vintage computer stash.

Don’t even THINK that there isn’t a serious risk involved with this challenge. In order for me to complete it, I must endure the following:

  • Reading with eyes that are 49 years old, with astigmatism
  • Early onset arthritis in fingers
  • Sitting for long periods of time (risking discomfort for any number of age onset ailments… use your imagination for more info)
  • Paper cuts
  • No syntax highlighting
  • No autocomplete
  • Low-definition display
  • “Old man” ridicule from my own teenagers
  • Local kids running on my front lawn
  • and even…
    Abraham Simpson

I will soon decide what kind of program I will type in, and what platform I will use. The chosen program could be a game, or demo, or utility program. After I enter it, I might even enhance the risk of the Retrochallenge by SAVING IT ONLY TO TAPE! (crowd gasps!)

When I finish typing in the program, I’ll look for ways to possibly enhance it, repurpose it, or otherwise give it a reason to be called “TYPEDINPROGRAM 2.0!”

I’m absolutely ready for this challenge! I have my clunky old 8-bit computer(s) ready, magazines with someone else’s address label on them, reading glasses, carpal tunnel wrist braces, and a clear path for bathroom breaks… just the way it was when I was a teenager!

Oh… wait.

Update 12/16/2015 (or 16/12/2015 for those near zero longitude)

It’s probably no secret that I have an affinity toward Commodore computers, having grown up with them. So in the spirit of the challenge before me, which is to be reliving the “inexperience” of typing in computer programs like I did when I was a teenager, it will be best to use a brand of computer I did NOT readily use back then. If I want as full an experience as possible, I should not incorporate any more past experience than I need to. I’m still pretty agile on a Commodore VIC-20 or 64 keyboard, so where is the challenge in already knowing where certain specialized keys are when typing in code from a magazine. Those of you who have typed in programs for a specific platform before know exactly what I mean. I should use a system whose keyboard and operation I am not readily familiar with, and is part of my current collection. I will not do this through emulation.

Here is the candidate list:

  • Commodore 64
  • Commodore VIC-20
  • TI-99/4A
  • Apple II
  • TRS-80 Model IV
  • Timex-Sinclair 1000 (ZX-81)
  • Mattel Aquarius
  • Coleco Adam
  • TRS-80 Color Computer
  • Atari series (400, 800, XE, XL)

I already ruled out Commodore computers due to my familiarity with them. If you saw my YouTube videos from a past Retrochallenge, you also know that I have used TI-99/4A extensively. Its keyboard is nice to type on, but I’m still too familiar with it.

I have not used Apple II much in my life, but I have used it at intervals throughout my life, giving me more experience with these than some of the other candidates. It’s a good alternative platform for me to use for this challenge, but there is a better choice.

The TRS-80 Model 4 would be a comfortable and suitable system to type a long program into, but it does not fit well into the “average teenager” mindset. Colors and sound were the draw of the day. Besides, I don’t know if any of my current library of print magazines have type-in programs for the Model 4.

Timex-Sinclair 1000 – Membrane keyboard, “zappy” RAM cartridge… ’nuff said!

Mattel Aquarius – Can’t even find commercially sold software for this thing, much less any that can be typed in.

I do own a Coleco Adam, but the type-in software resources are not much better than that of the Mattel Aquarius. Besides, its printer is bad. For those who know the Adam platform, the printer IS the power supply for the entire system. I do not have time to retrofit a modern PC power supply as an alternative.

I used to poke around on the TRS-80 Color Computers quite often at Radio Shack when I went to the mall. While I don’t have any real experience with the platform, even after owning a number of them for the past decade, I am familiar with them just a bit more than the next candidate.

I have decided to do this challenge on an 8-bit Atari series computer. I can just hear Kevin Savetz cheering in the background…

There was actually a spark that led to this decision. I was finally catching up on some podcasts on the way to work this morning from those I subscribe to. As I was listening to Randy Kindig’s Floppy Days podcast episode about the Atari 8-bit line of computers (yes, I’m that far backlogged), it dawned on me that I actually have several Atari models in my collection. It also happens to be the one platform in my collection that I am least familiar with, so I’ll probably stumble like an idiot while learning how to type on it… fulfilling one of my challenge parameters!

I have to dig out my Atari collection before choosing a specific model. I have an Atari 400, but while I said I’m reliving my teenage years in doing this, I doubt my fingers are as resilient as they were when I was a teenager. Besides, I excluded the Timex-Sinclair 1000 due to its membrane keyboard. I also have an Atari 800, which would be an epic candidate for this challenge, but I remember it having a broken key on the keyboard, so it’s out.

I do have one or two models from the XE and XL line. Without looking, I believe I have the 65XE and the 800XL. I know where the 65XE is stored, but I’ll have to dig around for the 800XL, so the 65XE will probably be the candidate model. I also have an Atari tape drive to use along with it. Saving the typed in program on tape was one of my challenge parameters.

So… I should be ready to go by January with an Atari 65XE, tape drive, and color monitor. Then next consideration I have to make for this challenge will be deciding which magazine and which program I will be typing in.

Update 12/21/2015

October 1983 COMPUTE! magazine
October 1983 COMPUTE! magazine

I was looking through some of my remaining Compute! magazines, not realizing that I had so few of them, and came across the October 1983 edition (click on link to open an electronic copy on which had what looked like a fun game to play. In this edition is a game called Dragonmaster. It is a type-in game in BASIC in which you are a knight (who doesn’t necessarily say “Ni!”) who must make their way through a field of dragons, stabbing them as needed, to rescue a princess for no apparent reason other than perhaps to become your bride? (Inconceivable!)

Yes, I’m well aware of the crossed references to pop culture…

This game can be typed in for several different systems, such as the Commodore VIC-20, Commodore 64, and Atari. Based on quick calculations using the source code line numbers, I’m looking at about 228 lines of code to be typed in. I’m just glad the code is in the beefier middle of the magazine so that the pages lay flat and the magazine doesn’t decide to curl itself closed.

Update 1/8/2016

A bit of a slow start to the Retrochallenge on my part, but at least I didn’t wait until January 25th or something!

So, where do I stand…

  • Atari computer – CHECK
  • Tape drive – CHECK
  • Monitor – CHECK
  • COMPUTE! Magazine – CHECK
  • Workspace… – MISSING!

I have everything I wanted on hand to get started, except for an actual place where I can set up the equipment to use it! I have no available desks, benches, or stands which are either able to be temporarily commandeered for thirty days, protected from the large dogs in the house, or reside in a heated portion of the house.

This is certainly a problem, but a problem I can work around if I focus tighter on the desired goal. To achieve this focus, I will have to exclude something from the larger picture. My focused goal is to be able to type in this program as if I was doing so back in the day. Having the actual equipment helps to do this, but that resource is limited, at least until Spring Cleaning days come around. So… I guess I will have to ease the restriction on emulation. But in doing so, there seems to be an added benefit.

I did not expect the act of typing in this program to take an entire month. What I did want to do afterwards is try to see if I can improve the program in some way, learning more about the Atari platform in the process. If I did that under my original project specifications, I would have no easy way to transfer the modified program from tape (or disk) to a modern platform so I can share it with others. I do not have any SIO-to-PC hardware, so using emulation means I can have my data in a ready-to-share format from the start.

COMPUTE! magazine and Atari emulator side-by-side
COMPUTE! magazine and Atari emulator side-by-side

Another benefit to emulation is that I am not limited to working at one spot to do this Retrochallenge. I can do it all from my Surface Pro laptop and work literally anywhere! Since I’m using Windows 10, I can go split-screen and put an Atari emulator on one side of the screen and a PDF version of the COMPUTE! magazine on the other side, like the example picture shows (click on it for a bigger version).

For the emulator, I decided to use Altirra for no apparent reason other than it came up early in a Google search. I’m glad I found this. It appears to be a full featured Atari system emulator with many enhanced features and emulated hardware. It’s almost like a counterpart to my favorite Commodore emulator, WinVICE, which is no slouch of an emulator either.

Altirra allows me to create ATR disk images on the fly, change the look of the display to simulate NTSC artifacting, and it even authentically reproduces the type beep that these Ataris are noted for. Therefore, it can feel even more like The Real Thing(tm). Plus, it docks rather well to one side of the screen in Windows 10.

I believe this to be a suitable compromise that will allow me to complete the Retrochallenge.

Update 1/10/2016

I finally typed in the Dragonmaster program from COMPUTE!. It took about one hour of actual typing as part of several hours of emulator configuration. I had some difficulty using the Altirra emulator. It’s an astounding emulator, but I was unable to save anything from BASIC to attached ATR disks. I would get actual Atari BASIC “timeout” errors. Long story short, I attributed the issue to Windows 10 incompatibilities and did not explore further. Instead, I installed the Atari800Win emulator. It’s a good emulator. Not as versatile as Altirra, but it did what I needed to do. I could even video record operating sessions if I wanted to. Here is a video of me typing in a few lines of code.

After I saved the final type in lines of code, I ran the program right away, because I’m impetuous like that! Here is a video of the first run of the program.

You may see a noticeable but during the title sequence, but a bug you may not notice during the video is that I was unable to move to the right. I will debug these issues later.

Update 1/13/2016

I had just discovered that emulation does have limitations on certain computers. I’m doing my retrochallenge entirely on a Surface Pro computer. It’s certainly convenient to do so. The emulators run as well as they can, short of Windows 10 compatibility issues, except for joystick emulation. The standard practice for 8-bit system emulators of any kind are the use of the cursor keys for joystick directions and the Right-CTRL key for the fire button. On the Atari emulators, the Left-CTRL button is reserved for the Atari CTRL key. The Surface Pro (and even many newer laptops) lack a Right-CTRL key. When I try to remap the key, I run into emulation issues because I would have to remap a functional Atari emulated key. So, my solution is to rewrite this joystick based game to use actual keypresses instead.

After doing some research on Atari BASIC, I was surprised to find that it lacks an elegant key detection command. Commodore and other 8-bit computer BASICs have INKEY$ and/or GET commands to snag a keypress. Instead, I have to read the contents of memory location 764. Each keypress changes the value of that location. All I need to do is POKE a starting value into it to “reset” it, then read it again to see if the value changed to a new keypress. I can test that keypress value to determine direction.

For the direction keys, I’ll use H = Left, K = Right, J = Up, M = Down, and A = Fire. I’ll run the following program to get the key values:

1 PRINT PEEK(764) : GOTO 1
H = 57
K = 5
J = 1
M = 37
A = 63

I now have my values. Next, I need to modify the following lines of code:

1110 V=15-STICK(0):Q=P:V=V/2
1120 IF V<>INT(V) AND PEEK(P-20)=0 THEN P=P-20
1130 V=INT(V)/2:IF V<>INT(V) AND PEEK(P+20)=0 THEN P=P+20
1140 V=INT(V)/2:IF V<>INT(V) AND PEEK(P-1)=0 THEN P=P-1
1150 V=INT(V)/2:IF V<>0 AND PEEK(P+1)=0  THEN P=P+1

I need to replace the STICK() command with a PEEK(764), then replace the formulas referenced by the V variable to work under the new format, such as:

1110 V=PEEK(764):Q=P
1120 IF V=57 AND PEEK(P-20)=0 THEN P=P-20
1130 IF V=63 AND PEEK(P+20)=0 THEN P=P+20
1140 IF V=1 AND PEEK(P-1)=0 THEN P=P-1
1150 IF V=37 AND PEEK(P+1)=0 THEN P=P+1

This will cover the compass movements. The fire button is handled elsewhere in code.

1180 IF STRIG(0)=0 THEN GOSUB 1760

will be changed to:

1180 IF V = 5 THEN GOSUB 1760

I don’t know if it will work, but I’ll give these steps a try. After all, this IS a learning experience!

Update 1/29/2016

This is expected to be my last entry for this Retrochallenge.

I’m wishing I did have the opportunity and room to put up a full Atari computer set as I originally intended. Alternately, I fully expected to be able to work the Retrochallenge through emulation, but the two different emulators I was using had their own quirks that prevented full functionality for this particular purpose. I don’t blame the emulators completely. Altirra did have problems saving to the virtual disks, but I blame that on Windows 10 and not the emulator. Atari800Win saved to virtual disks just fine, but the joystick emulation wasn’t very responsive.

In part, I blame two things:

  • The Dragonmaster program in COMPUTE! – the game was written solely for joystick use. Since I’m not that familiar with keyboard based gaming in BASIC on an Atari, I was unable to understand how to convert joystick only code to keyboard code, or to believe that it would be difficult to do so. Perhaps it’s wishful thinking to believe it could have been written for joystick OR keyboard use.
  • The Atari BASIC environment – The Atari has a great set of capabilities and BASIC commands to leverage them, BUT, keyboard handling is sorely lacking. There is no easy way to simply have BASIC poll a keyboard and retrieve a code for a currently pressed key, instantly. There is a memory location directly related to key presses, but it doesn’t automatically clear itself when no key is pressed, so it holds a value depicting the last key that was pressed, and it would do so indefinitely without program intervention. That has to be done each time in code before a read. Not very convenient or intuitive.

I would like to do more with Atari computers. One day, I’ll find space to set up a real Atari, and then poke and prod it like a squirrel to see what I can do with it.

In closing, I would like to say that I enjoyed this Retrochallenge, but I might challenge myself to something more technical next time. I did find a new and better appreciation for the Atari 8-bit computer systems. I also want to thank the Antic podcast for mentioning my current Retrochallenge project in their Episode 29 edition. Kevin, I’m still waiting for the chocolate and Xanax…

But the most important achievement in this Retrochallenge is that I actually FINISHED it!

5 Comments on “Retrochallenge 2016/01”

    1. Thanks, Randy!

      As indicated in my project update, I (still) have a problem finding space to set up a full Atari for the duration. So, I’m using emulation at the moment. I only partially regret having to use emulation. My previous Retrochallenge attempts were not very well managed because I could not do anything at will because of the limitations of a fixed setup.

      With Commodore 64 stuff, I could always take out an SX64 and place it on the dining room table as needed. I cannot do that with an Atari, unfortunately. But my recent acquisition of a Surface Pro 4 makes the Retrochallenge easier for me to partake in. I wish I could set up my Atari 800 (or 65XE), but it’s just as well, I suppose. I still get to experience the Atari platform, regardless of the method. I’m actually developing an appreciation for the platform and looking forward to doing more with it during my retro computing follies.

Leave a Reply