QPC Demo-Version

PLEASE NOTE: The QPC Demo-Version will not save to floppy or harddisk!!!!
=========================================================================


Prerequisites

QPC requires at least a PC with a 486 CPU. A 386 would be too slow and QPC
uses the extended commands of a 486. The emulator has a very tricky and
unconventional memory control, which basically enables such a fast
emulation. By this QPC is not compatible with operation system running in
protected mode such as Windows 3.xx, Windows 95, OS/2, Unix ... and with
memory managers like EMM386, QEMM etc.. QPC runs perfectly under DOS up to
version 7.0 (delivered with Windows 95) or compatible systems, but needs a
special boot process.


QPC Installation

QPC is copy protected, which leads to some specialities: QPC can always be
started from the original disk directly. You are allowed to install a
single copy of QPC on your hard disk (for safety there is a second
installation possible). QPC can be deinstalled from the hard disk, then
again an additional installation is possible from the disk. Never install
QPC on compressed harddisk partitions!

Attention: Do never remove QPC without the deinstallation program as then
one installation gets lost. Do not move or alter the QPC directory, as then
it is no longer working and the installation got lost. The SMSQE.BIN file
can only be updated on the disk. For this QPC.EXE must be deinstalled, the
new SMSQE.BIN file copied onto the disk and then QPC can be reinstalled
onto the hard disk.

The QPC installation program is widely self explanatory. The disk must not
be write protected when running the installation. Depending on how many
installations are made or available it will offer the possibility to
install and/or deinstall and ask for a path to install or find QPC. The
further installation/deinstallation runs automatically and the program
returns to the DOS prompt.


MS-DOS configuration

The installation program only copies the QPC files to your hard disk. It
can not configure DOS to run QPC, as a sufficiently intelligent program
would nearly be a greater task than QPC itself. Therefore follows a
description of how CONFIG.SYS and AUTOEXEC.BAT could like to start QPC.
Also examples for a boot disk and a boot menu are given below. A boot disk
must be formatted as a system disk, e.g. "FORMAT A: /S" or when it is
already formatted "SYS A:". Then only the CONFIG.SYS and AUTOEXEC.BAT files
must be copied to the disk.

Following an example to implement a boot menu in CONFIG.SYS and
AUTOEXEC.BAT:

Old: CONFIG.SYS

LASTDRIVE=H BUFFERS=15,0 FILES=50 STACKS=10,256
COUNTRY=049,,C:\DOS\COUNTRY.SYS PATH=C:\DOS;C:\WINDOWS
DEVICE=C:\DOS\HIMEM.SYS  DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN
DOS=UMB,HIGH DEVICEHIGH=C:\SOUND\CD\TOSHV210.SYS /D:MSCD001
INSTALLHIGH=C:\DOS\SHARE.EXE /l:100 /f:6144

Old: AUTOEXEC.BAT:

@ECHO OFF PROMPT $P$G PATH=C:\DOS;C:\WINDOWS LH C:\DOS\KEYB GR LH
C:\MOUSE\MOUSE.EXE LH C:\CD\MSCDEX.EXE /D:MSCD001 /M:12 C:\DOS\SMARTDRV /X

New: CONFIG.SYS

[MENU] MENUITEM=STA,Standard MENUITEM=QPC,QPC Emulator MENUDEFAULT=STA,10

[COMMON] LASTDRIVE=H BUFFERS=0,15 FILES=50 STACKS=10,256
COUNTRY=049,,C:\DOS\COUNTRY.SYS PATH=C:\DOS;C:\WINDOWS

[STA] DEVICE=C:\DOS\HIMEM.SYS DEVICE=C:\DOS\EMM386.EXE NOEMS HIGHSCAN
DOS=UMB,HIGH DEVICEHIGH=C:\CD\TOSHV210.SYS /D:MSCD001
INSTALLHIGH=C:\DOS\SHARE.EXE /l:100 /f:6144

[QPC] DEVICE=C:\DOS\HIMEM.SYS /INT15=4096 DEVICEHIGH=C:\CD\TOSHV210.SYS
/D:MSCD001

New: AUTOEXEC.BAT

