ZXSimulator

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

Re: ZXSimulator

Post by bwinkel67 »

Chr$ wrote:Talking of Startrek clones on the ZX81, many years ago a chap called Kilian Schlaich made a version that was retailed by ISS in Germany. I found a copy in 2019 and was able to digitise it, then track down Mr Schlaich. He gave me permission to share it freely and because the cassette contained no instructions (I don't know if it ever did) he wrote some for me, 38 years later.

Here it as as a zipped .p file, with text file instructions (all in German).
Thank you! I looked through the BASIC and it seems pretty straightforward, just a square-root function and a few places where it's using floating point. It is really hard to play. He tried to add some complexity by having the computer continuously run in the background and uses inkey$ to grab commands and they are not very responsive. Plus he makes you type the entire word instead of just using a single letter. I tried the SCHIRM command over and over again and it would never ping me for a value, so not sure why I couldn't raise shields. This goes into the Star Trek Last Battle column for me...that game was MC code and really nicely laid out but the game-play just made it too difficult to enjoy (i.e. screen jumping around, animations, etc...). I'll have to see if I can improve it if I can convert it to run on the ZXSimulator. The display layout is really nice, I like it.

Interesting how many Star Trek clones are out there. That's the 5th one for the ZX81...I found 2 on the QL.


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

Re: ZXSimulator

Post by Derek_Stewart »

Hi,

I dumped the file Anleitung2019.txt into Google Chrome and pressed Translate which gave a reasonable Das Englander version.

I wondered if a 3D version could be developed, maybe on the QL?


Regards,

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

Re: ZXSimulator

Post by Chr$ »

All kinds of similar Star Trek themed games seemed to exist at the time for all the popular computers. I haven't looked into it, but there must have been some kind of copyright loophole, perhaps. Some gave the characters slightly different names, others didn't seem to bother.

I'm sure Kilian won't object to any further developments on the ZX81, QL or anything else.

This is what the original cassette box looked like.
20190905_155245_resized.jpg
All of the ISS titles looked the same. They hardly screamed 'buy me'. In fact I think they were exclusively mail-order. I have quite a few of them, and an original advertisement that lists all of them (for ZX81) - It's a little side line to collecting QL software.


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: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: ZXSimulator

Post by bwinkel67 »

Chr$ wrote:All kinds of similar Star Trek themed games seemed to exist at the time for all the popular computers. I haven't looked into it, but there must have been some kind of copyright loophole, perhaps. Some gave the characters slightly different names, others didn't seem to bother."
I need to check the book but perhaps David Ahl an Mike Mayfield put their code into the public domain and so many others copied parts of it. With regard to Paramount and Star Trek...not sure there, but maybe Gene Roddenberry loved the grass roots support and when the first few BASIC games popped up in the early to mid 70's, there was little interest by Paramount or CBS for the show (until the movie came out I suppose).


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: ZXSimulator

Post by bwinkel67 »

So I tweaked the Star Trek game a bit to improve it. It has an overall energy variable that each starbase shares and if it goes to zero the game is over (even if the Enterprise could have just used half of the full supply). So I now incrementally restore energy (1000 units at a time in 3 iteratoins) until the starbase energy drops below 1000 units. It also gives a warning of low (or critical low) energy banks. It doesn't check the first time it transfers so you can still lose the game if you dock with a starbase and grab the last remaining energy. I also made torpedo renewal proportional to how many energy units you grabbed (you get all 15 if you were able to grab all 3000 units). Plus, I grab shield energy as well so basically, docking with starbase resets you to your initial condition.

I had also introduced a bug with regard to moving up and left on quadrants as a simple statement in a floating point BASIC becomes really difficult in integer BASIC. So I turned the following simple formula:

Code: Select all

1132 LET Q=Q+INT (A/8)
1134 LET P=P+INT (B/8)
... into this beast (there were many ways to write it but I went with execution efficient versus clarity):

Code: Select all

1132 LET Q=Q+(A>=0)*INT (A/8)+(A<0)*(-1-INT ((-1-A)/8))
1134 LET P=P+(B>=0)*INT (B/8)+(B<0)*(-1-INT ((-1-B)/8))
Here it is (web version also updated):
StarTrek.zip
(14.07 KiB) Downloaded 70 times


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: ZXSimulator

Post by dilwyn »

At the risk of either duplication or wandering a little off-topic, I've attached a copy of Star Trek for QL I started on a while back and never quite finished. Potentially some fun for someone to tinker with and finish it for QL as well as the ZX81 BASIC version already discussed.

The zip file contains both the original version, as published in BASIC Comp uter Games, edited by David H Ahl (Creative Computing Publishing, 1978) and a minimal adaptation for QL S*BASIC.

There are two QL programs, one the game itself, the other for displaying instructions. The instructions program is set up for a teletype printer style continuous display (in other words, everything scrolls off the screen very quickly and could do with 'paging').

The main game program is a pretty no-frills port, the only significant QL adaptation is to try to use the full screen height given the amount of text output.

I also seem to recall that there was an issue with random numbers, possibly to do with converting RND(n) where either it should return random number from 0 to n-1 or 1 to n. Should quickly become clear after a bit. Probably could do with a RANDOMISE command somewhere so it runs differently each time. And of course a bit of colour and sound effects!

BOOT - choose between game or instructions
SuperStarTrek_txt - the descriptive text from the book
SuperStarTrek.asc - the original Micro$oft BASIC version of the game
SuperStarTrek_bas - the QL BASIC version of the game
SuperStarTrekIns.asc - the original Micro$oft BASIC version of the instructions program
SuperStarTrekIns_bas - the QL BASIC version of the instructions program.

Have fun!
StarTrek.zip
Star Trek QL
(27.07 KiB) Downloaded 69 times
Startup screen
Startup screen
StarTrek1.jpg (7.66 KiB) Viewed 1838 times
The game screen dump
The game screen dump


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: ZXSimulator

Post by bwinkel67 »

I think I tried that...if it was on your website. I actually like the original interface from David Ahl's listing as it reminds me of what I experienced on the TRS-80 Model 1 when I first used a computer.


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: ZXSimulator

Post by dilwyn »

This particular version never went anywhere, as I never finished it. Like strek.zip on my site from 1986 (not by me), it's derived from the one in David Ahl's book.

I just thought that a fairly close-to-the-original port, along with the original PC BASIC one, might help anyone wanting to develop it for QL, that's all.


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

Re: ZXSimulator

Post by bwinkel67 »

I managed to put the Star Trek game from Dilwyn's site -- the compiled one, updated by Tomas Kral in 2015, that came on two microdrives: trek1.zip (mdv1) and trek2.zip (mdv2), onto a single microdrive. It was a tight fit and I actually had to remove the bottom 3 lines of the trek_scr screen file (which were all black anyways) to get it to fit.
STARTREK.zip
(56.91 KiB) Downloaded 63 times
What I did is SMASH the instruction file which reduced it by about 8K (from 20K to 12K) and it doesn't interfere with memory since it gets quit before the main game gets loaded. Then I had to grab about 350 bytes more (so 3x128 bytes from the trek_scr image). It works from mdv1...unfortunately trek_exe has the mdv path hard-coded in, otherwise I would have included by flexible mdv loader that I add to some mdv games:

Code: Select all

1 INPUT #0, "drive (mdv1_)? ";mdv$
2 IF mdv$="" THEN LET mdv$="mdv1_"
Then just concatenate mdv$ to the string of the filename (instead of hard-coding the device). I don't think I can easily change hard-coded mdv1 to another device from BASIC...i.e. I can't poke it since it's a file and I don't have any free space to re-write the file back on to the microdrive. However, a simple hex editor will find the single mdv1 so you can change it to mdv2, or flp1, etc...


Post Reply