Keyboard

The Keyboard menu lets you select between Logical Layout (the default) and Physical Layout. There is also Experimental Logical Layout which is (hopefully) temporary. It is identical to Logical Layout except for a slight difference in handling shift key state to work better with a custom CP/M BIOS.

Enable ghosting for a truly authentic experience. Due to the way the keyboard matrix works on the Model 1, 3 and 4 it is possible for a 4th key to appear pressed when 3 others are down. For example, if you press and hold F, G and O in that order you will see FGN on screen as those keys ghost with N. On the Color Computer O, G, N will result in OGF showing up.

Logical Layout means that what you see on the key is what gets sent to the TRS-80. This is as you would expect but there are two things to keep in mind. None of the TRS-80 Models sport the full variety of keys on a modern PC. The Model 2 comes closest where the Model 1,3,4 machines lack even square brackets, curly braces and many others. They did, however, have some keys which have no analogue on the PC. Both had a BREAK key for interrupting programs. Models 1,3,4 had CLEAR to clear the screen. The Model 2 had HOLD to pause display. The Model 4 and 4P have a CAPS key for switching between upper and lower-case input.

To Get Model 1,3,4 Press Model 2 Press Color Computer
BREAK Esc, Pause/Break, End ctl-C, Pause/Break, End Esc, Pause/Break, End
CLEAR Home, \ n/a Home
CAPS CapsLock, PageUp n/a CapsLock
HOLD n/a ctl-shift-@, Scroll Lock n/a

Model 2, 12, 16 and 6000 have a soft capslock option activated with the -ks option or the Keyboard → Soft Capslock. It acts like capslock without using the real capslock key. It can save a lot of trouble switching between the emulator another other applications. It is remembered as a preference and will be activated automatically if you run TRSDOS on the Model 2 or 12 as it requires that all commands use upper case.

With Physical Layout the emulator is set up so TRS-80 keys are activated by PC keys in roughly the same relative position on the keyboard. Most of the symbols on your keyboard will correspond to the same key on the TRS-80. The letters, numbers, arrow keys and Enter will do what you expect and !#$%;<>,. are in the same spot, otherwise:

To GetPress
`   shift [
@ [
& shift 6
* shift -
( shift 8
) shift 9
- =
+ shift ;
= shift =
: -
' shift 7
" shift 2
Left ], Left
Right \, Right
Up `, Up
Down Tab, Down
Break Backspace, Esc, Pause/Break, End
Clear ', Home
Caps CapsLock, PageUp

Physical Layout is generally only needed for games where a key activated at a different position can make the game unplayable. Note that the Model 2 does not support Physical Layout.

Special Keys

F9 will pause and resume the emulation. You can hold F12 to make the TRS-80 run faster. Pressing shift-F12 will keep it in fast (turbo) mode without having to hold F12. Tapping F12 will put the emulator back to normal speed. The -turbo command line option has the same effect.

In turbo mode keyboard input can get very difficult with characters repeated frequently. trs80gp addresses this by dropping out of turbo mode whenever a key is pressed. This automated return to normal speed can be turned on or off by Keyboard → Auto De-Turbo menu.

Ctrl-Alt-C and Ctrl-Insert and Ctrl-Alt-V and Shift-Insert are shortcuts for "Copy" and "Paste" respectively.

Use F11 to save a screenshot and Shift-F11 to save a cleanshot which is a screenshot without any beam drop-outs that appear as they do on the real Model I.

Alt-F5 activates the machine's reset button. The Model I's reset button is not a hard reset and will not reboot the machine in the case of an especially bad crash. In that case use Ctrl-Alt-F5 to do a warm restart to reboot the emulated Model I or File → Warm Restart. Shift-Ctrl-Alt-F5 or File → Cold Restart is the same as a warm restart but it also re-initializes all RAM.

Alt-Enter will toggle between windowed and full screen mode.

Alt-F4 is the standard Windows shortcut to exit the program which may not be familiar to Wine users. For that matter Alt by itself will move focus to the menu where you can use the keyboard to navigate and Alt-F, Alt-E will active the File, Edit and View menus respectively and so on for other top-level menus.

Software Keyboard

