QL Pawn in web browser

Anything QL Software or Programming Related.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Pawn in web browser

Post by bwinkel67 »

So I now have it running on my school server accessible to the world. The JS files run about 2.75MB (js-dos.js, wdosbox.js, wdosbox.wasm.js) but that's all you need. That along with the qlay090.zip file and a small HTML file to get it to work. I will look for a free public server to share it on since I don't want to use school computers. I put QLAY in a higher screen resolution mode which makes its bootup a bit slower but once it is running it behaves pretty normally after that (i.e. the resolution doesn't seem to be impacted further after its booted).

Here is a screen dump of the webpage. So it's like Inception since we have a ZX81 ROM emulator (ZXSimulator) running on a Sinclair QL emulator running on a DOS emulator running in a webpage. Great way to showcase QL software and nice to have the QLAY DOS version for it.
ZXWebsite.png


User avatar
Chr$
QL Wafer Drive
Posts: 1306
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: QL Pawn in web browser

Post by Chr$ »

bwinkel67 wrote:
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


Then download this zip file and also stick it on your Desktop:

qlay090.zip

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.
Looks great. Will try that as soon as I can.

And there's no way that the QL in the DOSbox in the HTML can share it's data with the outside world? Is it something that can be made secure so that it just shows and allows the play of certain games/programs? I think that would be great.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
XorA
Site Admin
Posts: 1365
Joined: Thu Jun 02, 2011 11:31 am
Location: Shotts, North Lanarkshire, Scotland, UK

Re: QL Pawn in web browser

Post by XorA »

MESS/MAME has Sinclair QL support and can be compiled to run directly in a browser (see the README and build instructions in MESS).

This would cut a few steps as you wouldn't need an emulator inside an emulator.

It doesn't support MDV files though, only floppy images.


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Pawn in web browser

Post by RalfR »

bwinkel67 wrote:So I now have it running on my school server accessible to the world.
That is really great. Thank you in advance! :)


4E75 7000
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: QL Pawn in web browser

Post by RalfR »

Chr$ wrote:And there's no way that the QL in the DOSbox in the HTML can share it's data with the outside world?
That would be very nice to save The Pawn's Game.


4E75 7000
User avatar
Chr$
QL Wafer Drive
Posts: 1306
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: QL Pawn in web browser

Post by Chr$ »

RalfR wrote:
Chr$ wrote:And there's no way that the QL in the DOSbox in the HTML can share it's data with the outside world?
That would be very nice to save The Pawn's Game.
I think it supports saving (in the same session etc). I just mean in order to protect any copyright protected games so that their program data cannot extracted somehow.


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Pawn in web browser

Post by bwinkel67 »

Chr$ wrote:
bwinkel67 wrote: Looks great. Will try that as soon as I can.

And there's no way that the QL in the DOSbox in the HTML can share it's data with the outside world? Is it something that can be made secure so that it just shows and allows the play of certain games/programs? I think that would be great.
So the QDOS environment is available to you and you can stop the program and then use QDOS commands. So if it's a BASIC program someone could look at the listing and take screen shots and re-type it. But there's no way to save something locally on your system as that would mean that QDOS and DOSBox would have to be aware of each other and know they are being emulated in JavaScript on a web browser. That version o fQLAY only supports MDV and WIN.


User avatar
Chr$
QL Wafer Drive
Posts: 1306
Joined: Mon May 27, 2019 10:03 am
Location: Sachsen, Germany
Contact:

Re: QL Pawn in web browser

Post by Chr$ »

bwinkel67 wrote:
Chr$ wrote:
bwinkel67 wrote: Looks great. Will try that as soon as I can.

And there's no way that the QL in the DOSbox in the HTML can share it's data with the outside world? Is it something that can be made secure so that it just shows and allows the play of certain games/programs? I think that would be great.
So the QDOS environment is available to you and you can stop the program and then use QDOS commands. So if it's a BASIC program someone could look at the listing and take screen shots and re-type it. But there's no way to save something locally on your system as that would mean that QDOS and DOSBox would have to be aware of each other and know they are being emulated in JavaScript on a web browser. That version o fQLAY only supports MDV and WIN.
Thought that might be the case. For a BASIC prog you could screenshot and OCR it! Not that anyone would bother. So it at least means that exe's and other code files are safe from pirating (again, not that anyone would probably want to bother).


https://QXL.WIN
Collector of QL related computers, accessories and QL games/software.
Ask me about felt pads - I can cut them to size and they have proved excellent for mdv data recovery.
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Re: QL Pawn in web browser

Post by bwinkel67 »

And here it is. Found InfinityFree which gives you the ability to host websites WITHOUT those dreaded build environments. So you can just load an HTML file and supporting files. It uses epizy.com as the domain:

http://zxsimulator.orgfree.com


Post Reply