ZX Spectrum Next: Problem Saving Basic Programs

Agrajag
Posts: 5
Joined: Tue May 18, 2021 8:24 am
Has thanked: 1 time
Been thanked: 6 times

ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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?

User avatar
NML32
Posts: 298
Joined: Sun May 24, 2020 6:57 pm
Has thanked: 301 times
Been thanked: 51 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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).
Agrajag
Posts: 5
Joined: Tue May 18, 2021 8:24 am
Has thanked: 1 time
Been thanked: 6 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
antonie
Posts: 49
Joined: Mon May 25, 2020 7:03 pm
Has thanked: 2 times
Been thanked: 3 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
Bendz
Posts: 3
Joined: Sun May 24, 2020 10:59 pm
Been thanked: 3 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
caffeinekid
Posts: 77
Joined: Wed Nov 04, 2020 10:03 am
Has thanked: 24 times
Been thanked: 16 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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. :)
Agrajag
Posts: 5
Joined: Tue May 18, 2021 8:24 am
Has thanked: 1 time
Been thanked: 6 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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 :(
Bendz
Posts: 3
Joined: Sun May 24, 2020 10:59 pm
Been thanked: 3 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post by Bendz »

I've raised this as an issue on GitHub
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
antonie
Posts: 49
Joined: Mon May 25, 2020 7:03 pm
Has thanked: 2 times
Been thanked: 3 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post by antonie »

Additional comments, more clarity provided in Github.
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
Attachments
ZXNext.rbf
(2.88 MiB) Downloaded 363 times
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
Attachments
ZXNext-fix_20220217.rbf
(2.89 MiB) Downloaded 366 times
cathrynmataga
Posts: 114
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 150 times
Been thanked: 20 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post by cathrynmataga »

Nice work. Now I'm going to have to try this out. Thanks!
cathrynmataga
Posts: 114
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 150 times
Been thanked: 20 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
cathrynmataga
Posts: 114
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 150 times
Been thanked: 20 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.
User avatar
Breaking Hard
Posts: 9
Joined: Sat Mar 13, 2021 6:41 am

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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
User avatar
Breaking Hard
Posts: 9
Joined: Sat Mar 13, 2021 6:41 am

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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
User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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
caffeinekid
Posts: 77
Joined: Wed Nov 04, 2020 10:03 am
Has thanked: 24 times
Been thanked: 16 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post by caffeinekid »

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

User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.

cathrynmataga
Posts: 114
Joined: Fri Aug 06, 2021 5:30 pm
Has thanked: 150 times
Been thanked: 20 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.)

User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.

jsj
Posts: 1
Joined: Tue May 26, 2020 2:54 pm
Has thanked: 1 time
Been thanked: 1 time

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post by jsj »

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

User avatar
Sorgelig
Site Admin
Posts: 890
Joined: Thu May 21, 2020 9:49 pm
Has thanked: 2 times
Been thanked: 214 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.

User avatar
pgimeno
Top Contributor
Posts: 709
Joined: Thu Jun 11, 2020 9:44 am
Has thanked: 277 times
Been thanked: 226 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.

caffeinekid
Posts: 77
Joined: Wed Nov 04, 2020 10:03 am
Has thanked: 24 times
Been thanked: 16 times

Re: ZX Spectrum Next: Problem Saving Basic Programs

Unread post 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.

Post Reply