sQLux v1.0 (The Xmas Turkey)

Discussion and advice about emulating the QL on other machines.
User avatar
XorA
QL Wafer Drive
Posts: 1082
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: sQLux v1.0 (The Xmas Turkey)

Postby XorA » Fri Jan 21, 2022 9:50 pm

bixio60 wrote:Done... :D


Looking good.

I cant currently distribute an apple binary, but Im too cheap to pay for developer certificate :-D


User avatar
mk79
QL Wafer Drive
Posts: 1288
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Postby mk79 » Fri Jan 21, 2022 11:45 pm

M68008 wrote:Btw, Q-emuLator only uses headers for files needing it (e.g. executables)
Same with QPC. I even remove the header again if the type is changed to 0.
and it also does some escaping of the file name to avoid forbidden names (e.g. CON on Windows) and characters. If anybody is interested, I can share the escaping algorithm.
I didn't know you do that, too.

QPC appends an underscore, so "con" becomes "con_". Same is true for "prn", "aux", "nul", "com1".."com9", "lpt1".."lpt9".

For filenames ending with a space the space will be exchanged with ANSI character 160. Filenames ending with a dot are exchanged with ANSI character 183. Yes, these were implemented on actual requests from a customer a long time (>15 years) ago because he actually used weird filenames like these in his company's software.


User avatar
M68008
Trump Card
Posts: 178
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Postby M68008 » Sat Jan 22, 2022 7:05 am

mk79 wrote:For filenames ending with a space the space will be exchanged with ANSI character 160. Filenames ending with a dot are exchanged with ANSI character 183. Yes, these were implemented on actual requests from a customer a long time (>15 years) ago because he actually used weird filenames like these in his company's software.


Another case is files with empty names, sometimes used by QL programs as weak copy protection. In Q-emuLator, they appear in host directories as '"-noname-".


User avatar
XorA
QL Wafer Drive
Posts: 1082
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: sQLux v1.0 (The Xmas Turkey)

Postby XorA » Sat Jan 22, 2022 10:29 am

M68008 wrote:
XorA wrote:On that NOTE reading Q-Emulator headers now works (well as far as Ive tested it), could still be some corner cases. Next step is to replace the .-UQLX- files with Q-Emulator headers all round!


Great to hear! IMO having more emulators use the same native format will simplify the life of users.

Btw, Q-emuLator only uses headers for files needing it (e.g. executables) and it also does some escaping of the file name to avoid forbidden names (e.g. CON on Windows) and characters. If anybody is interested, I can share the escaping algorithm.


I would be interested in seeing them as obviously sQLux is new to windows foibles. But it does attempt to only use header of files with the type set. Although Marcel has pointed out a corner case I had not considered so will need to implement.


User avatar
M68008
Trump Card
Posts: 178
Joined: Sat Jan 29, 2011 1:55 am
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Postby M68008 » Sat Jan 22, 2022 8:33 pm

XorA wrote:I would be interested in seeing them as obviously sQLux is new to windows foibles. But it does attempt to only use header of files with the type set. Although Marcel has pointed out a corner case I had not considered so will need to implement.


Hi XorA,

Windows forbids a number of characters in file names: <>|":/\?*

You should also avoid device names. I escape CON PRN AUX NUL COM1-9 LPT1-9

The escaping mechanism in Q-emuLator may look bizarre, but it has worked fine and is not visible from inside the emulator:
- Files with no name are saved as: -noname-
- Files with escaped characters start with -noascii-
-noascii- is followed by a number of parts separated by spaces; each part can either be the hex code for a character or ! followed by a run of unescaped characters
I also escape characters < 32.

Examples:

Code: Select all

tk2_bin          ->  tk2_bin
<empty name>     ->  -noname-
CON              ->  -noascii-!CON
CONSOLE          ->  CONSOLE
one<newline>two  ->  -noascii-!one A!two   (the A in the middle is the newline character)
//               ->  -noascii-2F 2F
<null character> ->  -noascii-0


User avatar
mk79
QL Wafer Drive
Posts: 1288
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

Re: sQLux v1.0 (The Xmas Turkey)

Postby mk79 » Sat Jan 22, 2022 9:23 pm

M68008 wrote:Windows forbids a number of characters in file names: <>|":/\?*
Ah right, I forgot about them. I do substitutions for those, too, but differently: ">" translates for example into Unicode symbol U+203A "Single Right-Pointing Angle Quotation Mark" which looks exactly like ">" but works in filenames ;) My goal was for the names to be visually as close to the original as possible.

Cheers, Marcel


Derek_Stewart
Font of All Knowledge
Posts: 2939
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: sQLux v1.0 (The Xmas Turkey)

Postby Derek_Stewart » Wed Jan 26, 2022 5:10 pm

Hi,

How do I get sQLux to execute a QDOS executable file unzipped with qemi-unzip.

I made a DEVICE as qdos-like but the rxecutable file teturns a bad parameter when loaded with EX or EW


Regards,

Derek
User avatar
XorA
QL Wafer Drive
Posts: 1082
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: sQLux v1.0 (The Xmas Turkey)

Postby XorA » Wed Jan 26, 2022 5:16 pm

Derek_Stewart wrote:Hi,

How do I get sQLux to execute a QDOS executable file unzipped with qemi-unzip.

I made a DEVICE as qdos-like but the rxecutable file teturns a bad parameter when loaded with EX or EW


It should just work with the latest in git, but its still in development so there might be some bugs!


Derek_Stewart
Font of All Knowledge
Posts: 2939
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: sQLux v1.0 (The Xmas Turkey)

Postby Derek_Stewart » Wed Jan 26, 2022 5:45 pm

Hi

No problems, I just not get it to work.

I generally uncompress archive files to a QDOS environment, which preserves the executable header eithout messing about wilth the QDOS file header.


Regards,

Derek
User avatar
XorA
QL Wafer Drive
Posts: 1082
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: sQLux v1.0 (The Xmas Turkey)

Postby XorA » Wed Jan 26, 2022 5:47 pm

Derek_Stewart wrote:Hi

No problems, I just not get it to work.

I generally uncompress archive files to a QDOS environment, which preserves the executable header eithout messing about wilth the QDOS file header.


Using your own test I have tried.

./x86_64/qem-unzip -d~/test "~/Downloads/flightdeck.zip"


with this sqlux.ini

# Example configuration

SYSROM = MIN198.rom
ROMIM = TK232.rom
RAMTOP = 4096
PRINT = lpr
CPU_HOG = 0
FAST_STARTUP = 1
DEVICE = FLP1,~/test/,qdos-like
WIN_SIZE = 2x
SPEED = 1.0


Will load the flight_obj exe, which then fails with Bad Name, but thats not an issue with the filesystem as far as I can see!



Who is online

Users browsing this forum: No registered users and 1 guest