using an emulator

Emulator and emulator development specific topics
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: using an emulator

Post by sirmorris »

Here you go, I have attached the listing. I don't know why you're having a problem with zxtool, it's a mystery.

You won't be able to recompile the code as there are a lot of variables stored with the program. No text-to-p converter will handle this presently. The first REM lines warn the user that you need to GOTO 1 instead of using RUN as RUN will clear the variables.

I haven't written the code to dump array types yet, but their names and dimensions are shown. The special graphics characters in the program and variable listing are encoded according to the scheme invented by Chris Cowley for zxtext2p, as detailed here.

At least you will be able to plan your modifications on paper before committing them in an emulator.

C



NUMBR Z = 0
STRNG S = '\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##'
FR/NX L = 33 TO 22 STEP 1
NUMBR N = 14
FR/NX I = 23 TO 22 STEP 1
NUMBR NT = 22
NUMBR ADV = 1.400000
NUMBR CT = 22
FR/NX J = 22 TO 1 STEP -1
NUMBR H = 10
NUMBR A = 14
NUMBR GH = 2
NUMBR GHD = 60.429871
NUMBR GA = 0
NUMBR GAD = 171.016037
NUMBR W = 22
FR/NX K = 22 TO 1 STEP -1
STRNG Q = 'Y'
C-ARR N$(23,10)
C-ARR F$(22,8)
N-ARR I(22)
C-ARR R$(8,10)
N-ARR H(8,2)
N-ARR A(8,2)
N-ARR X(8)
N-ARR Y(8)
N-ARR G(2)
NUMBR B = 2
FR/NX M = 32 TO 42 STEP 1
N-ARR T(22,7)
C-ARR M$(22,22,2)
C-ARR P$(11,4)
C-ARR X$(22)
STRNG T = 'U'
STRNG L = ''
Attachments
footballLeague.A.txt
(12.75 KiB) Downloaded 200 times
oldhand
Posts: 13
Joined: Thu May 10, 2012 9:52 am

Re: using an emulator

Post by oldhand »

the listing you gave was the variable listing, the problem I'm having is listing the progrom from line 10 to 2400.
everything after that is ok. maybe when run fron CMD the space is overwritten if the file is too big.
maybe I will have to find a prong that can write it as txt file.

many thanks for what you have done already
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: using an emulator

Post by sirmorris »

The listing file is attached to my previous post, you need to click the link and download the .txt file; it's not in the body of the post itself.

Alternatively you can pipe the result of the zxtool listing to your own file using a simple redirection:

ZXTOOL footballleague.a.p > mylistingfile.txt

C
oldhand
Posts: 13
Joined: Thu May 10, 2012 9:52 am

Re: using an emulator

Post by oldhand »

my apologies, thought it was the same file. how did you get that from zxtool????
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: using an emulator

Post by sirmorris »

No problem.

I did this:

ZXTOOL footballleague.a.p > footballleague.a.txt

C
oldhand
Posts: 13
Joined: Thu May 10, 2012 9:52 am

Re: using an emulator

Post by oldhand »

you're a star, it worked! but what i failed to understand is that it would not show as a .txt file just a file named the same in text
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: using an emulator

Post by sirmorris »

Glad to help. The tool was not written to output to a text file. The options are as follows:

ZX81 P-file Utility by SirMorris

Largely based on ZX81LIST (C) Jack Raats, Steenbergen 1992

Usage:
ZXTool [p-file name] ([option]...[option])

Options:
v : verbose. Extra information is printed.
list : produce program listing.
vars : produce variable listing.
sysvars : produce system variable listing.
noauto : stop the program from auto-running.
auto=[line] : make the program auto-run from the specified line number.
ext=[line] : extract program line to temp.q
ins : insert/overwrite program line from temp.q

If no options are specified, a listing is performed.
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: using an emulator

Post by sirmorris »

ZXTool is now updated to V1.5. It can dump variable arrays. It can be downloaded from the usual thread.

Here is the output from the football program:
Z = 0

S = "\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"

L = 33 TO 22 STEP 1

N = 14

I = 23 TO 22 STEP 1

NT = 22

ADV = 1.400000

CT = 22

J = 22 TO 1 STEP -1

H = 10

A = 14

GH = 2

GHD = 60.429871

GA = 0

GAD = 171.016037

W = 22

K = 22 TO 1 STEP -1

Q = "Y"

N$(23,10) =
"ARSENAL ", "ASTON VLLA", "BIRMINGHAM", "BRIGHTON ", "COVENTRY ", "EVERTON ", "IPSWICH ", "LEEDS UTD ", "LIVERPOOL ", "MAN.CITY ", "MAN.UNITED", "MIDDLESBRO", "NOT.FOREST", "NOTTS CNTY", "SOUTHAMPTN", "STOKE CITY", "SUNDERLAND", "SWANSEA ", "TOTTENHAM ", "W.BROMWICH", "WEST HAM ", "WOLVES ", " "

