Monday, April 21, 2014

Building the Softrock Ensemble II Software Defined Receiver

A recent hardware project of mine was to build a Softrock Ensemble II kit. This is a Software Defined Radio amateur/shortwave radio receiver. Software Defined Radio, or SDR, is a relatively new trend in radio technology that utilizes software running on a computer to perform much of the processing of the radio signals. In the case of the Softrock, it uses a PC and sound card for signal decoding and playback.


Details of the Softrock series of radios are well covered in many articles. I'll just mention some of my experiences constructing the kit.

Overview

The kit comes with all parts other than cables and power supply. There is a very nice optional case available which I opted for.

While it is a small board, there are many components to install, both through-hole and surface mount, on both sides of the PCB.

I assembled my unit over a period of about ten days, working an hour or two most evenings. I encountered no major problems. A few assembly details I had to confirm on Internet postings. I have only briefly tested it with a PC so far, but was able to pick up quite a few amateur radio signals just using a short piece of wire for an antenna (while I was building it my amateur radio antenna was down to do roofing work).

Having built the kit, I can offer a number of suggestions and advice to other kit builders.

Suggestions

There are a significant number of parts on the kit. Take an inventory of them all and check them off against the parts list. The board is built in functional blocks. Either separate all the parts for each functional block, or do so when you start working on a block.


Take your time with assembly. I like to make a hardcopy of assembly instructions rather than reading them off of a computer screen. This allows me to check off the steps and make notes.

Check the parts carefully. I generally built no more than one functional block in a session, as per the assembly instructions. Because there are HF and LF versions, there are differences in construction and you will have some extra parts left over. Make sure you use the correct set of instructions for the model you are building. The on-line instructions are good but there are some minor typos. Some potentially confusing instructions are related to PCB changes and coil winding. Some modifications described are no longer applicable to the latest revision of PCBs, so watch out for this.


The SMD soldering may look daunting, but it can be done with a steady hand. Use a small tip and small diameter solder. Use a magnifier and inspect you work carefully for good joints and no solder bridges. Watch some of the SMD soldering videos on the Internet. The only trouble I had was with some solder bridges around the oscillator module. It has extra pins that should not be connected and they got bridged. Liquid solder paste may be helpful when soldering, but I did not have any when I built mine. I did clean the tracks first with a soft eraser. If the assembly is beyond your comfort level you can buy the radio assembled. Or you may want to build the simpler and lower cost single band Softrock Lite II version.

Measure all parts with an ohmmeter and cap meter if you have one (e.g. in your DMM). While parts are unlikely to be bad, it is easy to misread the colour codes and install the wrong part (particularly for resistors). As I have a digital LC meter, I also measured the inductance of the toroids after winding them just to double check.


Some people don't like winding toroidal inductors. This kit has a lot (12 coils and three transformers), but most of them are straightforward single winding coils. Assembly is not too hard, although some of the cores are quite small. The coils use larger gauge wire than the transformers, which is easier to strip without breaking the wires.

Follow all the tests for each stage. This can be done with a DMM, although an oscilloscope is nice to have. A frequency counter, if you have one, is also helpful.


For power, use a decent regulated power supply, not a "wall wart". I found this low cost supply [picture] on Amazon that is switchable for different voltages and comes with all the common power connectors, and is regulated.



I recommend ordering the optional case. It makes the unit look professional and protects it. Join the Yahoo Softrock discussion group. Expect to spend a lot of time setting up and learning the software side. There are several software packages to choose from.


I have only done some preliminary testing of the unit hooked up to a computer, but it seems to be working fine. I will probably post more updates here after I have played with it some more.

References
  1. Five Dash Inc - source for Softrock Radio Kits
  2. WB5RVZ.ORG - KITS' Documentation Home Page
  3. Softrock-40 Yahoo Interest Group


Saturday, April 19, 2014

Running dBASE II on CP/M

A viewer of my YouTube video on running various CP/M applications on the Briel Altair 8800 kit suggested I look at dBASE II. dBASE II was one of the first database management systems for microcomputers. I'm not particularly interested in databases, but I thought I would give it a try.

I downloaded dBASE 4.1 from www.retroarchive.org. I unzipped it, copied the files to an SD card, booted up CP/M, and copied all files to an empty CP/M B: drive.


While it runs out of the box, running INSTALL will let you configure the terminal type and use it in full screen mode. From the install program, you pick a VT-100 terminal type that should work with the Briel Altair's display. A session is shown below.

B>install

dBASE II INSTALLATION PROGRAM  VER 3.0

ARE FULL SCREEN OPERATIONS WANTED (Y/N)? y

  dBASE II INSTALLATION PROGRAM  VER 3.0
                 MENU #1

