Question about virtual tapes on the Next

Discuss ZX Spectrum Next Games, Tools and more.
javimm
Posts: 6
Joined: Thu Nov 05, 2020 2:47 pm

Question about virtual tapes on the Next

Postby javimm » Wed Nov 25, 2020 8:48 pm

Hi.

While waiting for the Next to arrive, I'm reading through the manual and testing some things on the CSpect emulator. One thing I was trying was loading the HiSoft Gens assembler. I used a .tap file, used the browser to load it in 48K mode, and after entering a small machine language program, I wanted to save it to tape.
After using the save option, the usual saving procedure started with the red/blue lead tone and blue/yellow data. Is there any option to redirect the save procedure and save to a .tap file instead of real tape?. I've been doing that in emulators for quite some time, but I don't know if the Next allows that.
The manual explains how to use virtual tapes in NextBasic. It also talks about the NMI option of changing TAP files, but I can't use the NMI button on CSpect (or at least I haven't found how to use it). My intention is to be able to select a TAP file at any time and when a program needs to save some data, the selected TAP file is used to store that data.
Saving to a virtual tape file and being able to choose which virtual tape to use is very convenient!.

I'd also like to ask if a TAP file can be "rewound" to a certain spot. There are quite a few games and programs that asks you to stop/rewind the tape. Is that possible?

Thank you!.
Last edited by javimm on Wed Nov 25, 2020 11:12 pm, edited 1 time in total.

javimm
Posts: 6
Joined: Thu Nov 05, 2020 2:47 pm

Re: Question about virutal tapes on the Next

Postby javimm » Wed Nov 25, 2020 9:43 pm

To partially answer my own question, I've just found that using the .tapein and .tapeout in NextBasic I just can redirect the load/save flow to a .tap file. YES!. The problem is that I can't change the tapein/tapeout while a program is executing. That would be useful, as I could want to load a program from a TAP file and then load the data stored in another TAP file.
How about the NMI option? Is it equivalent? And about the virtual tape "rewinding"?.

Alcoholics Anonymous
Posts: 775
Joined: Mon May 29, 2017 7:00 pm

Re: Question about virtual tapes on the Next

Postby Alcoholics Anonymous » Fri Nov 27, 2020 7:11 pm

As you found out the LOAD and SAVE streams are considered separate so you can attach separate tap files with .tapein and .tapeout.

The NMI menu lets you change what files are attached to .tapein and .tapeout at any time.

Stop / rewind happens automatically. The tap file is only read when the program tries to load something and when it reaches the end of the tap file, it loops to the beginning. Multiloader games just work.

javimm
Posts: 6
Joined: Thu Nov 05, 2020 2:47 pm

Re: Question about virtual tapes on the Next

Postby javimm » Fri Nov 27, 2020 8:46 pm

Alcoholics Anonymous wrote:
Fri Nov 27, 2020 7:11 pm
As you found out the LOAD and SAVE streams are considered separate so you can attach separate tap files with .tapein and .tapeout.

The NMI menu lets you change what files are attached to .tapein and .tapeout at any time.

Stop / rewind happens automatically. The tap file is only read when the program tries to load something and when it reaches the end of the tap file, it loops to the beginning. Multiloader games just work.
Thank you very much for the info.
That's great news then. I was worried that I could only change the virtual tape using the two commands in basic, voiding the possibility of doing it while running a program. If using the NMI allows that, this problem is completely solved as I just will be able to switch tapes on the fly if needed.
It seems that the Next team has thought of everything. I'm really glad I managed to buy one even if I missed both KSs. I can't wait for it to arrive :D

I was asking about the rewind option because there are certain programs that have mutiple utilities on the same tape. In reality it's not that critical, because I can always create a TAP file for each of those programs.
I remember that one example was Combat School. If my memories are correct, I had to reset the tape counter because the game loaded the main game and then each level was loaded separately. I think the game asked that you reset the counter before reading the first level because if you managed to pass it and failed in a higher level, the first level had to be loaded again and it was somewhere in the middle of the tape!. This is no problem now, because I just can load the 128K version and avoid the problem completely.

Alcoholics Anonymous
Posts: 775
Joined: Mon May 29, 2017 7:00 pm

Re: Question about virtual tapes on the Next

Postby Alcoholics Anonymous » Sun Nov 29, 2020 2:45 am

javimm wrote:
Fri Nov 27, 2020 8:46 pm
I was asking about the rewind option because there are certain programs that have mutiple utilities on the same tape. In reality it's not that critical, because I can always create a TAP file for each of those programs.
There is an input browser in the NMI menu that lets you move the current tape position within the tap file. I don't know if that happens for output as that's a bit more difficult. Do you insert? Overwrite? At least if I use saving I always append. It might only append on saving.

As long as the program is loading by name or identifies code blocks by some naming mechanism, the program will just continue to skip over the wrong blocks and eventually find what it is looking for when the tap file wraps around. This is very fast because these tap files are on sd card.

javimm
Posts: 6
Joined: Thu Nov 05, 2020 2:47 pm

Re: Question about virtual tapes on the Next

Postby javimm » Sun Nov 29, 2020 2:39 pm

Alcoholics Anonymous wrote:
Sun Nov 29, 2020 2:45 am
javimm wrote:
Fri Nov 27, 2020 8:46 pm
I was asking about the rewind option because there are certain programs that have mutiple utilities on the same tape. In reality it's not that critical, because I can always create a TAP file for each of those programs.
There is an input browser in the NMI menu that lets you move the current tape position within the tap file. I don't know if that happens for output as that's a bit more difficult. Do you insert? Overwrite? At least if I use saving I always append. It might only append on saving.

As long as the program is loading by name or identifies code blocks by some naming mechanism, the program will just continue to skip over the wrong blocks and eventually find what it is looking for when the tap file wraps around. This is very fast because these tap files are on sd card.
Well, that's even better. Being able to position the tape solves the rest of the potential problems. About positioning the output, I agree that it depends of the user intention, but a good compromise would be to always append. You can't insert in a real tape if the two existing blocks are close to each other anyway, so appending is the more natural approach. You can always create a new tape from scratch if you just want to overwrite.

Thank you.


Who is online

Users browsing this forum: No registered users and 5 guests