Page 1 of 1

ZX Spectrum Next: Problem Saving Basic Programs

Posted: Tue May 18, 2021 8:38 am
by Agrajag

Whenever I try to save any ZX next basic program using something like save "progname.bas", I get the message "Not ready 0:1".

"progname.bas" will be saved to the .VHD but seems to be corrupted and is not recognised by NextBASIC as a basic file when I try to load it.

Anyone else getting this?


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Tue May 18, 2021 11:11 am
by NML32
I was able to save a simple "Hello World" basic program and load it back without any errors. I'm using the second SD card not a .VHD.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Tue May 18, 2021 9:28 pm
by pgimeno
I have the same problem with the .VHD image. If I try to erase it, the disk ends up corrupted (in the sense that dosfsck reports a problem).

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Tue May 18, 2021 9:38 pm
by Agrajag
I haven't noticed any corruption to the VHD image file, The file saved is saved to the correct place and has the correct name, but is always zero bytes in length. The Next's file browser works fine. I can create/delete/rename folders and I can rename/delete files that already exist, I just can't save basic files.

Odd.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Wed May 19, 2021 6:00 pm
by antonie
Agrajag wrote: Tue May 18, 2021 9:38 pm I haven't noticed any corruption to the VHD image file, The file saved is saved to the correct place and has the correct name, but is always zero bytes in length. The Next's file browser works fine. I can create/delete/rename folders and I can rename/delete files that already exist, I just can't save basic files.

Odd.
Confirmed the same regarding writing .bas files to a VHD.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Wed May 19, 2021 8:50 pm
by Bendz
I had the same issue. I though that perhaps having my VHD on an external drive might be causing an issue so I moved it to the SD card. I was able to save until I reset the core and now I am back to square one. Very odd.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Wed May 19, 2021 11:22 pm
by caffeinekid
Well that's a shame and I hope it will be fixed. It would be nice to be able to develop for Next in the core. It would be nice to be able to create and save stuff in all (computer) cores to be honest. :)

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Thu May 20, 2021 12:23 pm
by Agrajag
On a whim I tried release 20210407 and that version allows me to save basic files just fine.

I guess the solution is to use 20210407 until the problem is fixed.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Tue May 25, 2021 1:11 am
by pgimeno
Agrajag wrote: Thu May 20, 2021 12:23 pm On a whim I tried release 20210407 and that version allows me to save basic files just fine.

I guess the solution is to use 20210407 until the problem is fixed.
It seems it's not reported in GitHub and Sorg hasn't noticed this thread. I'm not on GitHub but maybe someone who is can report it.

