MAKE_DIR command needed for uQLx

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

MAKE_DIR command needed for uQLx

Post by ql_freak »

Is there a stand anlone MAKE_DIR command? Or how are subdirectories created on uQLx?


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
tofro
Font of All Knowledge
Posts: 2685
Joined: Sun Feb 13, 2011 10:53 pm
Location: SW Germany

Re: MAKE_DIR command needed for uQLx

Post by tofro »

Depending on the file system, it might simply be not implemented in uQLX. Last time I looked, there was no MAKE_DIR support in the emulator for QXL.WIN file systems, only for the native file system - Don't know, though, whether anyone bothered to implement it in the meantime.

Even if you had a MAKE_DIR command, it would not work, the system call is just not there.

(Nice small and relatively easy job for volunteer work on uQLX, BTW - It's actually not extremely difficult to implement.)

Tobias


ʎɐqǝ ɯoɹɟ ǝq oʇ ƃuᴉoƃ ʇou sᴉ pɹɐoqʎǝʞ ʇxǝu ʎɯ 'ɹɐǝp ɥO
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: MAKE_DIR command needed for uQLx

Post by ql_freak »

Yes, it seems you are right (see also my other message with unzipping Qpac2) :-( Astonishingly the subdirectories are else fully working, you can copy to it, and you only see the content of the subdirectory, not the files of subdirectories inside it. Only the arrow at the right of subdirectories is missing when listing a directory with DIR.

FS.RENAME seems also not to be implemented for QXL.WIN :-(

Unfortunately I cannot use the host file system with uQLx on Windows with WSL. I have tried everything this afternoon. It seems uQLx will need a temporary file QDOSxyz (xyz is a random string), but cannot create it. I defined TMPDIR, TEMPDIR, TMP, TEMP and exported it, but whenever I want to access a host directory I get an error message in the bash :-(

Well Microsoft says that WSL is not yet perfect, and normally they support just command line programs. I'm happy that uQLx 2017 is running at all with WSL and Xming.


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 :-)
swensont
Forum Moderator
Posts: 252
Joined: Tue Dec 06, 2011 3:30 am
Location: SF Bay Area
Contact:

Re: MAKE_DIR command needed for uQLx

Post by swensont »

You can use qxltool from Jonathan Hudson to create a QLX.win file and then access it via qxltool to create directories. When testing uQLx, I found that where were times that it could handle directories and times when it could not. IIRC, reading directories is fine, but writing to them had a problem.

Tim Swenson


User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: MAKE_DIR command needed for uQLx

Post by ql_freak »

That (qxltool) doesn't unfortunately help, if you wan to unzip an archive, with subdirectories.

I am using now the updated Toolkit II version 2.31 from Marcel. This includes a MAKE_DIR command, which unfortunately gives not implemented when trying to create a subdirectory on QXL.WIN files.

But it includes e.g. PE_BGON/PE_BGOFF and PE_BGON is working, i.e. unlocks (partly) buried windows :-)


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
XorA
Site Admin
Posts: 1358
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: MAKE_DIR command needed for uQLx

Post by XorA »

The thing to remember about uQlx is it doesn't implement any device drivers, it just hooks into the open/close functions in the ROM. So the actual emulator itself must implement creating directories.


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

Re: MAKE_DIR command needed for uQLx

Post by Martin_Head »

Could you transfer your uQLx, QXL.win file to QPC2. Do whatever unzipping/sub-directory creation you want, then transfer the QXL.win file back to uQLx again.


User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: MAKE_DIR command needed for uQLx

Post by ql_freak »

That's what I did ;-) But it is cumbersome.

uQLx has unfortunately other quirks (at least under Windows with WSL). If you are in a program with keyboard input, the mousepointer doesn't come up, if you move the mouse. You must first switch with CTRL-C to a PE program or press a hotkey which starts a PE program. Sometimes the keyboard doesn't work correctly, it seems that additionally the altkey is stuffed...

I wanted to test if text87 runs on uQLx. While on QPC2 it starts (but is unusuable), on uQLx (Minerva 1.98) it doesn't even start, not even an error message :-(


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
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: MAKE_DIR command needed for uQLx

Post by dilwyn »

ql_freak wrote:That's what I did ;-) But it is cumbersome.

uQLx has unfortunately other quirks (at least under Windows with WSL). If you are in a program with keyboard input, the mousepointer doesn't come up, if you move the mouse. You must first switch with CTRL-C to a PE program or press a hotkey which starts a PE program. Sometimes the keyboard doesn't work correctly, it seems that additionally the altkey is stuffed...

I wanted to test if text87 runs on uQLx. While on QPC2 it starts (but is unusuable), on uQLx (Minerva 1.98) it doesn't even start, not even an error message :-(
Text 87 can work on QPC2, either in 512x256 QL mode or in other modes with Marcel's patch program. Text87 writes direct to screen to use its own fonts etc so is not aware of most other modes without the patch program. It used to be available from Jochen Merz and Quo Vadis Design, not sure if still available.

Not being a uQLx user, I can't comment on that aspect of it, and whether such patches would work in uQLx screen modes.


User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: MAKE_DIR command needed for uQLx

Post by ql_freak »

dilwyn wrote: Text 87 can work on QPC2, either in 512x256 QL mode or in other modes with Marcel's patch program. Text87 writes direct to screen to use its own fonts etc so is not aware of most other modes without the patch program. It used to be available from Jochen Merz and Quo Vadis Design, not sure if still available.
Thank you! With QL mode Text87 runs even in high resolutions on QPC. My problem was that I didn't realize, that Text87 doesn't start if it cannot find its Default11_f87 font and its DRIVER_P87 printer driver. I have it now redirected with Phil Bormans REDIRECT device, and now Text87 is working :-)

Is it possible to install also Version 3 beneath Text87plus4. I want to look at my degree dissertation, but that had been written with Text87 3 (or even 2). The Text87plus4 manual states, that when loading old files, the sections are lost (which would be a horror, to get them back).
dilwyn wrote:Not being a uQLx user, I can't comment on that aspect of it, and whether such patches would work in uQLx screen modes.
I'm also normally not. I have just installed it, to test the new Windows Subsystem for Linux, i.e. a proof of concept, that it works. Currently it has the disadvantage, that you can only access hard drives which are formatted with NTFS. USB-Devices (Floppy) are not yet supported. BTW: Text87 does run, but the display is black. That is most probably because uQLx doesn't implement device drivers.

BTW: I did a Benchmark for testing if there is a difference in SBASIC when using variables versus literals. Just for fun I tested it on uQLx. SBASIC is much, much faster than even Minervas SuperBASIC (in uQLx emulator itself I cannot detect much speed differences compared to QPC2 in normal use):

Code: Select all

100 REMark literalBench_bas
102 REMark Results:  Float / Int (QPC2)  Float / Int (uQLx/Minerva 1.98)
104 REMark Variables:    7   7 to  8       125   124 (only 1 time executed)
106 REMark Literals:     7   9 to 10       117   116 (only 1 time executed)
108 :
110 PRINT\"F)loating point  I)nteger  <Esc>";
120 REPeat loop:CURSEN#1:a$=INKEY$(#1,-1):CURDIS#1:IF CODE(a$)<>27:EXIT loop:ELSE :PRINT\"Aborted":STOP
130 IF a$ INSTR "fF":PRINT a$\"Running Benchmark...":GO TO 150
140 IF NOT a$ INSTR("iI"):GO TO 120:ELSE :PRINT a$\"Running Benchmark...":GO TO 550
150 REMark Floating point:
170 REMark 1) assigned to variables:
190 ts=DATE()
210 FOR i%=1TO 10
230  v=1.123457:e=999999.1
250  FOR i=.1TO e
270    r=v
290  END FOR i
310 END FOR i%
330 te=DATE():PRINT "Variables: ";te-ts
340 REMark 2) with literals:
350 ts=DATE()
370 FOR i%=1TO 10
390  REMark 2) with literals:
410  FOR i=.1TO 999999.1
430    r=1.123457
450  END FOR i
470 END FOR i%
490 te=DATE():PRINT "Literals: ";te-ts
495 STOP
500 :
550 REMark Integer:
570 REMark 1) assigned to variables:
590 ts=DATE()
610 FOR i%=1TO 10
630  v%="12345":e=999999.1
650  FOR i=.1TO e
670    r%=v%
690  END FOR i
710 END FOR i%
730 te=DATE():PRINT "Variables: ";te-ts
740  REMark 2) with literals:
750 ts=DATE()
770 FOR i%=1TO 10
810  FOR i=.1TO 999999.1
830    r%=12345
850  END FOR i
870 END FOR i%
890 te=DATE():PRINT "Literals: ";te-ts


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 :-)
Post Reply