Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

48K BASIC to ZX81 BASIC conversion possible?

18 views
Skip to first unread message

zxbruno

unread,
Nov 1, 2009, 10:19:41 PM11/1/09
to
Looking for an automated way of converting a BASIC program done on a
48K Spectrum to one for the ZX81. It's obvious that some things cannot
be done on the ZX81 but, having that in mind, is there any known tool
that can automate the process and warn if something has to be changed
if it's not possible on the ZX81? Thanks.

Chris Young

unread,
Nov 2, 2009, 3:30:48 AM11/2/09
to
On Sun, 1 Nov 2009 19:19:41 -0800 (PST) da kidz on comp.sys.sinclair were rappin'
to MC zxbruno:

Yes, I have done this very thing. Obviously there's a bit of
hand-editing involved.

The second part of the process used Chris Cowley's zxtext2p.

The first part needs a snapshot to text converter. I can't remember
which one I used, but there is one which uses almost exactly the same
codes (for graphics) as zxtext2p.

Chris


--
+-------------------------------------------+
| Unsatisfactory Software - "because it is" |
| http://www.unsatisfactorysoftware.co.uk |
| Your Sinclair: A Celebration |
+- http://www.yoursinclair.co.uk -----------+

DISCLAIMER: I may be making all this stuff up again.

Brian Gaff

unread,
Nov 2, 2009, 5:41:00 AM11/2/09
to
Gawd, I imagine it would be possible but there is a lot of problems, not the
least that yoyou can only have one command per line of the zx 81.

The other way is possible of course, I used ZX Slowloader a lot in the early
days to convert those ICL basic games to the speccy, then add sound graphics
and colour to them.

9 hole golf was a bit boring though.

Brian

--
Brian Gaff - bri...@blueyonder.co.uk
Note:- In order to reduce spam, any email without 'Brian Gaff'
in the display name may be lost.
Blind user, so no pictures please!
"zxbruno" <zxspec...@gmail.com> wrote in message
news:18157b60-1bf3-40b5...@f1g2000prf.googlegroups.com...

GzavSnap

unread,
Nov 3, 2009, 6:46:52 AM11/3/09
to

"zxbruno"
This tool had never been cooded...
The reverse way, Zx81 to Spectrum can be done using "ZxTrans".

You had to use several tools:

Step 1: Binarys to TEXT.
Convert the Zx Spectrum binary file to a text file.
Zxtoken can convert a sna or a tape file to a text file.

Step 2: TEXT editing.
Clear all Spectrum's specifics commands, like "PEN", "INK"...
Add lines while a ":" character is present.
Add lines numbers.(renume if the line is too big, or if the Spectrum line
number is too closed.
(1 print:print 2 go to 1 => 1 PRINT ; 2 PRINT ; 3 GOTO 1)
Change "Go to" in "GOTO", "GO SUB" in "GOSUB", "Randomize" in "RAND"...

Step 3: Text to a zx81 binary file.
ZxToken ... or the XuR.
Both, can make a "P" file up to 16kb.
But, in XuR, you had to initialize the ram card before loading a "TXT" file.
The drag&drop on the XuR icon may hang the memory (up to 16kb).
You had to open the Xur, go to "Reset memory" and select "32k"... or use the
propers pokes to init cards.
Go to "Specify tape & directory", click on "Set Ram to 32Kb", and
double-click on your text file.
A hardware reset will reinit the ram to 16kb.
It's the same way to load a "P" file, up to 16kb.
All illegals command will be converted in ascii codes... and can be removed
in Zx81 Basic editor.
If 32kb is short, you can "optimize" the basic code using the numerics
replacement... or renume the basic programme.
I had to code "SomeThings to Do" in 32kb, and optimize the basic codes to
able to use it in 16kb...
And in 16kb, users (me) can't list or change the basic program due to the
D_file, to big to be expended in 16kb!!!
But, dont optimize the Basic lenght before to be sure to be ready.
All Gotos/sub will be changed to fixe functions (val"1200"... code"A") and
make wake dificulte the basic reading. (LET value=CODE("R") ... ???)
You will be able to save your basic program using SAVE"MYPROG"...
But, don't forget to initialize the 32kb zx81's ram if you had to run it
again...

You can make an audio wav in fast-load using the SAVE"MYPROG.FL".

Have Fun.


zxbruno

unread,
Nov 5, 2009, 1:41:57 AM11/5/09
to
Thank you for all the suggestions. I'm waiting for a reply from one
gentleman who might also be able to help. If I receive more
information I'll share it here. Thanks again.
0 new messages