In unusual circumstances you may need to use the Keyboard → Software Keyboard... in order to press several keys at once. Most PC keyboards can only show 3 or 4 keys held down at once but some TRS-80 games have easter eggs that require holding down as many as 8 keys. The software keyboard makes this easy as each keyboard button stays pressed when clicked and only releases when clicked again. Or if the corresponding PC key is released.

If nothing else it is laid out the same as the original TRS-80 keyboard so you can see the idea behind Physical Layout mode. And the buttons go up and down as you type. Put the software keyboard window underneath the main one and you'll feel like you're on a real TRS-80. Minutes of fun.

The software keyboard also has an orange reset button. There's also a "RAM Badge" showing how much memory is installed. Incidentally, the Model 1 and Model 4P didn't have RAM badges and the reset key was in a different location.

Automatic Input

Programs that use the standard ROM or DOS routines for keyboard can have input pushed to them through the Edit → Paste menu entry, "-i" command line flags or Edit → Paste Macro N menu entries. This doesn't work for most games and programs that use their own keyboard input routines. Still, it can be a convenient way to "fast-type" a BASIC program or run a series of TRS-DOS commands. Also note on the Model 2 that trs80gp sends the input to the keyboard hardware and TRS-DOS clears the buffer before reading each command leading to most input being lost (hence the -iw option).

For example, the following command will go into BASIC, set the top of memory to 60000 and then input and run a short BASIC program.

    trs80gp -i "BASIC\r\r60000\r10 ?7*5\rRUN\r"
On the Model 2 we must wait for the "Date" prompt to appear thus making the exercise a bit more complicated:
    trs80gp -m2 -iw Date -iy "%m/%d/%Y\r%h.%i.%s\rBASIC\r10 ?7*5\rRUN\r"
The contents of entire files can be sent using -if filename. Or input can be sent interactively with the Edit → Paste or the Ctrl-Alt-V or Shift-Insert keyboard shortcuts.

Since the characters are fed to keyboard input routines you can enter graphics characters and other data that normally can't be typed in with a real keyboard. Consider this a handy way to put graphics characters inside string literals in BASIC. Normally that requires magic incantations of VARPTR and has been the subject of countless 80 Microcomputer magazine articles.

If the TRS-80 is not calling the standard keyboard input routine then trs80gp will time-out and give up trying to send input after about one minute. Specifically, 3600 frames which is one minute at 60 Hz and one minute and 12 seconds at 50 Hz. Mind you, the emulator automatically switches to turbo mode during automated input so the real time will be less. The timeout value can be changed with the -itime N option or disabled entirely with -itime 0.

A few of the options such as -id N (wait N frames) and any which generate screenshots (-is, -ic), exit the emulator (-ix) or write to files (-it, -im) do not wait for keyboard polling and can be used to grab screenshots of games. Generally they are of most use in writing the automated tests used by trs80gp's authors. The -showframe option is useful for screenshots as it shows the current emulator frame in the title bar. Thus you needn't guess how many frames to wait before a program is ready for its screenshot.

The -ik will explicitly set individual keys in the keyboard matrix. This can be used to control games and other programs which do not use the standard ROM or DOS keyboard input routines. But you do need to know they keyboard matrix layout and carefully time the input make the whole exercise rather tedious. A better facility for entering input to games and other uncooperative programs is being considered.

The emulator automatically goes into turbo mode when processing input fed in from the command line or pasted directly into it. The speed boost is nice when pasting in BASIC source listing or other large input. It can be turned off with the -iatx on the command line or put on explicitly with -iat. Or use the Edit → Auto Turbo menu entry.

Paste Macros

The Edit → Define Macro... menu allows you to create up to 10 paste shortcuts. The strings entered can be pasted either through the Edit → Paste Macro 0 though 9 menu entires or by pressing Alt-0 though Alt-9. Each macro is automatically saved and there is a different set of macros for each TRS-80 model.

The mechanism is exactly the same as other automatic input so you can use \ escapes to enter control and graphics characters. This is particularly useful for Xenix's virtual console feature where entering \xFC followed by 0 though 9 will switch to that console. For example, to have Alt-4 switch to console 4 set up the macro to send \xFC\x34 or \xFC4 (\x hex escapes consume at most 2 digits). Also, like -iy, "%" substitutions for date and time can be used.