A -ADDS VIEWPOINT   M -HP 2621
B -ADM-31           N -INTERCOLOR
C -ADM-3A           O -KAYPRO II
D -APPLE ///        P -NEC PC-8000/1
E -APPLE II 40 COL  Q -NS ADVANTAGE
F -CROMEMCO 3102    R -OSBORNE I
G -DIALOG 81        S -PERKIN ELMER 11
H -EAGLE AVL        T -SANYO MBC 3000
I -GNAT-SYSTEM 10   U -SOROC
J -HAZELTINE 1500   V -SPERRY UTS 40
K -HEATH 89         W -SUPERBRAIN
L -HP 125                          

     X - MENU #2
     Y - MODIFY PREVIOUS INSTALLATION
     Z - USER SUPPLIED TERMINAL COMMANDS

SELECT TERMINAL TYPE: X

   dBASE II INSTALLATION PROGRAM  VER 3.0
               MENU #2

A -TELEVIDEO                   
B -TOSHIBA T100                
C -TOSHIBA T250                 
D -TRS-80 (FMG)                 
E -TRS-80 II (P&T)              
F -TRS-80 III                   
G -VECTOR GRAPHICS              
H -VISUAL-100                   
I -VPD-80                       
J -VT-100                       
K -XEROX 820                   

     X - MENU #1
     Y - MODIFY PREVIOUS INSTALLATION
     Z - USER SUPPLIED TERMINAL COMMANDS

SELECT TERMINAL TYPE: J

CHANGE MACRO, DATE, ETC. (Y/N)? N

TYPE "Y" TO SAVE, ANY OTHER KEY TO ABORT INSTALL
Y
SAVING INSTALLATION PARAMETERS

B>

Running DBASE will start the application. The HELP command will display general information on the application and more details on each command. Below is a short session.

B>dbase

ENTER TODAYS DATE  OR RETURN FOR NONE 
 (MM/DD/YY) :04/19/14

Copyright (C) 1982 RSP Inc.

***  dBASE II     Ver 2.4  1 April, 1983

 Type 'HELP', 'HELP dBASE', or a command  

. help dbase

       HELP TEXT FILE DBASEMSG.TXT VERSION 1.12 FOR dBASE II v2.4
                Copyright 1983 Ashton-Tate and RSP, Inc.

        written by Wayne Ratliff, Jim Taylor, and Howard Dickler

                         INTRODUCTION
     
     This entry is intended to give you on-line information about your dBASE 
II  Database  Management  System.   It  explains the  disk  files  you  have 
received,  and  gives suggestions on tapping the power now available to  you 
for  data  management.   Using  the on-line HELP in  conjunction  with  your 
Manual,   you will soon be creating databases and writing command procedures 
to do your work. 

                    >>>>> type any key to continue <<<<<
WAITING 

                       HOW TO USE THE 'HELP' FACILITY

     Information about your dBASE  II  system can be obtained by typing 
HELP and any of the following key words: (e.g. HELP NEW )

          UTILITIES      FULL-SCREEN    LIMITS    BACKUP  
          INSTALL        NEW            ERRORS    CP/M
          EXAMPLES       FUNCTIONS      DBASE     HELP       RUNTIME
               (or any dBASE II command)

     dBASE will then look up the entry for the key word and display it.   If 
there is no information on the subject then dBASE will say "NO HELP MESSAGES 
FOUND".   When there is more text to display beyond what's shown,  then  you 
will see the word 

WAITING  (like this)

                   >>>>>  type any key to continue. <<<<<

WAITING 

. list
NO DATABASE FILE IN USE, ENTER FILENAME: invent.dbf

00001  123456 QUIRKY LITTLE QWARK     99.00   230.00   23  100 
00002  258741 PORTABLE POOL          450.00   999.99   20   40 
00003  258963 ELEPHANT COLLAR          3.00    15.00    3   10 
00004  123345 HOUSE WRAPPER           45.00   100.00  200  100 

. display structure

STRUCTURE FOR FILE:  B:INVENT  .DBF
NUMBER OF RECORDS:   00004
DATE OF LAST UPDATE: 03/09/83
PRIMARY USE DATABASE
FLD       NAME      TYPE WIDTH   DEC
001     PRD:NMBR     C    006          
002     PRD:DESC     C    020          
003     PRD:COST     N    007    002   
004     PRD:PRIC     N    007    002   
005     ONHAND       N    003          
006     ONORDR       N    003          
** TOTAL **             00047

. list

00001  123456 QUIRKY LITTLE QWARK     99.00   230.00   23  100 
00002  258741 PORTABLE POOL          450.00   999.99   20   40 
00003  258963 ELEPHANT COLLAR          3.00    15.00    3   10 
00004  123345 HOUSE WRAPPER           45.00   100.00  200  100 
00005  998783 My widget               13.99    24.50   10   99 
00006  988765 Brand new car            0.00     0.00    1  999 

