Page 1 of 1

Running game "Werner" under uQLx

Posted: Sat Oct 12, 2019 2:48 pm
by Maskenlos
Dear all,

autumn / winter time is coming, means vintage computer season starts again:-)
To celebrate the beginning I planned to play again the game "Werner" which I did only 20 years ago. As an Emulator I am using uQLx for many years already.
I downloaded the game from Dilwyn Jones website (Thanks!) unzip it using UQLX but the only message I got when try to start with Ex flp1_werner_exe is "bad parameter"

Does anyone have an idea whether the game runs under uQLx or any other emulators? Any hint how to proceed? About 20 years ago I played it under real QL but never using an emulator.

Thanks and best regards,

Stephan

Re: Running game "Werner" under uQLx

Posted: Sat Oct 12, 2019 3:23 pm
by Andrew
I tried the game in QEmulator and it works.
Did you unzipped it in uQLX ? Does uQLx knows how to work with files that have the QDOS file header (the one added by QEmulator and QPC when you use DOS directories ?)
werner_exe is zipped with the QDOS file header and will retain it after unzipping

Also the game must be started with EW not with EX.

I have removed the QDOS header and zipped the game. See if it works

Re: Running game "Werner" under uQLx

Posted: Sat Oct 12, 2019 7:40 pm
by Maskenlos
Hi Andrew,

thanks for the super fast reply.
I unziped your file using uQLx and it works well, but I do not understand why. Ok,the QDOS file header remains after unzip with uQLx (using my original file). But then it should work when I copy the files into a native file system, but this also fails.

Thanks again,

Stephan

Re: Running game "Werner" under uQLx

Posted: Mon Oct 14, 2019 8:58 am
by mk79
Werner is part of my QL-SD demo "hard"-disc image https://www.kilgus.net/ql/ql-sd/. uQLx has support for .WIN files, so it should be ready to go.

Marcel

Re: Running game "Werner" under uQLx

Posted: Mon Oct 14, 2019 9:20 am
by tofro
QEmulator has added (all in good faith, I suppose) another level of complexity to the topic of QL file headers.

When you copy a QL executable to a non-QDOS file system, the 64-byte header that belongs to the file is normally lost.
Daniele has devised a scheme that packs the header in front of the actual file on the foreign file system. The QEmulator file system drivers detect that header and interpret it properly, any other QDOS system simply won't understand this prepended header and won't execute the file. You can easily detect the QEmulator header by viewing the file, for example in a text editor: If the file contains the string "!QDOS File Header" in the first few bytes, the file contains a QEmulator header - this needs to be cut off, either by a bit of SuperBASIC or tools that come with QEmulator to make it executable. (that's the case with the "werner.zip" file on Dilwyn's site - This was actually packed the wrong way)

The whole problem could be avoided by not using a "foreign" (DOS, Windows, or Mac) zip to pack the "native" files, but rather zip the files from within QEmulator with a native QDOS zip - this would put the header to the proper place in the zip and make it work on native QDOS file systems again. So the problem was actually created when the zip file was created.

It would probably make sense to add an explanation of this fact to the "what can go wrong with zip files" section on the QL home page.

Tobias

Re: Running game "Werner" under uQLx

Posted: Mon Oct 14, 2019 12:13 pm
by dilwyn
tofro wrote:QEmulator has added (all in good faith, I suppose) another level of complexity to the topic of QL file headers.

When you copy a QL executable to a non-QDOS file system, the 64-byte header that belongs to the file is normally lost.
Daniele has devised a scheme that packs the header in front of the actual file on the foreign file system. The QEmulator file system drivers detect that header and interpret it properly, any other QDOS system simply won't understand this prepended header and won't execute the file. You can easily detect the QEmulator header by viewing the file, for example in a text editor: If the file contains the string "!QDOS File Header" in the first few bytes, the file contains a QEmulator header - this needs to be cut off, either by a bit of SuperBASIC or tools that come with QEmulator to make it executable. (that's the case with the "werner.zip" file on Dilwyn's site - This was actually packed the wrong way)

The whole problem could be avoided by not using a "foreign" (DOS, Windows, or Mac) zip to pack the "native" files, but rather zip the files from within QEmulator with a native QDOS zip - this would put the header to the proper place in the zip and make it work on native QDOS file systems again. So the problem was actually created when the zip file was created.

It would probably make sense to add an explanation of this fact to the "what can go wrong with zip files" section on the QL home page.

Tobias
Given up trying to explain all this, people just don't read it and always try to run before they can walk. Modern media like this forum and social media make it easier for people to be lazy and ask rather than read. The sheer number of executable file formats in the QL scene, necessary but confusing, also means that there are too many options to explain.

Just wish people would think before lazily sending me stuff in these non-standard formats which cause the problems in the first place.

Copying a file to a non-native media in QemuLator is normally the easiest way to strip the files. BUT, if the archive was made by zipping Windows folders as it was in this case, using QL Unzip (even on QemuLator) won't strip the preamble, the easiest way in that case is to attach it to a drive slot in QL EmuLator as a ZIP/QLPAK Archive (right click on a drive slot, select that option) then copy the files from it to ramdisk, which removes the executable preambles, then copy to floppy disk or rezip if transferring somewhere again. That option seems to be a bit more intelligent in handling QemuLator files. I *think* only available in QemuLator Registered Version.

The reason I don't convert these things is to discourage people from sending me them in these formats and lack of time. Trying to use QDOS Unzip and Zip on QemuLator in Windows is a slow painful death, where it takes several minutes to just read an archive - it just sits there showing "reading zip file catalogue" for ages. Plus of course I rarely get time for anything these days let alone checking and doing these conversions. Weeks since I last got time to use a QL.

Will upload a non-QemuLator version of Werner.zip to the website sometime today, if i get time. I just did the conversion (file attached, configured for FLP), it took about 20 minutes in total, plus the time it'll take to edit the web page and so on.
wernerql.zip

Re: Running game "Werner" under uQLx

Posted: Mon Oct 14, 2019 6:12 pm
by Andrew
dilwyn wrote: Trying to use QDOS Unzip and Zip on QemuLator in Windows is a slow painful death, where it takes several minutes to just read an archive - it just sits there showing "reading zip file catalogue" for ages.
That is very strange. I use Zipman and never had to wait more than a few seconds (on QEmulator - full speed), Probably it is a different zip version.
The fastest way to get rid of those pesky headers is to attach the DOS directory to a QEmulator drive - then wcopy to RAM1_ and then zip RAM1_

Re: Running game "Werner" under uQLx

Posted: Mon Oct 14, 2019 11:03 pm
by dilwyn
Andrew wrote:
dilwyn wrote: Trying to use QDOS Unzip and Zip on QemuLator in Windows is a slow painful death, where it takes several minutes to just read an archive - it just sits there showing "reading zip file catalogue" for ages.
That is very strange. I use Zipman and never had to wait more than a few seconds (on QEmulator - full speed), Probably it is a different zip version.
The fastest way to get rid of those pesky headers is to attach the DOS directory to a QEmulator drive - then wcopy to RAM1_ and then zip RAM1_
The setup is:

QemuLator 3.2.1 registered
Unzip 5.32 (also tested a later version, IIRC 5.40, same results)
SMSQ/E for QemuLator from Daniele's website (same results with a QDOS ROM and pointer environment)
Same results with ACP and Zip Manager.

This problem has been consistent in all the time I've been using a registered QemuLator, which is quite a while. Never been able to isolate a combination of setups where this doesn't happen. And persisted across occasional reinstalls.

Re: Running game "Werner" under uQLx

Posted: Tue Oct 15, 2019 12:35 am
by pjw
dilwyn wrote:<>
QemuLator 3.2.1 registered
The current version is 3.2.2. Among other things it corrects a long-standing issue with directory handling. I doubt it has anything to do with the matter you describe, although it just might. I mention it mainly because the update, important for some software that I use, has not been widely advertised.

Re: Running game "Werner" under uQLx

Posted: Tue Oct 15, 2019 12:13 pm
by Maskenlos
Hi all,

thanks for all the explanations to understand about the file header Problem and hints to different sources of the game.
Its really good to see that so many people in this forum are willing to help even with my (re-) beginner questions.
As I did not manage to slow down uQLx the game runs still much too fast. I will check out different emulators to find that one which fits to my requirements or get the BBQL out of its box. If I recall correct I should have a registered version of QEmulator somewhere.

Thanks again,

Stephan