#1 Post by lkraemer » 2023-01-28 10:00
HOWTO: SDLTRS - TRS-80 Model 1, 3, & 4 Emulator - Debian 11 - 64 Bit
This HOWTO: will guide you through the process of downloading, compiling, and getting SDLTRS version 1.2.25
of the Radio Shack TRS-80 Model 1, 3, & 4 EMULATOR running in Debian 11.0 "Bullseye".
PREWORK:
Debian (Versions 8 thru 11) Linux can be used to create TRS-80 Boot floppy's, if you know the Sector Size
and the Number of Sectors per Track. Debian (ver 8-11) still supports Floppy Drives if the FDUTILS, and
MTOOLS Packages are installed.
FDUTILS Ver 5.6-2
MTOOLS Ver 4.0.26-1
For Linux you must have the proper permissions to access the Floppy Hardware. You can use the groups
command to determine who has permission to use the floppy hardware (/dev/fd0 & /dev/fd1).
Code: Select all
$ groups
larry tty lp dialout cdrom floppy sudo audio dip video plugdev netdev bluetooth lpadmin scanner
Code: Select all
$ ls -alt /dev/fd0
ls: cannot access '/dev/fd0': No such file or directory
Code: Select all
$ sudo adduser username disk
CONNECTING FLOPPY DRIVE(s)
All of the Floppy drives are typically shipped strapped from the Manufacture, ready to be inserted into
a Computer case as DS1. (Unless someone is selling on ebay, and has changed the jumpers from DEFAULT.)
To connect to your Motherboards you just need a cable that has the IBM twisted connectors for the last
floppy connector on the cable having conductors 10 thru 16 twisted. One end of the cable goes to the
Motherboard, and middle connector is for Drive 1 (in a DS{0..3} configuration) and the end connector on
the cable is Drive 0 (in a DS{0..3} configuration). The Floppy at the End of the cable ALWAYS has the
TERMINATOR located on the Drive. (Note: if using 1.2M or 1.44M floppy's they already have the necessary
PULL-UP resistor installed so the Terminator resistors are not required.) Plug the floppy onto the end
of the cable in the DS0 position (although the drive will be strapped for DS1). In fact both floppy drives
(if used) will be strapped as DS1.
You need is to connect the Power connector to the drive, attach the first Floppy Drive to the end of the
cable and double check that the floppy was strapped for Drive select 1 (DS1) in a DS{0..3} configuration.
The Floppy drive may have designations 1 to 4 versus 0 to 3 as in DS{1..4}. In this case the second floppy
would be DS2 in a DS{1..4} configuration.
After that you power up and make sure the BIOS is properly set for the type floppy 360K, 1.2M, 720K, 1.44M.
When you boot the floppy should turn on the LED and step the floppy to determine if it is a 48 TPI or 96 TPI
unit (40 or 80 Tracks). An error message pops up if the BIOS is set incorrectly.
Linux lets you write a variety of floppy types as determined by the /etc/mediaprm file.
In this example I am wanting to write a Boot Floppy for the Radio Shack TRS-80 Model 3 with SDLTRS. The floppy
Drive is a SS/DD 48 tpi 5.25". This definition is already defined in the /etc/mediaprm file:
Code: Select all
"LNW180":
SS DD sect=18 ssize=256
I INSERT a Blank Floppy in Drive A = /dev/fd0 (for next commands)
Code: Select all
$ lsblk
Code: Select all
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk <---------------- This floppy Drive
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 117.2G 0 part /
├─sda2 8:2 0 24.4G 0 part
├─sda3 8:3 0 321.7G 0 part
└─sda4 8:4 0 2.5G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
Code: Select all
$ sudo setfdprm -p /dev/fd0 LNW180
Verify that the parameters are correct with:
Code: Select all
$ sudo getfdprm
Code: Select all
SS DD sect=18 ssize=256
Code: Select all
$ lsblk
Code: Select all
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 180K 0 disk <---------------- This floppy Drive now has correct parameters
sda 8:0 0 465.8G 0 disk
├─sda1 8:1 0 117.2G 0 part /
├─sda2 8:2 0 24.4G 0 part
├─sda3 8:3 0 321.7G 0 part
└─sda4 8:4 0 2.5G 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
Now, Format the Floppy:
Code: Select all
$ sudo superformat /dev/fd0 LNW180
SOFTWARE INSTALL:
Download the Source code for Version 1.2.25 from Jens Guenther's Gitlab site.
https://gitlab.com/jengun/sdltrs
Download, then Extract the SDL-MASTER.ZIP file to your SDLTRS subdirectory. (TRS-80 ROM Files are not included!)
Typically you need to install build-essential and the headers for the
kernel you are running, if you are going to compile code.
Code: Select all
uname -r
Code: Select all
sudo apt install build-essential linux-headers-$(uname -r)
TYPICAL COMPILE STEPS: (from within your source directory)
Code: Select all
./configure
make clean
make
sudo make install
removes the Bin file from the source subdirectory.
COMPILE sdltrs FROM SOURCE:
1. Install the following Library Files needed for the Compile:
Code: Select all
sudo apt install libsdl1.2-dev, libreadline-dev, autoconfig, automake, mtools, fdutils
2. Compile & Install:
Code: Select all
cd ~/path/to/your/SDLTRS/sdltrs-master/
------------------------
From the main directory, execute:
Code: Select all
./autogen.sh <----------------
"autoconf" and "automake" is needed for this.
To enable "readline" support for the zbx debugger, execute:
Code: Select all
./configure --enable-readline <----------------
From the "src" directory, execute:
Code: Select all
make <----------------
sudo make install <----------------
Code: Select all
which sdltrs
/usr/local/bin/sdltrs
SETUP FOR RUNNING sdltrs:
1. Remove any previous Symbolic linked files (if previously used):
NOTE:
Model 1 files will be disk1-0, disk1-1, disk1-2, disk1-3
Model 3 files will be disk3-0, disk3-1, disk3-2, disk3-3
Model 4 files will be disk4-0, disk4-1, disk4-2, disk4-3
And physical floppy drives can be used via Symbolic linking.
Code: Select all
cd ~/path/to/SDLTRS/sdltrs-master/diskimages/
sudo rm disk?-0 #AS NEEDED for Model 1, 3, 4, 4P
sudo rm disk?-1 #AS NEEDED for Model 1, 3, 4, 4P
sudo rm disk?-2 #AS NEEDED for Model 1, 3, 4, 4P
sudo rm disk?-3 #AS NEEDED for Model 1, 3, 4, 4P
2. Copy Model I, Model III, Model 4, and Model 4P ROM image files to ~/path/to/SDLTRS/sdltrs-master/diskimages/
Code: Select all
cd ~/path/to/SDLTRS/sdltrs-master/diskimages/
sudo cp ~/path/to/level2.rom ~/path/to/SDLTRS/sdltrs-master/diskimages/level2.rom #(Original Filename was level2.rom)
sudo cp ~/path/to/model3.rom ~path/to/SDLTRS/sdltrs-master/diskimages/model3.rom #(Original Filename was model3.rom)
sudo cp ~/path/to/model4.rom ~/path/to/SDLTRS/sdltrs-master/diskimages/model4.rom #(Original Filename was model4.rom)
sudo cp ~/path/to/model4p.rom ~/path/to/SDLTRS/sdltrs-master/diskimages/model4p.rom #(Original Filename was model4p.rom)
3. Locate the .DSK or .DMK (NEWDOS, DOSPLUS, LDOS, TRSDOS, ULTRADOS, MULTIDOS, or MONTEZUMA MICRO CP/M) OS files you will use:
(If you are using Montezuma Micro 2.31 CP/M, you may use mkdisk to reset the write protect attribute of the file, so you can use CONFIG to change
the Drive Parameters and save the settings. If you don't change the file to unprotected, you may not be able to save the parameters so the settings won't survive a reboot.) NOTE: mkdisk is included in Tim Mann's xtrs.
Code: Select all
mkdisk -u -k filename.dmk
mkdisk -u -k MMCPM231.DSK
4. Create the Symbolic Links to the files you will use, and to real TRS-80 Model 1, 3, or 4 Internal/External Drives.
There are 8 Drives available for sdltrs.
Code: Select all
ln -s ~/sdltrs_1_1_0/src/linux/MMCPM231.DSK disk4-0
ln -s ~/xtrs/Mmcpm231/MMTOOLS.DSK disk4-1
ln -s /dev/fd0 disk4-2 #THESE ARE REAL FLOPPY DRIVES
ln -s /dev/fd1 disk4-3 #THESE ARE REAL FLOPPY DRIVES
# REM
# REM Symbolic link to Image
$ ln -s ~/Downloads/SDLTRS/sdltrs-master/diskimages/TRSDIAG2.DMK disk3-0
$ ln -s ~/Downloads/SDLTRS/sdltrs-master/diskimages/TRSDIAG2.DMK disk3-1
$ ls -alt disk3*
lrwxrwxrwx 1 larry larry 66 Jan 27 14:46 disk3-0 -> /home/larry/Downloads/SDLTRS/sdltrs-master/diskimages/TRSDIAG2.DMK
lrwxrwxrwx 1 larry larry 66 Jan 27 09:25 disk3-1 -> /home/larry/Downloads/SDLTRS/sdltrs-master/diskimages/TRSDIAG2.DMK
# REM
# REM Symbolic link to /dev/fd0
$ ln -s /dev/fd0 disk3-0
$ ln -s /dev/fd1 disk3-1
# REM
# REM
this step totally if you want to set up sdltrs from the text GUI.)
You can just use the command line to execute SDLTRS, and add the necessary switches.
Code: Select all
$ sdltrs -model 1 -romfile level2.rom -disk1 /dev/fd0
$ sdltrs -model 3 -romfile3 model3.rom -disk1 /dev/fd0
$ sdltrs -model 4 -romfile3 model3.rom -disk1 /dev/fd0
or
Code: Select all
$ sdltrs -m1 -romfile level2.rom -disk1 /dev/fd0
$ sdltrs -m3 -rom model3.rom -disk1 /dev/fd0
$ sdltrs -m4 -rom model3.rom -disk1 /dev/fd0
Use the F8 Function Key to EXIT the Emulator.
Use the F11 Function Key for Turbo Mode ON/OFF Toggle for the Emulator Speed. This allows the emulator to run faster
than a real TRS80.
By default, when on, the emulator runs 5 times the speed of a normal TRS80, however, the rate is adjustable through
the text GUI, or command line/configuration file options.
Once the Emulator starts, use F7 to Double check the Model is Model 3, Disk Drive Step is Single and the Size as 5" for
all eight drives. Select the Image, or Symbolic Link for each Disk Image or Real Floppy Drive. In a Terminal Window,
if the Symbolic Links are BLACK with RED Text, that device is DISABLED or DOES NOT EXIST.
If these configuration settings should persist, then save the Configuration and Emulator Settings.
F10 Will boot these New Settings.
5. Now you have the full running Radio Shack TRS-80 with your choice of OS, assuming you know how to operate the
Old Radio Shack Model 1, 3, 4, & 4P Computers.
ENJOY!
THANK YOU TO JENS GUENTHER, TIM MANN, AND ALL WHO CONTRIBUTED!
Larry