@ECHO OFF PROMPT $P$G PATH=C:\DOS;C:\WINDOWS LH C:\DOS\KEYB GR LH
C:\MOUSE\MOUSE.EXE LH C:\CD\MSCDEX.EXE /D:MSCD001 /M:12 C:\DOS\SMARTDRV /X
GOTO %CONFIG%

:QPC CD QPC QPC

:STA


For details of the boot menu definitions please refer to your MS-DOS
manual.


Details of how the CONFIG.SYS should look like:

1. First all the standard things like

SWITCHES=/F LASTDRIVE=H COUNTRY=049,,C:\DOS\COUNTRY.SYS ...  should be
present, this shall not be treated in details here.


2. As mentioned above, QPC does not work with Windows, OS/2,.. and memory
managers like EMM386, QEMM,... , as these switch the processor from real
mode to protected mode, which is not compatible with the QPC memory
management. Nevertheless the emulator is kept compatible with HIMEM.SYS to
allow the usage of SMARTDRV or similar disk caching software. These can,
but must not be used.

e.g.DEVICE=C:\DOS\HIMEM.SYS /INT15=4096

The amount of memory at /INT15 is the size in kilobytes which shall be
reserved for QPC. This size must as large or larger than the configured
size with SMSQE. One Megabyte is 1024 Kilobytes so the figure for 3 MB is
3096... SMSQE can be set to 16 MB maximum.

Attention: Never use DOS=HIGH, as then MS-DOS is loaded into the upper
memory which refuses QPC to start.

3. In case you intend to use the CD-Audio functions of QPC, you should load
the necessary drivers for your CD-ROM.

e.g.DEVICE=C:.\CD\CDROMDRV.SYS /D:MSCD001

The driver name (here CDROMDRV.SYS) and the drive name (here MSCD001) may
be different for your system. MSCDEX can be loaded in the AUTOEXEC.BAT as
with your normal configuration, though it is not necessary with QPC. If it
is not loaded, you must specify the drive name (here MSCD001) as a
parameter with QPC.

The AUTOEXEC.BAT file might look like this:

Some quite usual things @ECHO OFF PROMPT $P$G PATH=C:\DOS;C:\WINDOWS KEYB
GR ...

If the command line interpreter COMMAND.COM is not in the root directory of
drive C:, the COMSPEC variable must be set that QPC can find it. e.g.SET
COMSPEC=C:\DOS\COMMAND.COM

To use the mouse with SMSQE, you must load a mouse driver:
e.g.C:\MOUSE\MOUSE.COM

If HIMEM.SYS was loaded in the CONFIG.SYS, SMARTDRV can be loaded here
e.g.C:\DOS\SMRTDRV.EXE /X

The parameter /X is available from DOS 6.1 and deactivates the write cache.
It is recommended to use it, as otherwise when the machine crashes data
might get lost.



Windows 95 Installation

Configuration through a boot menu:

This is quite the same as with the old DOS. If there is no CONFIG.SYS and
AUTOEXEC.BAT, you can create them. If you do not want to start Windows 95
after QPC is terminated, the BOOTGUI in the MSDOS.SYS file must be set to
0: BOOTGUI=0

Then to start Windows 95 you have to enter the command WIN. This command
must also be present in the Windows 95 section of AUTOEXEC.BAT.


Configuration through a Windows 95 PIF file:

Use the Windows Explorer to open the QPC directory. Then select the QPC.EXE
file with the right mouse button. Select Configuration and Extended. Select
MS-DOS Mode and use actual MS-DOS Configuration, then OK. In the command
line enter the drive, directory, QPC filename and QPC parameters.

e.g.D:\QPC\QPC.EXE -R

Then confirm with OK.

QPC can now be started from within Windows 95. When the QPC symbol is
double clicked, Window 95 should be terminated and restart in MS-DOS Mode
with QPC starting automatically. After QPC is terminated, Windows 95 will
restart.


QPC configuration

There are three possible ways to configure QPC:

1. The SMSQE.BIN file contains a configuration block for the standard Qjump
'Config' program. To use it, you must either have a working QL and the
possibility to access MS-DOS disks, or you must run QPC/SMSQE in the
default configuration (or using the parameters as described below) and then
run 'Config'. First copy the SMSQE.BIN file from the QPC subdirectory on
your hard disk to a floppy disk. After the configuration copy it back. On
the next start of QPC the changes will become active.

The following options are available in the Config block:

Display size: here the screen resolution can be set. Possible sizes are: QL
512x256 EGA 640x350 VGA 640x480 SVGA 800x600

Memory size (in Megs): this is the memory size in Megabytes that QPC shall
use. If the number is higher than the available size, all free PC memory is
used. Possible values are: 1 to 16 MB

If floppy disk inserted boot from: Here the boot disk drive is set. If one
is set QPC will try to find a BOOT file there first. Possible are: None A:
(FLP1) B: (FLP2)

Otherwise boot from: This option sets the hard disk boot drive. QPC will
try to find a BOOT file there if no disk is inserted (see above). Possible
drives are: WIN1 through WIN8


PAR printer port: Determines the port for the PAR device. Possible is: None
LPT1

SER1 serial port: Determines the port for SER1. Normally COM1 is connected
to IRQ4. If the mouse is connected to COM1 you must set the port to None,
otherwise the mouse is not working in SMSQ/E. Possible ports are: None
COM1/IRQ3 COM1/IRQ4 COM3/IRQ3 COM3/IRQ4

SER2 serial port: Determines the port for SER2. Normally COM2 is connected
to IRQ3. If the mouse is connected to COM2 you must set the port to None,otherwise the mouse is not working in SMSQ/E. Settings as for SER1, but
with COM2 and COM4.

Country code: Sets the default language for the keyboard layout and the
error messages. Possible values are the international telephone country
codes: 33French 44English 49German

Mode number for 800x600 graphics: The 800x600 graphics mode has never been
standardised. If you encounter problems with the quite normal Mode 106
($6A) you should set the mode according to your graphics card (look in the
manual of your card for the 16 colours 800x600 mode). If you can't find an
appropriate information, try the values 88 ($58), 41 ($29), 84 ($54), 22
($16) or 121 ($79). Please enter the decimal number (the value without a
$).

Filename for WINx: Gives a PC-filename for each WIN device. With QPC in
contrary to the QXL, which only can use the logical drives C: through J: on
the PC side to generate a QXL.WIN file, the QL hard disk partition (which
is simply a file on the PC side) can be mapped to individual file names at
any location. So you can already have WIN1 through WIN8 with only one
logical hard disk drive on your PC. Please notice that the structure of a
QXL hard disk file QXL.WIN is the same as for QPC, so any QXL.WIN can be
accessed from QPC and v.v.. Possible names are: any legal PC path and file
name Please notice that the file must either not exist (to format a new WIN
device) or be an existing WIN file!!!

2. The process of copying SMSQE.BIN to a disk and back is a little bit
complicated, so QPC offers a second way. With QPC comes a DOS PD program
CONFIG.EXE. This works like 'Config' on the SMSQ side and offers the same
configuration options, though not all Config level 1 item types are
supported. The program can be used with the QXL software too, therefore it
is public domain.

3. All options can be set as command line parameters for QPC. Possible
parameters are (instead of the hyphen '-' a slash '/' can be used too):
-R(run)this parameter starts the emulation immediately without waiting for
a key press -M:xset the memory size. X can be a value from 1 through 16
-V:xset the screen mode. X can be set to values 0 through 3: 0 is 512x256,
1 is 640x350, 2 is 640x480, 3 is 800x600 -F:xset the boot disk device.
0=None, 1=FLP1, 2=FLP2 -W:xset the hard disk boot device. X can be 1
through 8 -P:xset the printer port. 0=None, 1=LPT1 -CX:yset the SER port x
(range 1 to 4). Where y is 0 for None, 3 or 4 for the IRQ. -CC:xset the
default language. Possible values are the country codes

Example: QPC -r -v:3 -m:4 -w:2 Start QPC without waiting for a key press,
in 800x600 video mode, with 4MB RAM and  boot from WIN2.

QPC /f:2 /v:2 /c1:3 /cc:33 /p:0 Start QPC in 640x480 mode, connect SMSQE
SER1 to COM1/IRQ3 (which is not quite normal), don't use the printer port,
boot from FLP2_ if a disk is inserted and speak French.

Please notice: all other values are taken from the config block!


The QPC start-up process

After the start QPC executes some tests and initialisation routines. The
results are reported in detailed status messages. When all tests have
succeeded your computer should at least be compatible with QPC. Otherwise
numerous and detailed error messages may help to find the problem very
easily.

