Page 1 of 2

Small memory dump program

Posted: Tue Aug 14, 2018 12:11 pm
by mrtinb
I needed to check if my loading was correct.

This small program can be easily typed in.

I start the program with GOTO 8. Then COPY to print the screen on the printer. Then CONT to generate the next screen.

Code: Select all

   8 LET S=16393
  10 FOR X=0 TO 65535
  12 IF (X/8)=INT (X/8) THEN PRINT S+X;"   ";
  14 LET B=PEEK(S+X)
  16 LET F=INT(B/16)
  18 LET A=INT(B-F*16)
  20 PRINT CHR$(F+28);CHR$(A+28);" ";
  30 NEXT X

Re: Small memory dump program

Posted: Wed Sep 05, 2018 11:54 am
by zxooner
@mrtinb,

I was wondering - I've written a little routine to allow me to do some drawing on the screen; is there any way that I can use your memory dump program to SAVE the screen (the drawing)?

I'm new to this so forgive my ignorance if it's a daft question!
drawing program
drawing program

Re: Small memory dump program

Posted: Wed Sep 05, 2018 12:07 pm
by mrtinb
ZX81 does not support data files.

However you can SAVE in a program, and the program including it's state is saved. When the program is loaded again, it continues on the line after the SAVE.

Re: Small memory dump program

Posted: Wed Sep 05, 2018 12:12 pm
by zxooner
mrtinb wrote:
Wed Sep 05, 2018 12:07 pm
ZX81 does not support data files.

However you can SAVE in a program, and the program including it's state is saved. When the program is loaded again, it continues on the line after the SAVE.
Hmm, ok i might need to go back to the drawing board for a way to save my pictures then.

I suppose really I could just draw them in an emulator with my program above and take a screenshot, saving the pictures on the PC that way. I kinda like doing everything on the real hardware though ;-)

Re: Small memory dump program

Posted: Wed Sep 05, 2018 12:16 pm
by mrtinb
If you don't need to load the pictures again, but just needs to look at them, the you can just use the COPY command to print the screen's content to the printer. This will work both in EightyOne and on real hardware.

Edit: In the emulator you can save the printer-output to an image file.

Re: Small memory dump program

Posted: Wed Sep 05, 2018 12:41 pm
by zxooner
Is there any way that the data could be sent to the pc instead of a printer (thaf the 81 thinks is a printer) so the picture can be saved on the pc that way? I've pre-ordered the ZXpand+ and I was wondering if the possibility existed alongside a serial link.

Re: Small memory dump program

Posted: Wed Sep 05, 2018 12:55 pm
by mrtinb
If you implement SAVE in your program, the generated .P file can be moved to your PC with the SD-card. Your emulator could then load your file.

Re: Small memory dump program

Posted: Wed Sep 05, 2018 12:57 pm
by zxooner
I've got lots to learn. Will have a play with this once I get the ZXpand. Exciting times!

Re: Small memory dump program

Posted: Wed Sep 05, 2018 1:22 pm
by mrtinb
If you have a PC soundcard that can record the very low recording signal from ZX81, you can data to your PC as .WAV file, and that file can be loaded in EightyOne emulator as well.

(Then you can continue playing until your ZXpand arrives.)

Re: Small memory dump program

Posted: Wed Sep 05, 2018 5:02 pm
by zxooner
mrtinb wrote:
Wed Sep 05, 2018 1:22 pm
If you have a PC soundcard that can record the very low recording signal from ZX81, you can data to your PC as .WAV file, and that file can be loaded in EightyOne emulator as well.

(Then you can continue playing until your ZXpand arrives.)
That sounds like a plan ;-)