F$(22,8) =
"57666563", "76975766", "56643532", "43524233", "34342527", "34242432", "86697844", "67668766", "87969886", "65684738", "66775367", "67557543", "87767957", "34632326", "66566856", "33744426", "56465435", "34343649", "74385668", "68766435", "64783637", "67674336"

I(22) =
7, 9, 3, 18, 2, 8, 10, 1, 17, 19, 11, 12, 13, 22, 15, 4, 20, 6, 21, 5, 16, 14

R$(8,10) =
"%S%K%I%L%L\::\::\::\::\::", "%S%T%R%E%N%G%T%H\::\::", "%E%F%F%O%R%T\::\::\::\::", "%A%T%T%A%C%K\::\::\::\::", "%D%E%F%E%N%C%E\::\::\::", "%M%A%N%A%G%E%R\::\::\::", "%F%I%T%N%E%S%S\::\::\::", "%L%U%C%K\::\::\::\::\::\::"

H(8,2) =
1.749316, 7.608783
1.003281, 26.264420
22.303271, 19.768634
33.720996, 7.118774
0.813733, 40.283496
19.455399, 45.826245
0.324664, 22.677155
39.859155, 1.468530

A(8,2) =
11.228027, 0.525696
1.124695, 1.776733
20.051147, 11.880341
12.073975, 0.925781
0.877991, 14.804688
6.781311, 16.329254
1.966553, 10.481323
35.065796, 3.706055

X(8) =
4, 1, 4, 6, 1, 5, 2, 7

Y(8) =
1, 5, 3, 1, 8, 6, 6, 1

G(2) =
0, 0

B = 2

M = 32 TO 42 STEP 1

T(22,7) =
6, 3, 4, 4, 2, 0, 1
7, 3, 5, 3, 2, 1, 0
7, 3, 6, 3, 2, 1, 0
2, 3, 3, 4, 0, 2, 1
1, 3, 3, 6, 0, 1, 2
2, 3, 3, 8, 0, 2, 1
9, 3, 9, 3, 3, 0, 0
6, 3, 4, 3, 2, 0, 1
9, 3, 7, 2, 3, 0, 0
6, 3, 4, 3, 2, 0, 1
3, 2, 2, 2, 1, 0, 1
3, 2, 2, 2, 1, 0, 1
3, 3, 4, 4, 1, 0, 2
0, 3, 1, 7, 0, 0, 3
3, 3, 3, 5, 1, 0, 2
0, 3, 3, 8, 0, 0, 3
5, 3, 8, 3, 1, 2, 0
7, 3, 6, 3, 2, 1, 0
4, 3, 4, 5, 1, 1, 1
2, 3, 3, 4, 0, 2, 1
1, 3, 3, 5, 0, 1, 2
3, 3, 4, 4, 1, 0, 2

M$(22,22,2) =
" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "6 ", "65"
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "6>", "6 "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "M ", "6>", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ">6", "> ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "> ", "<M", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "7?", "> ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "M ", "PI<", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ")6", "6 ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "6 ", "L<", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "65", "5 ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", "6)", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", ")6", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", " 6", "56", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " ", " ", "<L", " 5", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", " M", "6)", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " ", " ", "<PI", " 6", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", " >", "?7", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " ", " ", "M<", " >", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", " M", "6>", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " ", " ", ">6", " >", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, " 6", ">6", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "
, "56", " 6", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "


P$(11,4) =
"\' +\''\ '", "\ '-\''\ '", "\''<\. \ '", "\. =\ '\ '", "\: )\ '\ '", "\.'>\ '\ '", "\:'?\. \ '", "\##(\''\ '", "\,,$\''\ '", "\~~:\''\' ", " "

X$(22) =
"1111111111 1111111111"
T = "U"

L = ""
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: using an emulator

Post by XavSnap »

Hi,

There's "ZxTools projects" too ! (win32)
http://dskcenter.free.fr/zxtools.html

"Zxtoken" or "Vb81 Xur" ...
Just install the Zx81_riched fonts in the windows "Fonts" system folder.
Open the note-pad, change the font and load the text file...

There's some type-in zx81 exemples from :
http://www.abandonware-magazines.org/af ... g=7&page=1

or http://hebdogiciel.fr/ to retrieve type-ins programs...
http://www.hebdogiciel.fr/ZX81.htm

OCR type-ins help: (fr!)
http://www.hebdogiciel.fr/ocrzx81

note: - In "Vb81 XUR" just type LOAD"MYPROGRAM.TXT" (the text file will be created in the current directory)
- Use the folder explorer to load a text file.
- The zx2p caracters codes aren't compatibles.
Have Fun!
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply