Page 1 of 2

QL Pawn in web browser

Posted: Fri Jul 31, 2020 12:28 pm
by Sparrowhawk
Has anyone managed to get the original QL Pawn to run in the browser here? https://msmemorial.if-legends.org/games.htm/qlpawn.php

I get as far as the QL F1/F2 screen, but nothing happens on key press. Could be a Mac issue perhaps. I'll need to try on my Windows laptop over the weekend.

Anyway, I rather like it - An emulated QL (uses qlay) on an emulated DOSbox in JavaScript. Pretty neat really.

Re: QL Pawn in web browser

Posted: Fri Jul 31, 2020 12:44 pm
by RalfR
It works, just read carefully the following sentence from the web page...and look, where I have placed the pointer:

"Note:If the emulation does not respond to the F1/F2 key press on start, you need to focus the window. Click somewhere into the inner frame close to the border."
2020-07-31 13_43_50-QL-Pawn.jpg

Re: QL Pawn in web browser

Posted: Fri Jul 31, 2020 2:18 pm
by Sparrowhawk
Oops, you are quite right, it's right there in the text ! Sorry :D

Working now. A really impressive feat of nested emulation, I must say.

Re: QL Pawn in web browser

Posted: Sat Aug 01, 2020 8:00 am
by tofro
Sparrowhawk wrote:Has anyone managed to get the original QL Pawn to run in the browser here? https://msmemorial.if-legends.org/games.htm/qlpawn.php

I get as far as the QL F1/F2 screen, but nothing happens on key press. Could be a Mac issue perhaps. I'll need to try on my Windows laptop over the weekend.
Why do you want to run The Pawn on your web browser when you can run the real thing in full graphics on your Q68?

Re: QL Pawn in web browser

Posted: Sat Aug 01, 2020 10:09 am
by bwinkel67
Wow, that's pretty cool. I want to look into how to set that up. Could demo other programs the same way...

Re: QL Pawn in web browser

Posted: Sat Aug 01, 2020 10:13 am
by Chr$
I wonder if QLAY in a DOSbox like that might be a good way of presenting (and making playable) the QL games that are still under Copyright?

Re: QL Pawn in web browser

Posted: Sat Aug 01, 2020 10:38 am
by bwinkel67
Chr$ wrote:I wonder if QLAY in a DOSbox like that might be a good way of presenting (and making playable) the QL games that are still under Copyright?
I would love to put my ZXSimulator online that way. It runs on a 128K unexpanded QL so resource-wise it would be minimal.

Re: QL Pawn in web browser

Posted: Sat Aug 01, 2020 11:03 am
by Chr$
bwinkel67 wrote:
I would love to put my ZXSimulator online that way. It runs on a 128K unexpanded QL so resource-wise it would be minimal.
That's a very good idea. Let me know how you go about it!

Re: QL Pawn in web browser

Posted: Sat Aug 01, 2020 11:33 am
by Sparrowhawk
tofro wrote:Why do you want to run The Pawn on your web browser when you can run the real thing in full graphics on your Q68?
It's not a matter of wanting as such, it's a matter of being impressed by the technical ingenuity that allows this.

Re: QL Pawn in web browser

Posted: Sat Aug 01, 2020 11:34 pm
by bwinkel67
Chr$ wrote:
bwinkel67 wrote:
I would love to put my ZXSimulator online that way. It runs on a 128K unexpanded QL so resource-wise it would be minimal.
That's a very good idea. Let me know how you go about it!
Ok, I have it working. So this is temporary since I'm not hosting my own web server or using an online server. But all one needs to do is run this HTML code and find online storage for the zip. Note that they recommend you don't point to their DOSBox JavaScript (which I'm doing) so you'd also have to make a copy of that. This is for demonstration purposes only.

Here is the HTML code, just extract the file on your Desktop:
ZXSimulator.png
ZXSimulator_html.zip
(506 Bytes) Downloaded 79 times

Then download this zip file and also stick it on your Desktop:
qlay090.zip
(220.38 KiB) Downloaded 88 times
Now just double-click the HTML file and DOSBox will load and it will load QLAY in turn, which will then auto-boot the ZXSimulator.

A couple of issues. First, I'm using WIN and not MDV as the latter seemed to take forever to read (or it hung...dunno). Since DOSBox only wants 8 character names and the QL wants '_' we run out of characters pretty quickly since we need "_bas" for the extension, leaving 4 characters for the name (it took me some time to figure this out since I kept getting corrupt files and finally realized it was only those that were longer than 8 characters total -- i.e. banner_bas is 10 in length and kept giving me garbage). The second issue was that I could not, for the life of me, un-zip and re-zip the QLAY folder and still have it work unless I removed the sub2/ directory. So to leave that structure I ended up just taking the original qlay090.zip from Dilwyn's site and replaced the contents of sub2/ and that caused it to work. Something with Windows 7 zip that DOSBox doesn't like (it works if I just put all the files on the same level as the executable and leave out and sub directories (i.e. sub2/).

Keyboard input is slow but still, once I get my website going I can showcase ZXSimulator using this method. It's pretty easy to set up once you get the hand of it. I'll have to see if Wordpress will allow this to work and if not I'll have to find somewhere else to host it.