First the command line is evaluated. Invalid options and changes to the
screen mode and the boot device are reported. Then a processor test is
performed to assure that your processor fills the least requirements. Then
the memory management is initialised and by adding 'HIMEM.SYS' to the
message the existence of this driver is reported. If the message 'processor
already in protected mode' is reported, a memory manager or another driver
has already switched the processor from real to protected mode. In that
case you have to find (by 99% it is in CONFIG.SYS) and remove the driver.
If the message 'HMA already used' appears, either the command DOS=HIGH is
in the CONFIG.SYS or another program uses that area. So you have to find
out. The other messages are self explanatory. Now QPC deletes and checks
the upper memory. If your PC does not report an error then or crashes, the
QPC memory management should work properly. Now the interrupts are
initialised. Here no error messages are given and a system crash is quite
unlikely. Now QPC tries to find the mouse. In the worst case there simply
is no mouse or no mouse driver installed. Now SMSQE.BIN is loaded and the
memory size and screen mode is reported. After that QPC tries to locate the
COMMAND.COM file. First the COMSPEC variable is checked and if that fails,
the fail is searched in the root directory of disk C:. If it is not found,
the DOS-Shell cannot be used from within QPC. Now the ports are
initialised. For each port a message is given out. When a serial port has
the new 16550 chip instead of the old 8250, then a 'FIFO' is appended to
the message and the receive cache is initialised in a special way. Finally
the graphics adapter is preinitialised. After the key press (or directly
when the parameter -R was present) the graphics is installed and the
emulation starts.


QPC control

There are four special key combinations QPC reacts on. For safety with all
of them at least three key are involved.

SHIFT+SysReq (=SHIFT+CTRL+PrtSc): Contrary to a normal warm reset
(CTRL+ALT+SHIFT+TAB) the operating system is loaded by new and also
restarted. That is quite useful if parts of the operating system where
overwritten. The hardware is not initialised by new.

SHIFT+CTRL+ScrLock: This key combination terminates the emulation. Unlike
the QXL, which has it's own memory  and can be restarted from the actual
stage, QPC is really terminated and the memory is given up. Therefore you
should be sure to have your work on the SMSQ side really terminated, all
files closed etc.  For safety you should wait some seconds in case
something is still in the drive caches. Attention: this key combination
works only from within a working emulation. If QPC, by which reason ever,
has crashed, it doesn't work at all.

SHIFT+Break (=SHIFT+CTRL+Pause): Works the same way like the above
SHIFT+CTRL+ScrLock but is a little bit more radical. This combination
should always work if the PC is not completely crashed. QPC is terminated
as legal as possible. For safety you should restart your PC after that.
SHIFT+CTRL+ALT+SCROLL: Here the emulator is deactivated temporarily and a
DOS-Shell is started. The DOS-Shell is terminated by EXIT. Then the
emulation should continue from the point it was left off. There are some
limitations: It would be a too complicated task to save the whole status of
QPC, especially the status of the hardware. Therefore from within the
temporary DOS-Shell only programs which leave the system in the stage it
was before should be used. Also be aware of programs that use the graphics,
as it could lead to unexpected results, especially when SMSQ is in 800x600
mode. The source of the problem is then the BIOS of the graphics adapter
not QPC. Programs switching to protected mode will either not start at all,
crash or refuse to re-enter QPC. Simple actions with all DOS-commands
should normally work without any problem.



Some technical explanations

Processor emulation

- QPC emulates the complete 68000 instruction set - Nevertheless the SMSQ
identification tells it is a 68010, as if it would be a 68000 some
C-programs would test the processor type itself with the result of finding
a 68020. Then there would be the danger that these programs would try to
use some advantages of the 68020, e.g. the cache. The extensions of the
68010 are not used by any QL software. All illegal instructions and all
addressing modes are trapped. - The F-line emulator works as usual, the
A-line emulator is only used for the communication with the PC-hardware. -
Like the 68020 word and longword data can be read from and written to odd
addresses. In contrary to all 68xxx processors that is also true for all
processor instructions. A permanent control of odd addresses would slow
down the emulation too much.


Screen emulation

