Exploring New Environments

Author(s): Robert Hartung
Publication: Update Magazine
Pub Details: Update October 1992
Date: October 1992
Pages: 21-22

Bob Hartung, [address omitted]

ZX/SPECTRUM EMULATION

In the July UPDATE Peter Hale reported on three emulators for Sinclair computers and included letters from their developer, Carlo Delhez. The three described emulate the ZX81 and Spectrum on the QL and the ZX81 on a PC.

In early August one of the deputies at the sheriff department where I am chaplain was showing me a CD-ROM he had just acquired for his PC. Since the first computer he had ever owned was a ZX81, he brought up a ZX81 to PC emulator he had found on his disk. Then a couple weeks later the head of the computer science department at the school where my brother teaches gave me a copy of a Spectrum to PC emulator he had downloaded from a BBS to which he subscribes. Since neither of these programs showed any credits I have no way of knowing whether they are the work of Carlo Delhez or not.

Even on my relatively-slow 286-12 PC clone the Spectrum emulation is almost as fast as the Spectrum ROM on my TS2068. All commands except those intended for peripherals seem to function as they should. It gives excellent resolution and color on my VGA monitor and enables state (snapshot) saves/loads to/from my hard drive as well as the floppy drives. The system and ROM addresses are in the same virtual memory locations as in the Spectrum memory map so Z80 machine code and calls to ROM routines seem to work OK with it, including a copy of Manic Miner that was part of the BBS SW package.

On the down side, the package did not include any SW for emulating or translating the LPRINT, LLIST, or COPY commands so they can be recognized by the PC printer driver and IF. In his letters to Peter Hale, Carlo Delhez suggests that a serial IF card might be the best way to do this but indicated he probably would not be offering one.

QL SUBDIRECTORIES

In another area of exploration, I have been comparing notes with Kenton Garrett on ways to take best advantage of the 3.2Mb capacity of the ED drives he is using with his Gold Card. In effect each ED disk may be used as a small hard drive, especially if subdirectories are set up in it.

I first tried using the DIR_USE command provided in the Toolkit III supplement to Toolkit II. This allows a drive/directory path to be pre-set, such as DIR_USE flp2_quill_. As long as this drive/path is in effect, the titles of all files saved or loaded will automatically be given a prefix of the subdirectory name and all directories will display only those titles having that prefix. This works fine for SuperBasic files, for loading in files from the PSION programs such as QUILL, and when the “?” is keyed for a directory display. However, PSION data files are corrupted when saved under DIR_USE. PROG_USE and DATA_USE will not work here either.

Since I only have a Trump Card, I then tried using a new ROM chip called Flp-Level-2 that Kenton obtained for me through Merz Software in Germany. In it Jochen Hassler has adapted for the Trump Card many of the functions Tony Tebby wrote for the Gold Card ROM as well as those found on the Trump Card 1.32 and 1.37 ROMs. Because of Trump Card hardware limitations, neither it nor the TC 1.32/TC 1.37 ROMs enable the HD and ED densities provided by Gold Card, but they all allow the timing and stepping parameters to be set so as to take best advantage of newer and faster drives.

An ATR_DEV function allows direct data transfer between IBM (and Atari) and QL disks, but on my 5 1/4″ 80-track drives I cannot format disks that my PC drives will accept, even in 40-track format (which is also the case when using double-step mode in PC Conqueror). The MAKE_DIR function makes it possible to create true subdirectories but there is no corresponding DIR_USE nor the DEV_USE set of commands as provided on the Gold Card ROM to pre-define drive/ directory paths. Because of this, subdirectories may not be used with this or the TC 1.32/1.37 ROMs for programs such as QUILL, ABACUS, etc. which limit file-title input to no more than eight characters.