. quit
*** END RUN     dBASE II     ***

Thw screen shot below shows adding new a database record in full screen mode with the APPEND command.



dBASE was quite innovative for its time and was one of the "killer applications" that drove the adoption of early microcomputers for business use. You can learn more from this Wikipedia article. The company behind dBASE is still in business and can be found at dbase.com.

Friday, April 18, 2014

Book Review - The WOZPAK Special Edition

A great book for fans of the early Apples. A bit of everything - some history, software listings, and hardware mods and information. Some material is available elsewhere but there is nothing like having it all in hardcopy in a single volume. The original Apple monitor listing handwritten by Woz - it doesn't get better than this!

It's quite a big book at 8.5" x 11" and over 350 pages, and the binding and print quality is good. Highly recommended for anyone who is interested in the Apple 1 and 2 series or early microcomputers and the 6502 microprocessor.

More information can be found here:

  1. http://wozpak.callapple.org/
  2. http://www.lulu.com/shop/bill-martens-and-brian-wiser/the-wozpak-special-edition-steve-wozniaks-apple-1-apple-computers/paperback/product-21145348.html

Thursday, April 17, 2014

Book Review - Collectible Microcomputers

Collectible Microcomputers by Michael Nadeau
160 pages, published by Schiffer Publishing Ltd, 2002.

I recently bought a new copy of this book. It has been out for some time, but is still relevant if you are interested in old computers.

