Page 1 of 1

Possible to save with ZX81 core?

Posted: Tue Aug 17, 2021 5:21 am
by Tackemon
I'm guessing it's not possible to save a program with the ZX81 core? There's not a whole lot of into on the github page: https://github.com/MiSTer-devel/ZX81_MiSTer, so I wasn't sure.

I have the ADC adapter, but I guess that's "IN" only, right? So in theory if I had a saved program, I could hook up an audio playback device and play it back into that with that core with the LOAD "" command.

Was kind of hoping the audio output jack on the standard I/O board would produce the correct audio after a SAVE command, but it doesn't seem to do anything (at least not according to the meters on my Zoom recorder). Sure would be cool to be able to save. The core would function as a full ZX81 at that point.

On a side note, it was a trip seeing the "K" (keyword!) cursor show up and do those one key commands. It was super easy to flip the video to 60 Hz. Showed up on my CRT TV no problem, though way crisper than I recall with RF, haha. Played some Mazogs. :)

Re: Possible to save with ZX81 core?

Posted: Tue Aug 17, 2021 7:58 am
by antonie
Tackemon wrote: Tue Aug 17, 2021 5:21 am I'm guessing it's not possible to save a program with the ZX81 core? There's not a whole lot of into on the github page: https://github.com/MiSTer-devel/ZX81_MiSTer, so I wasn't sure.

I have the ADC adapter, but I guess that's "IN" only, right? So in theory if I had a saved program, I could hook up an audio playback device and play it back into that with that core with the LOAD "" command.

Was kind of hoping the audio output jack on the standard I/O board would produce the correct audio after a SAVE command, but it doesn't seem to do anything (at least not according to the meters on my Zoom recorder). Sure would be cool to be able to save. The core would function as a full ZX81 at that point.

On a side note, it was a trip seeing the "K" (keyword!) cursor show up and do those one key commands. It was super easy to flip the video to 60 Hz. Showed up on my CRT TV no problem, though way crisper than I recall with RF, haha. Played some Mazogs. :)
I'm not 100% familiar with the core, a possible option is to record the audio on the HDMI - I have an aux output on my HDMI-VGA converter - could work, but have not tried it.

Re: Possible to save with ZX81 core?

Posted: Tue Aug 17, 2021 4:32 pm
by Tackemon
Interesting idea. I tried doing a save and listened through HDMI audio, but didn't hear anything that way either. It's been MANY years since using a real ZX81, but I assume that should be audible. Like a bunch of random screeching.

It would of course be ideal if the core could just quickly spit out a .p file.

Re: Possible to save with ZX81 core?

Posted: Wed Aug 18, 2021 5:04 am
by bazza_12
is it possible to save files on the spectrum core?

Re: Possible to save with ZX81 core?

Posted: Wed Aug 18, 2021 5:39 am
by Chris23235
bazza_12 wrote: Wed Aug 18, 2021 5:04 am is it possible to save files on the spectrum core?
You can save a memory snapshot from the +D and the Multiface Interface.

Re: Possible to save with ZX81 core?

Posted: Fri Aug 20, 2021 5:05 am
by Tackemon
A follow-up: experimented with a couple of ZX81 software emulators. Some are like the ZX81 MiSTer core, where they're really just for loading existing content.

There's one called EightyOne though, which has extensive support for saving. It's got a proprietary format called .tzx for instant loads and saves. It also support loading and saving snapshots via .z81 files, .wav audio files, and yes, .p files.

So I created a one line BASIC program, dumped it to .p, and the MiSTer core was able to load it. Pretty cool.

It sounds like some assemblers out there are also able to directly output .p, so for assembly programs that would be super handy.

On a side note, I dug out a Timex Sinclair 1000 that I've never fired up before and it works fine. With the right cable (with a mono jack on one side), should be able to play back "tapes" in WAV format to it from a laptop or whatever.

Out of curiosity, I played my program as a WAV file in an audio player. Yeah, pretty nasty, haha.

Re: Possible to save with ZX81 core?

Posted: Fri Aug 20, 2021 5:48 am
by Chris23235
Tackemon wrote: Fri Aug 20, 2021 5:05 am

There's one called EightyOne though, which has extensive support for saving. It's got a proprietary format called .tzx for instant loads and saves. It also support loading and saving snapshots via .z81 files, .wav audio files, and yes, .p files.
Just as a side note, TZX is not a proprietary format, it comes from the ZX Spectrum world and was designed for tape images that have special loaders (e.g. Turbo loaders):

http://k1.spdns.de/Develop/Projects/zas ... ormat.html

It is probably overkill for the ZX81 but then, why not?

Re: Possible to save with ZX81 core?

Posted: Fri Aug 20, 2021 8:07 am
by bazza_12
so in short the core requires and update? in the meantime use and emulator?

Re: Possible to save with ZX81 core?

Posted: Fri Aug 20, 2021 4:07 pm
by Tackemon
Chris23235 wrote: Fri Aug 20, 2021 5:48 am
Tackemon wrote: Fri Aug 20, 2021 5:05 am

There's one called EightyOne though, which has extensive support for saving. It's got a proprietary format called .tzx for instant loads and saves. It also support loading and saving snapshots via .z81 files, .wav audio files, and yes, .p files.
Just as a side note, TZX is not a proprietary format, it comes from the ZX Spectrum world and was designed for tape images that have special loaders (e.g. Turbo loaders):

http://k1.spdns.de/Develop/Projects/zas ... ormat.html

It is probably overkill for the ZX81 but then, why not?
TIL

Re: Possible to save with ZX81 core?

Posted: Fri Aug 20, 2021 4:07 pm
by Tackemon
bazza_12 wrote: Fri Aug 20, 2021 8:07 am so in short the core requires and update? in the meantime use and emulator?
That's the conclusion I came to, yeah.

Re: Possible to save with ZX81 core?

Posted: Sat Aug 21, 2021 12:06 pm
by pgimeno
It would be great if it supports the ADC and is able to save through the DAC. I missed the peculiar ZX81 noise so much that I made a program for the Spectrum to save in ZX81-compatible format. This is a Spectrum program that saves Mazogs for the ZX81: http://www.formauri.es/personal/pgimeno ... vezx81.tap; load with LOAD ""CODE, run with RANDOMIZE USR 32768

And the source: http://www.formauri.es/personal/pgimeno ... vezx81.asm (by changing the last `incbin` to include something else, it can save any .P file after reassembly).

Re: Possible to save with ZX81 core?

Posted: Mon Aug 23, 2021 1:57 am
by Tackemon
Ha, I just converted a Mazogs .p file to a WAV file and tried to load it into a real TS1000 via audio player on a laptop. The flipped out stuff on the CRT looked right, but after playing the full five minute file, the TS1000 went into a weird state. A 13MB audio file to load 16KB in five minutes, lol.

It did load fine back into the EightyOne emulator though.

I was able to convert my own one-line ZX81 BASIC program from EightyOne to WAV and it did load into the real hardware, so that was pretty fun to see.

I guess the emulator is really the way to go for now, since it can save instantly and supports all possible file formats. If the MiSTer core could do instant .p saves and maybe even be able to dump WAV files out directly, that would be pretty great though.

Re: Possible to save with ZX81 core?

Posted: Mon Aug 23, 2021 7:58 am
by akeley
You can open an issue/feature request on git: https://github.com/MiSTer-devel/ZX81_MiSTer