How to inject programs into zx81 memory?

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: How to inject programs into zx81 memory?

Post by PokeMon »

Sorry Paul, now you are wrong.
What you show is a program containing the program line
1 SAVE "ADVENT"

Surely this has to be saved as it is part of the program but programs not containing this or similar comments or statements don't have this information.
If you just enter "SAVE "ADVENT" it will be save without ADVENT in the .p file.
poglad
Posts: 133
Joined: Mon Mar 24, 2014 3:11 pm
Location: Aberdeen, Scotland

Re: How to inject programs into zx81 memory?

Post by poglad »

Ah... okay, I accept the correction! :)
sirmorris
Posts: 2811
Joined: Thu May 08, 2008 5:45 pm

Re: How to inject programs into zx81 memory?

Post by sirmorris »

Also there are no headers in a P file - it is just a dump of the system variables from $4009 onward to the $80 marker at E_LINE-1. Nothing more, nothing less.
Harbaum
Posts: 9
Joined: Mon Jun 23, 2014 10:42 pm

Re: How to inject programs into zx81 memory?

Post by Harbaum »

PokeMon wrote:Sorry Paul, now you are wrong.
What you show is a program containing the program line
1 SAVE "ADVENT"

Surely this has to be saved as it is part of the program but programs not containing this or similar comments or statements don't have this information.
If you just enter "SAVE "ADVENT" it will be save without ADVENT in the .p file.
I have to admit that i an a complete noob with respect to zx81, but i think you are also wrong :-)

There's simply the ZX81's DFILE included in any .P file. And since you just typed "save "advent" it was displayed on screen while the file was saved and thus it's include as part of the DFILE in the .P file.
poglad
Posts: 133
Joined: Mon Mar 24, 2014 3:11 pm
Location: Aberdeen, Scotland

Re: How to inject programs into zx81 memory?

Post by poglad »

Okay, everybody - I was wrong, yeah? :lol:
Harbaum
Posts: 9
Joined: Mon Jun 23, 2014 10:42 pm

Re: How to inject programs into zx81 memory?

Post by Harbaum »

poglad wrote:Okay, everybody - I was wrong, yeah? :lol:
I was referring to Pokémon. He was imho also wrong.

My tape emulation just worked for the first time and i played a little bit tetris1k on the zx01. But few games I tested work. Hires doesn't seem to work at all on the zx01.

I'll release all the code tomorrow and if one of you owns a MIST FPGA board he might give it a try. I know that at least one of you guys has one ...
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: How to inject programs into zx81 memory?

Post by XavSnap »

Hi,
If you just enter "SAVE "ADVENT" it will be save without ADVENT in the .p file.
The ".P" files from Xtender, aren't the true wave file mirror. Xtender used to patch le printer buffer with the Zx81 name, but the true Zx name can't be retrieved on a ".p" file.
The ".81" files is the true Mirror of Zx81's tape programs, it include de Bloc header "MYZX81NAMe", where the low case "e" is a reversed character to end the name header bloc.

".81" files equal : <name header> & "P" memory file.
In a "P" file, the name tag is lost...
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
PokeMon
Posts: 2264
Joined: Sat Sep 17, 2011 6:48 pm

Re: How to inject programs into zx81 memory?

Post by PokeMon »

Harbaum wrote:I have to admit that i an a complete noob with respect to zx81, but i think you are also wrong :-)

There's simply the ZX81's DFILE included in any .P file. And since you just typed "save "advent" it was displayed on screen while the file was saved and thus it's include as part of the DFILE in the .P file.
No - I am not wrong.
Did you prove or just guess ?
So I tried the EightyOne, with no data, enter SAVE "P" + NEWLINE which results in a short p-file with included DFILE without that SAVE command.
Even if you enter PRINT "HELLO" first and enter the SAVE command with this statement still on screen it would be saved without any text, just an empty DFILE.
8-)
Harbaum
Posts: 9
Joined: Mon Jun 23, 2014 10:42 pm

Re: How to inject programs into zx81 memory?

Post by Harbaum »

Neither. I tested it but misinterpreted the result. A hello world program also contains this string inside its basic code. I saw that and thought it'd be the dfile.

Sorry. That proves that i am a zx81 noob. Although a zx81 was the first computer i touched in my life.
poglad
Posts: 133
Joined: Mon Mar 24, 2014 3:11 pm
Location: Aberdeen, Scotland

Re: How to inject programs into zx81 memory?

Post by poglad »

XavSnap wrote:".81" files equal : <name header> & "P" memory file.
In a "P" file, the name tag is lost...
Now this explains everything. I always thought .P files and .81 files were the same, just a renamed extension. So what I described was in fact the .81 file - thank you for the explanation! :)
Post Reply