The book has information and hundreds of pictures of old microcomputers, ranging from the early days of the Apple 1, Altair, and CP/M machines, through to the 8-bit era of Commodores and Apple ][ series, up to the early IBM PC and compatibles. It even covers some rarities like the Hyperion portable which was developed here in Ottawa, Canada.

Reading the book was a trip through memory lane for me, seeing computers that I had used in the past as well as many that I had only heard of.

I was struck by a few things as I looked over the book. First, I don't think many people realize how expensive some of these early computers were when new. For example, the NeXtcube sold for $11,495 in 1990; that's over $20,000 today. In many cases there was little or no commercial software available - you had to write it yourself. You had to be very forward thinking and perhaps a little crazy to invest in something that expensive. No wonder that so many of the early users seemed to be medical doctors.

Second, there used to be a huge variety in computers as far as appearance and operating systems offered. Something was definitely lost when the world moved to the majority of desktops being boring IBM PC compatibles.

Finally, if the price guide is accurate, the value of old collectible computers has soared since this book was published in 2002. The Apple //e, for example, is valued at $2 to $45. With the advent of eBay they now routinely go for hundreds of dollars. The Apple 1 is valued at $12K to $25K, but units have now sold at auction for over $200K.

The book does not have room for detailed specs on each computer, but covers a lot of machines and has some historical material on most of the manufacturers.

It is available, new or used, on amazon.com.

Wednesday, April 16, 2014

My Text Adventure Game Running on CP/M

After a couple more hours of work and I have my Abandoned Farmhouse text adventure game ported to CP/M using the BDS C compiler. The changes were similar to those needed for the Yum game, and included some changes for the available string functions and initialization of some large arrays.

I haven't played the game to completion but it seems to be working well. You can find source code and a CP/M binary here.

Below is a transcript of playing a short game.


B>advent
                      Abandoned Farmhouse Adventure
                            By Jeff Tranter

Your four-year-old grandson has gone missing and was last seen headed in the
direction of the abandoned family farm. It's a dangerous place to play. You
have to find him before he gets hurt, and it will be getting dark soon...

? help
Valid Commands:
Go east/west/north/south/up/down
Look
Use object
Examine object
Take object
Drop object
Inventory
Help
Quit
You can abbreviate commands and directions to the first letter.
Type just the first letter of a direction to move.
? i
You are carrying:
  flashlight
? l
You are at the door to the house.
You see:
  key
  bottle
You can go: east west
? drop flashlight
Dropped flashlight.
? t key
Took key.
? t bottle
Took bottle.
? n
You can't go north from here.
? l
You are at the door to the house.
You see:
  flashlight
You can go: east west
? w
You are in the kitchen.
? l
You are in the kitchen.
You see:
  candybar
You can go: south east down
? t candybar
Took candybar.
? w
You can't go west from here.
? l
You are in the kitchen.
You see:
  nothing special
You can go: south east down
? s
You are in the dining room.
? l
You are in the dining room.
You see:
  stale meat
You can go: north west
? u stale meat
The meat looked and tasted bad. You feel very sick and pass out.
Game over after 7 turns.
Do you want to play again (y/n)? n

B>

Tuesday, April 15, 2014

Yum Game ported to BDS C

I've been playing some more with the Briel Altair 8800 running CP/M.

As a larger test of the BDS C compiler I was able to port the "Yum" game that I originally wrote to run on the Briel Apple Replica 1.

Porting it to BDS C was a few hours of work (mostly spent transferring new versions of the code between my Linux desktop and SD card and compiling on the Altair 8800.

The changes required were not too major. I was impressed by the reasonably complete run-time library included with BDS C. In all, the changes I had to make were the following:

  • Includes changed (BDSC C has everything in stdio.h).
  • sizeof does not work for arrays, so used a constant.
  • Arrays cannot be initialized, but can use initptr() function instead.
  • No bool type, so use int.
  • Function declarations have to use old K&R format.
  • Text supports lower case (original Apple 1 version had to be upper case only).
  • Some text lines (like help) made wider due to 80 column screen.
  • Variables cannot be initialized when declared.
  • No strtol() so use atoi().
  • Remove const qualifiers.
  • Clear screen using ANSI escape sequence.

Below is a partial log of a session playing the game against the computer.



#     # #     # #     #
 #   #  #     # ##   ##
  # #   #     # # # # #
   #    #     # #  #  #
   #    #     # #     #
   #    #     # #     #
   #     #####  #     #


Welcome to Yum!
Do you want instructions (y/n) ? y

This is a computer version of the game Yum, similar to games known as Yahtzee,
Yacht and Generala. Each player rolls five dice up to three times and then
applies the dice toward a category to claim points. The game has 12 rounds
during which each player attempts to claim the most points in each category.

The winner is the person scoring the most points at the end of the game.
This version supports up to three players of which any can be human or
computer players.

Categories are as follows:
1'S through 6'S - dice of same type
Low Straight (15) - 1 2 3 4 5
High Straight (20) - 2 3 4 5 6
Low Score - total 21 or more
High Score - total 22 or more
Full House (25) - 3 of a kind and pair
Yum (30) - 5 dice the same
Bonus of 25 points if upper section is 63 or more.

How many human players (0-3)? 1
How many computer players (0-2)? 1
Name of player 1? Jeff
Press to start the game
Wait a few seconds, and type a CR: 

Jeff's turn. Press to roll 
First roll is: 2 2 2 4 5
Enter dice to roll again or D for dice or S for score: 4 5
Second roll is: 2 2 2 2 2
Enter dice to roll again or D for dice or S for score: 

 1  - 1'S
 2  - 2'S
 3  - 3'S
 4  - 4'S
 5  - 5'S
 6  - 6'S
 9  - Low Straight
10  - High Straight
11  - Low Score
12  - High Score
13  - Full House
14  - Yum

Jeff, What category do you want to claim? (1-14)? 14

Altair's turn. Press to roll 
First roll is: 1 1 4 4 5
Altair keeps: 1 1 4 4
Second roll is: 1 1 4 4 5
Altair keeps: 1 1 4 4
Last roll is: 1 1 2 4 4
Altair plays 1'S

Press to continue 

Score after 1 of 12 rounds:

Roll           Jeff    Altair  
1'S                    2       
2'S                            
3'S                            
4'S                            
5'S                            
6'S                            
Sub-total      0       2       
Bonus          0       0       
Low Straight                   
High Straight                  
Low Score                      
High Score                     
Full House                     
Yum            30              
Total          30      2       

Press to continue 

Jeff's turn. Press to roll 
First roll is: 1 2 2 6 6
Enter dice to roll again or D for dice or S for score: 1
Second roll is: 2 2 4 6 6
Enter dice to roll again or D for dice or S for score: 4
Last roll is: 2 2 6 6 6

 1  - 1'S
 2  - 2'S
 3  - 3'S
 4  - 4'S
 5  - 5'S
 6  - 6'S
 9  - Low Straight
10  - High Straight
11  - Low Score
12  - High Score
13  - Full House

Jeff, What category do you want to claim? (1-14)? 13

Altair's turn. Press to roll 
First roll is: 2 4 4 6 6
Altair keeps: 4 4 6 6
Second roll is: 4 4 4 6 6
Altair keeps: 4 4 4 6 6
Altair plays Full House

Press to continue 

Score after 2 of 12 rounds:

Roll           Jeff    Altair  
1'S                    2       
2'S                            
3'S                            
4'S                            
5'S                            
6'S                            
Sub-total      0       2       
Bonus          0       0       
Low Straight                   
High Straight                  
Low Score                      
High Score                     
Full House     25      25      
Yum            30              
Total          55      27      

Press to continue


I put the source code as well as a CP/M binary here on github.  Next, I plan to try porting my text adventure game.