What to do? Actually, as long as file titles on a disk do not duplicate one another, any disk may be filled with all kinds of programs and data. By simply giving each of the respective boot routines its own distinctive title, I have all four of the PSION programs plus several other utility programs on one DD disk where one keystroke can call up the one selected from a simple menu as in the listing given below. They may all use the same printer_dat file, or else by giving each of several versions of this file its own distinctive title, then inserting a line such as COPY flp1_newname_dat TO RAM1_printer_dat ahead of the EXEC line in each boot routine, each program will have its own set of printer data to use. If RAM1 is to be accessed for printer_dat CONFIG_BAS must be used to re-direct each program to look there for system files.

The menu as given may be copied up to 26 times on a disk, with the first copy as BOOT, then succeeding copies as Bboot, Cboot . . . Zboot, which would provide for up to 936 titles to be entered in the menu string definitions. Actually, even an ED disk is unlikely to require more than two or three such menus. Put all programs with conflicting files on separate disks. Toolkit II ED or AUTO 1,1 or EDIT (line no.) may be used to define the titles of the routines which load the respective programs.

Write a one-line EXEC routine for any programs which require this command to call them up and save these to the disk also so they may be selected from the menus. By keying uppercase B through Z any of the menus may be loaded and displayed and 0-9 or a-z (lowercase) may then be keyed to select the desired program. If uppercase A is keyed from any menu it brings up the BOOT menu which is also displayed upon a powerup or a RESET with the menu disk in flp1.

BOOTmenu

1 mdrv$="1": FLP_USE flp: POKE_W 163976,0: PAPER 0: PAPER #0;7: INK #0;0: MODE 4: DIM o$(36,18): o$(1)="QUILLboot"
2 o$(2)="ABACUSboot"
3 o$(3)="ARCHIVEboot"
4 o$(4)="EASELboot"
5 o$(5)=""
6 o$(6)=""
7 o$(7)=""
8 o$(8)=""
9 o$(9)=""
10 o$(10)=""
11 o$(11)=""
12 o$(12)=""
13 o$(13)=""
14 o$(14)=""
15 o$(15)=""
16 o$(16)=""
17 o$(17)=""
18 o$(18)=""
19 o$(19)=""
20 o$(20)=""
21 o$(21)=""
22 o$(22)=""
23 o$(23)=""
24 o$(24)=""
25 o$(25)=""
26 o$(26)=""
27 o$(27)=""
28 o$(28)=""
29 o$(29)=""
30 o$(30)=""
31 o$(31)=""
32 o$(32)=""
33 o$(33)=""
34 o$(34)=""
35 o$(35)=""
36 o$(36)=""
50 FOR j=1 TO 36
60 AT j-1-18*(j>18),20*(j>18):PRINT CHR$(j+47+39*(j>10));"=";o$(j)
70 END FOR j
80 PRINT #0;" Key: ^A-Z for other menus 0-9 or a-z to LOAD file"\" £ to set:"
90 slc=CODE (INKEY$): AT #0;1,12: PRINT #0;DATE$;' ';DAY$: IF slc=0 THEN GO TO 90
100 IF slc > 64 AND slc < 91 THEN :
110 IF slc = 65 THEN LRUN "flp" & mdrv$ & "_" & "BOOT"
120 LRUN "flp" & mdrv$ & "_" & CHR$(slc) & "BOOT"
130 END IF
140 END IF
150 CLS #0
160 IF slc=96 THEN setdate: GO TO 80
170 slc=slc-47-39*(slc>57)
180 IF slc < 0 OR slc > 36 THEN GO TO 50
190 IF o$(slc)="" THEN GO TO 50
200 ld$="flp" & mdrv$ & "_" & o$(slc): LRUN ld$
210 DEFine PROCedure setdate
220 INPUT #0;'Year: ';yr;' Mo: ';mo;' Day: ';da;' Hour: ';hr;' Min: ';mn;' Sec: ';sc
230 SDATE yr,mo,da,hr,mn,sc
240 CLS #0
250 END DEFine setdate

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.