RetroChallenge Day 30 – Post 11 – Reading Data Files – Colors

I’ve added two final features to STATS for Atari 400/800 to round out the program and exercise Kyan Pascal for the April 2017 Retro Challenge.  The ability to read data from text files and a menu driven utility to change colors.

See the self running demo on youtube :

On the main menu the two new options have been added, [C] for change colors and [R] to read data from file.


Starting with the read files selection, when R and <enter> are selected the user is prompted for a file name and into which data set should the data be loaded.


When STATS is run from the distribution disk on drive 1, the default drive for the data file is drive one, as shown above.  The file name can also be given with the drive designation as well.  If the system has multiple drives and the data file is on drive 2 then “D2:WTDATA.TXT” could be entered.  Kyan Pascal allows for drives 1 and 2.  This is useful because while there is some room on the program disk, having drive 2 available allows for endless number of data files.

The format of a data file is simply one number per line with a final carriage return after the final entry.  Here is the last 20 or so entries in the WTDATA.TXT file.


As the data loads, the program shows a counter of the number of data points read and stored, and pauses after loading request a [C] to be entered to continue.  Up to 4 data sets can be loaded.

Once loaded then the dataset can be used for other functions in the program, below the descriptive statistics for the WTDATA.TXT data is shown.


In an earlier post I discussed the specifics of setting colors on the Atari 400/800’s, and now have added the ability for the user to select there color to use and either bright text on dark background or dark text on a light background.  When the user selects [C] from the main menu they are presented the color menu and are asked to provide the number of the color and the light/dark scheme that they wish to use.


In the example above the user picked color 5, PINK and light text on dark background, resulting in the screen below.


To be transparent about the code, there is not much error checking for any feature in STATS, in a market ready program, things like, checking if a data file exists, and checking for valid responses to questions for menu options should be done, in the timeline of  this RetroChallenge I’ve been more interested in seeing what I could get to work than all the expected checks of a final software product.

My next post will be a final wrap up of my RetroChallenge project – Dorsett STATS tapes and STATS for Atari 400/800 in Kyan Pascal.







Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s