Using Just Basic or Liberty Basic to test a zx spectrum program

The place for codemasters or beginners to talk about programming any language for the Spectrum.
llewelyn
Dizzy
Posts: 94
Joined: Thu Feb 22, 2018 3:27 pm
Location: virginias eastern shore
Contact:

Re: Using Just Basic or Liberty Basic to test a zx spectrum program

Post by llewelyn » Thu May 24, 2018 1:00 pm

Hikoki are you asking me that question?

Because if so I don't understand it. All I can say is that I save my files without extensions EG:- Save "tank4' and then open that with Notepad set to Allfiles and then I can paste the code here or wherever.

Also- ONLY if its Sinclair Basic commands not any of the extended functions - I can load it into an emulator such as BASin and then save it as a snapshot. Import the snapshot into an emulator that will save to tape! A rather convoluted process and I'm sure you'll get a better answer from someone more knowledgeable!

However the really important point is that SpecBAS output really isn't meant to be run on any Spectrum or clone, its solely for PC use only. That doesnt mean that its impossible to use strictly Sinclair Basic commands to create a program to be used on a Speccy or emulator thereof but its kind of pointless.

Better is the other way round. You can take a Sinclair Basic program thats dreadfully slow and import it into SpecBAS and see it fly. Bear in mind the obvious pitfalls though, such as the different PLOT and PRINT positions, a few similar differences and addresses if you're POKEing or PEEKing, stuff like that but theoretically it can be done. I'd wait for Dunny or ASH-II to comment though because I'm not sure about what I've said.
0 x

hikoki
Manic Miner
Posts: 402
Joined: Thu Nov 16, 2017 10:54 am

Re: Using Just Basic or Liberty Basic to test a zx spectrum program

Post by hikoki » Thu May 24, 2018 2:53 pm

I mean most of us are more interested in the original machine so it would be great to translate SpecBas code to machine code. Anyways I'll play with SpecBas eventually.
0 x

User avatar
ZXDunny
Manic Miner
Posts: 250
Joined: Tue Nov 14, 2017 3:45 pm

Re: Using Just Basic or Liberty Basic to test a zx spectrum program

Post by ZXDunny » Thu May 24, 2018 5:27 pm

Yeah, taking SpecBAS code and translating it to z80 won't happen. Unless your BASIC code strictly only uses commands and functions from Sinclair BASIC would that work and tbh you'd be better off pasting it into BASin. If you use any of SpecBAS's other strengths - sprites, 256 colour graphics, updated commands and functions then I'm afraid that even tightly coded z80 won't run at any acceptable speed.

llewelyn is correct - it's great for running slow Sinclair BASIC code blisteringly fast, but nothing more speccy-related than that.

(unless you're in it for the nostalgia of coding in BASIC like the 80s, but with modern speeds).
0 x

hikoki
Manic Miner
Posts: 402
Joined: Thu Nov 16, 2017 10:54 am

Re: Using Just Basic or Liberty Basic to test a zx spectrum program

Post by hikoki » Thu May 24, 2018 7:24 pm

well one idea would be to create a subset of different Basic commands : Sinclair Basic, Boriel, compilable SpecBas, full SpecBas. So the IDE could be set to work only on either of these modes. The ultimate tool for all the Speccy Basic dialects.
Who knows if this could be useful to code in fast Basic right from some bare emulator for the Pi.. perhaps using two Pis communicating with each other.. I know, these things probably won't happen..
0 x

User avatar
ZXDunny
Manic Miner
Posts: 250
Joined: Tue Nov 14, 2017 3:45 pm

Re: Using Just Basic or Liberty Basic to test a zx spectrum program

Post by ZXDunny » Thu May 24, 2018 11:12 pm

hikoki wrote:
Thu May 24, 2018 7:24 pm
I know, these things probably won't happen..
And you'd be right!
0 x

hikoki
Manic Miner
Posts: 402
Joined: Thu Nov 16, 2017 10:54 am

Re: Using Just Basic or Liberty Basic to test a zx spectrum program

Post by hikoki » Fri May 25, 2018 5:51 am

ZXDunny wrote:
Thu May 24, 2018 11:12 pm
hikoki wrote:
Thu May 24, 2018 7:24 pm
I know, these things probably won't happen..
And you'd be right!
No worries! :) if the IDE is as good as Basin it'll be useful to throw any Sinclair Basic program to see how could be expanded in a feasible compiled version. Trying to find a SpecBas <-> ZXBasic workflow looks like fun to me.
0 x

Post Reply