Losing RTC and TZX support is too much of a loss :(

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Tue May 25, 2021 7:05 pm
by Bendz
I've raised this as an issue on GitHub

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Fri May 28, 2021 12:00 pm
by pgimeno
I see that Sorg has closed it as duplicate. It's not a duplicate:

- The issue happens with no USB drive at all, with the primary SD and a VHD image.
- The configuration saves just fine.
- It's saving BASIC programs that fails.
- The issue is not reproducible in Release 20210407.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun May 30, 2021 11:17 am
by antonie
Additional comments, more clarity provided in Github.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Fri Dec 10, 2021 12:47 pm
by pgimeno
I've bisected the issue and traced it to this commit: https://github.com/MiSTer-devel/ZXNext_ ... 06373b7ae8

This was reported in https://github.com/MiSTer-devel/ZXNext_MISTer/issues/6 but Sorgelig thought that it was a duplicate of https://github.com/MiSTer-devel/ZXNext_MISTer/issues/4 and closed it. That's not the case; the change causing this issue was committed *after* the report.

I've reverted that commit and now it saves properly. Fixed core is attached.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Thu Feb 17, 2022 10:36 pm
by pgimeno
The new release still contains the bug. Apparently Sorg doesn't know about the problem yet. Oh well...

Here's the latest release with the fix applied.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Wed Mar 16, 2022 4:38 am
by cathrynmataga
Nice work. Now I'm going to have to try this out. Thanks!

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Fri Mar 18, 2022 5:15 am
by cathrynmataga
Oh, I did get it working and I actual managed to save a basic file. Hardest part was figuring out where the " key. I found ctrl-p, but now I think crl-' works also. This is such an unusual machine.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sat Mar 19, 2022 9:39 pm
by cathrynmataga
The new core does come up with 'Error opening 'menu.ini/.def'! pretty often. It's weird, I can get it to work, after resetting, and futzing with it, but often it's just printing this message. It's not the patch, both the patch and unpatched do this. The 12/10/21 patched core works a lot more stable is my take it.

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun Nov 20, 2022 8:52 pm
by Breaking Hard
cathrynmataga wrote: Sat Mar 19, 2022 9:39 pm The new core does come up with 'Error opening 'menu.ini/.def'! pretty often. It's weird, I can get it to work, after resetting, and futzing with it, but often it's just printing this message. It's not the patch, both the patch and unpatched do this. The 12/10/21 patched core works a lot more stable is my take it.
There is no ooficial releases of 12/10/21 version https://github.com/MiSTer-devel/ZXNext_ ... n/releases

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Mon Nov 21, 2022 8:02 am
by Breaking Hard
Finaly i manage to run core, i got different errors including Error opening 'menu.ini/.def' and its solved when I change secondary SD sdcard. Some of cards just does not work properly as next card

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Tue Nov 22, 2022 8:17 pm
by pgimeno
Breaking Hard wrote: Sun Nov 20, 2022 8:52 pm There is no ooficial releases of 12/10/21 version https://github.com/MiSTer-devel/ZXNext_ ... n/releases
I think cathrynmataga was talking about this unofficial one: viewtopic.php?p=39223#p39223

Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun Jan 01, 2023 8:03 am
by caffeinekid

I don't understand why this fix isn't in the official core. :?


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun Jan 01, 2023 8:44 am
by pgimeno
caffeinekid wrote: Sun Jan 01, 2023 8:03 am

I don't understand why this fix isn't in the official core. :?

Because I left MS Github to not return, and no other person who reads this thread seems to be willing to reopen issue 6 and tell Sorg that he was wrong because it isn't a duplicate of issue 4, and tell him that the fix is to revert commit e7e7fd56.

So, a question of lack of communication.


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun Jan 01, 2023 8:15 pm
by cathrynmataga

From that thread looks like we need good instructions on how to 'save a basic program' from ZXNext. I'm a tourist in Spectrum-land and this was not at all obvious to me. (I see here my past self-did this, but I'll have to check if I can still do this.)


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Wed Jan 04, 2023 7:31 pm
by pgimeno

Someone just made the problem worse by pointing to issue #6 instead of issue #4. https://github.com/MiSTer-devel/ZXNext_MISTer/issues/11

Issue #6 is NOT about a problem saving configuration. It's about a problem saving BASIC programs. That mistake will just add to the confusion and reinforce the idea that issue 6 is the same as 4, when it's not.


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Wed Jan 04, 2023 8:24 pm
by jsj

I've tried to explain the problem in the above issue. See if sorgelig read it and takes the corresponding actions.


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun Jan 08, 2023 11:56 am
by Sorgelig

I've reverted that commit and update sys to latest.
Please test against possible regressions. I don't remember what that change was for.
I strongly suggest to use a normal ZX Spectrum core. It's by all features a best ZX core with cycle accuracy and all real ZX models emulation. And it doesn't require ugly VHD container. ZX Next is just for fun, for specific ZX next games. Don't use it for Basic.


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun Jan 08, 2023 8:21 pm
by pgimeno
Sorgelig wrote: Sun Jan 08, 2023 11:56 am

I've reverted that commit and update sys to latest.
Please test against possible regressions. I don't remember what that change was for.

Thanks a lot! When I investigated it, judging by the dates I concluded that this commit was introduced in an attempt to fix issue #4, which didn't fix it but it also caused this new problem. Probably introduced when you posted this comment: https://github.com/MiSTer-devel/ZXNext_ ... -815279597 because that version is the first one that has the save bug.

Sorgelig wrote: Sun Jan 08, 2023 11:56 am

I strongly suggest to use a normal ZX Spectrum core. It's by all features a best ZX core with cycle accuracy and all real ZX models emulation. And it doesn't require ugly VHD container. ZX Next is just for fun, for specific ZX next games. Don't use it for Basic.

I use the Spectrum core for most Spectrum things, but the Next also has a unique BASIC with some very nice features, including sprites for example. Using MiSTer for writing Next-specific software is nice.


Re: ZX Spectrum Next: Problem Saving Basic Programs

Posted: Sun Jan 08, 2023 8:47 pm
by caffeinekid

Today is a good day.

I was also going to look into development or BASIC on Next on my MiSTer while I stillllll wait for KS2 to be fulfilled so this is great news. Thank you.