Using uQLx on Windows 10

Discussion and advice about emulating the QL on other machines.
User avatar
ql_freak
Trump Card
Posts: 175
Joined: Sun Jan 18, 2015 1:29 am

Using uQLx on Windows 10

Postby ql_freak » Thu May 18, 2017 12:09 am

First you must install WSL (Windows Subsystem for Linux) also called "Bash on Ubuntu on Windows".

Then you can open a command line in Windows and enter "bash", afterwards you have a fully functional "bash" on Windows, without the need to install e.g. CygWin or similar. Unfortunately this isn't enough to run X11 applications as e.g. uQLx. You must install a X11 server application on Windows. I have used Xming, which is really easy to install (as far as I can remember I have just used the defaults). Before starting uQLx you must start the Xming server. Then (on my machine) I can start uQLx (resolution 1024x768) with:

Code: Select all

username@qclub:/mnt/d/uqlx$ ./qm -b "LRUN'WIN1_boot'" -z 1 -g1024X768
^^^^^^^^^^^^^^^^^^^^^^^^^^^-bash-prompt

Of course you need (as in a normal UNIX/Linux) a directory "romdir" below the uqlx directory, where the ROM images must be stored.

Here is my .uqlxrc-file with a lot of comments, so that you should be able to set up uQLx on Windows 10 (the TK2-archive tk231_respr.zip may be found on Marcels [QPC2] homepage [AFAIK in his BLOG], sorry too lazy to look for the link:):

Code: Select all

# .uqlxrc file for Sinclair QL emulator uQLx on Windows with WSL.
# First: It runs (you must install an X-Server, e.g. Xming of course),
# but there are some quirks, see below.
#
# A   S E R I O U S   W A R N I N G :
# NEVER EVER use Windows programs (File Explorer, command line, editors, ...)
# to touch the directories where WSL holds its files! THIS DOES NOT WORK,
# and not just because of the different line ending. WSL DOES NOT RECOGNIZE
# files which have ben touched with Windows tools. Especially don't edit
# .uqlxrc (this file) with a Windows Editor(!). WSL comes with the wonderfully
# vi/vim preinstalled, you need no other editor (OK I was kidding). I use joe,
# which has WordStar compatible key bindings. Type joe in bash and you get a
# hint what to enter to install joe (it's really easy).
#
#ROMDIR = /home/<user>/uqlx/romdir/
#SYSROM = js_rom
SYSROM = min198.rom
# Don't install this TK2-ROM, instead load inside uQLx the newer
# tk231_respr.zip with the usual:
# a=RESPR(16574):LBYTES"WIN1_subdirectory_TK231_bin":CALL a
# This newer version from Marcel Kilgus (author of QPC2 and currently
# the maintainer of SMS/SMSQ) has a lot of functions of newer Toolkit 2
# functions which were delivered on newer devices (like SuperGold Card)
# in ROM. Especially it has the MAKE_DIR command (but see below for
# QXL.WIN files) :-)
# ROMIM = TKII220.rom,0xc000
RAMTOP = 8192
# Printing not tested:
PRINT = lpr
CPU_HOG = 0
#XKEY_ALT = Mode_switch   # use this to have AltGr as QDOS altkey
# Currently drives/directories from Host cannot be accessed with
# uQLx on WSL (Windows Subsystem for Linux) - at least I didn't succeed:
# But luckily we are on Windows we can create Subdirs with the QPC2 emulator
# DEVICE = WIN1,/home/<user>/uqlx/uqlx.win,qdos-fs
# But uQLx supports QXL.WIN files. Not working on QLX.WIN-Files:
# - Creating directories. Existing directories may be read, also write is
#   working, but I have had already a loss. But as you cannot currently access
#   the host file system, you have no alternative than using a QXL.WIN-file.
# - IO.RENAME
# - overwrite mode from IO.OPEN - most programs come around this, as original
#   QLs (without TK2) also didn't support overwrite on Microdrives and delete
#   the file first and OPEN it afterwards new for writing.
DEVICE = WIN1,/mnt/d/uqlx/uqlxhps1.win,qdos-fs
DEVICE = WIN4,/mnt/d/uqlx/uqlxhps1BAK.win,qdos-fs
DEVICE = WIN5,/mnt/d/uqlx/uqlxtopc.win,qdos-fs
DEVICE = WIN6,/mnt/d/uqlx/qpctouqlx.win,qdos-fs
#
# WSL (Windows Subsystem for Linux) currently does only support inbuild NTFS
# formatted volumes (see also above for access to windows file systems).
# So you cannot access USB devices, ...:
#DEVICE = MDV1,/home/<user>,qdos-like
#DEVICE = FLP1,/dev/sdb,qdos-fs
#DEVICE = RAM1,/tmp/.ram1-%x,clean,qdos-like
#DEVICE = RAM2,/tmp/.ram2-%x,clean,qdos-like
#DEVICE = RAM8,/tmp/.ram8-%x,clean,qdos-like


Last but not least a warning: Minerva 1.98 is buggy, better use Minerva 1.97 (thank you Jan), which may be found on "The Distribution". See: http://qlforum.co.uk/viewtopic.php?f=3&t=1952.

p.s.: Have a look to my signature, it has been corrected! The third program is an improved version of EDLINE$ (not GETLINE$) from the DIY-Toolkit with 2 additional support functions.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
User avatar
ql_freak
Trump Card
Posts: 175
Joined: Sun Jan 18, 2015 1:29 am

Re: Using uQLx on Windows 10

Postby ql_freak » Fri Oct 26, 2018 9:02 pm

As I have written in another thread, Windows 10 now supports real floppy disk drives (i. e. those connected to the mainboard Shugart bus, NOT USB drives), but I cannot access them from QPC. So I now want to test it with uQLx. With the current Windows 10 version it is now possible to mount other drives on WSL (Windows Subsystem for Linux) than NTFS formatted volumes (even network shares), so I have mounted the real floppy drive with:

Code: Select all

sudo mkdir /mnt/a
sudo mount -t drvfs A: /mnt/a
in bash (remember NOT to use Windows programs when editing files in WSL directories, only use Linux tools like the excellent joe editor).

Now I can access the Floppy with e.g.:

Code: Select all

ls /mnt/a

In my .uqlxrc I have tried to get access to the floppy with following line:

Code: Select all

DEVICE = FLP1,/mnt/a/,qdos-fs

But I cannot access the floppy drive. What would be the correct DEVICE command in .uqlxrc to get access to "FLP1_"? When I enter:

Code: Select all

dir 'flp1_'

in uQLx it tries to find a file 'flp1_' on my WIN1_ drive (the floppy LED doesn't light as on QPC). So I assume my DEVICE line is wrong (I'm no uQLx neither a Linux expert).


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE§() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)

Who is online

Users browsing this forum: No registered users and 1 guest