Brand: | Radio Shack |
Model: | TRS-80 PC-2 |
Type: | BASIC-programmable Pocket Computer |
Picture: | |
Batteries: | AA x 4 |
Lifetime: |
Introduced: 1982 Terminated: 1985 |
Notes: |
This is TANDY / Radio Shack’s version of the SHARP PC-1500A. It’s not an exact copy of
the PC-1500A, its looks and keyboard
layout are different. In my opinion the PC-2 is better looking but functionally they
are the same.
This Pocket Computer can be used for direct input calculations, BASIC programming and machine language. The machine language part was excellently documented in articles provided by TANDY’s Bruce Elliot and partly in the Technical Reference Manual. Later there was even a complete and documented disassembly of the Pocket Computer’s ROM. The Pocket Computer has various modes. PRO mode for entering, listing and editing BASIC programs. RESERVE mode (Shift-MODE) to define function keys and RUN mode for direct calculations and other operations. Direct input lines can be edited by pressing the back arrow to edit them. |
Introduction: | When I was still in high school there was a TANDY shop in a nearby shopping centre. I was a (very) regular customer there. Buying sachets of assorted LEDs, accessories for my (not so legal) radio hobby, and enjoying the TANDY Catalogue. One day I saw the Radio Shack PC-1 there. I was intrigued but when I found out it didn’t support POKE, PEEK and CALL, my interest waned. Then came along the PC-2 which did, and I just had to have one. Took some work convincing my father but finally I could buy the PC-2 together with the CE-150 pen plotter. That was in 1984. |
LeoBAS: |
When used the way it was meant to be used this Pocket Computer is
powerful enough but machine programming really set it free. During the
1986 - 1994 period I programmed my own
set of BASIC extensions and new functionality which I named LeoBAS.
One of the first programs I wrote for that purpose was a BASIC program to visually browse through the memory per 16 bytes displaying its ASCII content and with the ability to POKE memory locations easily. I dubbed this program ZAP (DEF-Z). Using ZAP I tried to understand the PC-2’s memory mapping and when I found it its BASIC command table. The memory map would be different when a peripheral was attached such as the CE-150. Its memory block started with the ASCII character "U" which indicated to the calculator there was a BASIC command block located. This meant that one could extend this calculator’s BASIC command set onseselves! It took a big amount of time I was actually meant to do school work but in the end I managed to write my own set of BASIC commands. First in memory block &6800 - &6FFF. How I got memory available in that memory area I do not remember. Later I created my own memory extension &8000 - &9FFFF using a modified ATARI CMOS RAM module bought at the Dutch SHACC user club, soldering it in place using a memory select chip and many unlabeled wires. I now do not dare open up my PC-2 anymore in fear of breaking stuff. In the end I wrote three BASIC command blocks seriously making my Pocket Computer more powerful. This set, which I called LeoBAS because my aforementioned illegal radio station at the time was called "Radio Leonardo", used memory block &8800 - &9FFF in !PV mode so it can not be used unless the PC-2 has been modified to support that memory block. Something like the TE-1507 (link validated 2024-01-13) might work but I’m not sure their project is still alive. It is not possible to modify a regular RAM module to chip-select in this memory block because the chip-select lines required are not available on the connector. My own LeoBAS BASIC command extension includes a new keyboard routine with auto-repeat and extra function keys. It has an alternative set with 128 new characters and new lower case characters because I didn’t like the original set for I found it unbalanced. It has many extra alphanumeric symbols, and all of these could be plotted using the CE-150 pen plotter as well. Shown here is the result of plotting them using the PockEmul emulator. There are many handy new BASIC commands for BASE-n operations, plus handy commands for graphical functions. See the downloadable manual below. The final version of my own set of BASIC command additions uses memory block &8800 - &9FFF bank switched on !PV. For those interested in experimenting, the block can be downloaded here: Download link (revision 20241204) > LeoBAS. Free to use, but use at your own risk of course. Needs the newer A04 ROM version on the PC-2/PC-1500A. I have already made some changes to the original 1994 revision of LeoBAS. I have fixed one bug, and I have changed the shape of the LeoBAS lower case "f" character which I found was still unbalanced. There were also errors in the table for plotting the LeoBAS character set, also fixed now. Late 2022 I created a revised manual, in English, covering all of LeoBAS. Last changed on 2024-12-05. Its current, sixth, revision can be found here: View in new window > LeoBAS Manual 2024. Download link > LeoBAS Manual 2024. The original manual I wrote (in Dutch, it covers only the first memory block &9800 - &9FFF, and please note the postal address at the end of the manual is no longer valid) can be found here: View in new window > LeoBAS Manual 1996. Download link > LeoBAS Manual 1996. |
SHACC: |
SHACC (SHARP HAnd Computer Club) was a Dutch user club dedicated
to all of SHARP’s Pocket Computers. It had quite a dedicated
user base, club meetings with buns and coffee and loads of Pocket
Computers and peripherals, and AREAD, the club’s magazine.
The club had activities from 1983 but stopped in 1985 due to
waning interest. Some more info on SHACC and the
AREAD magazine can be found here: PC-1500.info, SHARP clubs : AREAD/SHACC from the
Netherlands (link validated 2024-12-11). The download links on that
site are no longer functional. The magazines can however still be downloaded
from this archive.org version of the page (link validated 2024-12-11)
There is a small article by me on the pen plotter in the second SHACC of 1985. According to my diary I actually sold one license for LeoBAS to a SHACC visitor for ƒ 50 on February 1, 1986, partly spending the profit later that day on a pizza quattro stagioni at my very first visit to La Fontana (link validated 2024-12-10) in Eindhoven. |
Emulator: |
In the period 1989 - 1994 I wrote an
emulator for the PC-2 on my Mac
Plus, in THINK Pascal. Earlier in my life I had an Apple ][
clone without keyboard and used my PC-2 with a special machine code program
as a keyboard for the Apple ][. It
was therefore very easy to make a dump of my PC-2’s ROM and my own LeoBAS ROM to
a file which I could then transfer to my Mac Plus: I simply
had my PC-2 type its own memory dump
into a file on my Apple ][!
It took quite some time and fine tuning and I wrote it as a Desk Accessory to make multi-tasking less work. The emulation of the processor was not difficult thanks to all the documentation. I used the 16 bit lower part of pointers to access the emulated memory easily. I still have all my THINK Pascal sources and all the project files, running in SheepShaver, on my modern Mac. To get the emulator working at a reasonable speed on the Mac Plus I used some nice tricks. To emulate PC-2 registers and pointers I used the lower two bytes of 32-bit registers of the MC68000. To accomplish that I allocated a memory block big enough to fit the PC-2 memory starting at an address with a 32-bit pointer with two zero lower bytes. Another nice trick (IMHO) was that I didn’t want to draw all pixels and indicaters using difficult code. Instead I created a custom built FONT for the indicators but also for the upper and lower halves of the LCD (due to how it is laid out in the PC-2’s memory). One simple print command to visualize the dot matrix display! This is a picture of my emulator running in SheepShaver, a Mac OS 9 emulator, showing the aforementioned ZAP program displaying the memory contents at &9800. Note the non-standard characters part of LeoBAS. It also runs under UTM on Macs with Apple Silicon. Here it is displaying my revised set of lower-case characters. I really wanted to publish my emulator at the time but did not dare to, due to the emulator containing the original SHARP ROM code. I didn’t even dare to use brand names, so mine is called the Radio Shock TRaSh-80. |
PockEmul: |
I am still quite proud of what I was able to accomplish with
my own emulator. After Mac OS 9 died I have not tried to
create a modern version of it which is a pity but today we
have PockEmul (link validated 2024-12-11)!
Compared to PockEmul’s excellent emulator(s) mine was
quite rudimentary with no support for peripherals and only
rudimentary support for bank switching.
Since PockEmul version 2.9.0 it is possible to run LeoBAS in the emulator. Rémy Rouvin introduced a custom memory module CE-15x that provides user memory in spaces normally reserved for externally connected modules. It can even be used to override the system ROM with a custom ROM version! The latter is useful because the PC-2 (and SHARP PC-1500A) in PockEmul 2.9.0 use an older ROM version. LeoBAS requires ROM version A04. The new version of the ROM is included since PockEmul version 2.9.1 so loading LeoBAS in there is trivial. See the latest LeoBAS manual for instructions how to use LeoBAS in PockEmul 2.9.0 and later. |
A true pocket computer: |
So, by using PockEmul on my iPhone I can now finally have a PC-2 with LeoBAS right in my pocket for real, using PockEmul’s iOS App! Thanks, Rémy! |
©2024 Ernst Mulder