- Instead of emulating the 512x256 mode by slow software, the VGA hardware
is set to this PC-untypical resolution. The visible screen area is 640x350,
only the screen memory is manipulated accordingly. This is tested on many
graphics adapters and never did lead to a problem. - The 800x600 mode
unfortunately has never been standardised in the PC-world. The used 06Ah
mode should normally work. For safety it is configurable. - Only one screen
page is supported. - The screen is not actualised periodically. QPC checks
any write access for screen operations. This is not true for instructions
which access the stack explicitly (JSR, BSR, PEA ...). - The hardware
register at address $18063 is also actualised, but will only be checked on
special demand.


Real time clock

The clock is emulated by re-programming the RTC-chip of your PC. The time
used for this operation (some milliseconds each second) can be neglected.
Unfortunately some Laptops seem to have a problem: if the computer switches
to standby or another energy save mode, the clock can not be refreshed any
more and restarts only when the system is woken. To adjust such problems,
any 3 minutes the SMSQ clock is reset to the PC clock.




QPC Display


DISP_TYPE

The DISP_TYPE function is used to find the type of display. For QPC, this
is an emulation of the standard QL display so DISP_TYPE always returns 0.

if DISP_TYPE : PRINT "This is not a QL display"


DISP_SIZE

DISP_SIZE (xpixels, ylines) is used to set the display size. The nearest
feasable size will be selected by the driver. It is best not to change the
display size when the pointer sprite is visible, or you may get some
spurious blobs left on the display. There should be few other problems
changing from a smaller size to a larger size. You should, however, avoid
changing from a larger size to a smaller if there are any windows outside
the smaller screen. Values that are well out of range are ignored.

DISP_SIZE 800,600change to 800x600 (SVGA) DISP_SIZE 1ignored.


Serial (COM) Ports on the PC

Unlike the basic SMSQ serial port drivers, the SMSQ/E serial port drivers
are dynamically buffered. There is, therefore, no need to use the PRT
device.

The Baud rates supported by SMSQ/E on QPC are 57600 38400 19200 9600 4800
2400 1200 600 300

If one of the ports is already committed to a mouse, the BAUD command will
not affect it.

BAUD 19200set both ports to 19200 BAUD 2,1200reset SER2 to 1200 baud


PC Printer Port

The PAR device drives the PC printer port. By default, output is
dynamically buffered: the PRT device is not required.


PC Floppy Disks

SMSQ/E accesses the PC floppy disks via the BIOS calls. This, although it
allows almost any PC to be used as a host for the QXL, is dependent on the
efficiency of your BIOS. The efficiency can usually be greatly improved by
using one of the public domain BIOS level cache utilities that are
available for the PC.


Floppy Disk Driver Name

The default name of the floppy disk driver is FLP. A: is FLP1 and B: is
FLP2.


FLP_USE

FLP_USE may be used to set the name of the FLP device. The name should be 3
characters long and in upper or lower case.

FLP_USE mdvThe FLP device is renamed MDV FLP_USE FLPThe FLP device is
restored to FLP FLP_USEThe FLP device is restored to FLP



PC Hard Disks

SMSQ/E accesses the PC hard disks via the PCDOS calls (the BIOS calls do
not appear to work). This, requires a file (called QXL.WIN) to be set up in
the ROOT directory of any hard disk you wish to use as a QDOS format disk.
This file is the QDOS format disk.


Hard Disk Driver Name

The default name of the hard disk driver is WIN. C:QXL.WIN is WIN1, and
D:QXL.WIN is WIN2 etc.


WIN_USE

WIN_USE may be used to set the name of the WIN device. The name should be 3
characters long and in upper or lower case.

WIN_USE mdvThe WIN device is renamed MDV WIN_USE WINThe WIN device is
restored to WIN WIN_USEThe WIN device is restored to WIN



QPC Troubleshooting

Mouse and/or serial port does not work Please note that the COM-device to
which the mouse is connected has to be configured to "none" in SMSQ/E.
Also, make sure that the interrupt which is used by the mouse is not used
by any serial port (i.e. if the mouse uses INT4, neither SER1 nor SER2 must
use INT4!).

The installed version of QPC tells me it is an invalid copy QPC must not be
installed on compressed partitions - it will not be detected as a legal
installation here! If the partition on which you want to install QPC has
been treated by Stacker, DoubleSpace or similar utilities, choose a
different partition.
