Modern methods of saving BASIC programs

For experts to discuss very technical stuff and newbies to ask why the Spectrum they bought off ebay doesn't work.
User avatar
Morpheus
Microbot
Posts: 124
Joined: Thu Nov 16, 2017 4:18 pm
Location: Hurworth-On-Tees, UK
Contact:

Modern methods of saving BASIC programs

Post by Morpheus »

Hi
I am a bit out of the loop these days and was wondering what hardware and methods do most people use for saving progress for any programs they are working on. I am talking about a 48K Rubber Key or 48K+ only i don't have a +2/+3 and talking about real hardware not Emulators or do most people use the likes of Fuse or Speculator now for software development. I still have my old Microdrives but the cartridges are proving unreliable and replacements off eBay are proving to be just as flaky.
I was thinking of getting a Beta Disk Interface and a Gotek USB Drive
R Tape loading error, 0:1
User avatar
Ast A. Moore
Rick Dangerous
Posts: 2640
Joined: Mon Nov 13, 2017 3:16 pm

Re: Modern methods of saving BASIC programs

Post by Ast A. Moore »

I don’t develop on my Spectrums, though. I use them for testing my code, especially some model-specific code, but otherwise, I find it counterproductive. (Not to mention that avoiding the unnecessary stress on the old hardware by having it run hours on end is generally a good idea, too.)

However, I sometimes put the finishing touches on loading screen in Art Studio running on an actual Spectrum connected to a CRT TV, because no emulator or LCD will give you the correct colors. I then save the screen to tape and record the audio to my computer or phone. Then I convert it to a tape file. Simple and very reliable.
Every man should plant a tree, build a house, and write a ZX Spectrum game.

Author of A Yankee in Iraq, a 50 fps shoot-’em-up—the first game to utilize the floating bus on the +2A/+3,
and zasm Z80 Assembler syntax highlighter.
chequered flag
Drutt
Posts: 31
Joined: Sat Mar 10, 2018 7:22 am

Re: Modern methods of saving BASIC programs

Post by chequered flag »

vDrive

Probably the least used hardware. Drop in replacement of real Microdrive.

https://vdrivezx.com/
User avatar
Morpheus
Microbot
Posts: 124
Joined: Thu Nov 16, 2017 4:18 pm
Location: Hurworth-On-Tees, UK
Contact:

Re: Modern methods of saving BASIC programs

Post by Morpheus »

chequered flag wrote: Thu Jul 12, 2018 8:18 pm vDrive

Probably the least used hardware. Drop in replacement of real Microdrive.

https://vdrivezx.com/
I did have one reserved but had to let it go due to financial pressures I do like this solution a lot though.
R Tape loading error, 0:1
User avatar
Morpheus
Microbot
Posts: 124
Joined: Thu Nov 16, 2017 4:18 pm
Location: Hurworth-On-Tees, UK
Contact:

Re: Modern methods of saving BASIC programs

Post by Morpheus »


As I understand them the DivMMC "type" load games where you can use a NMI to get to a menu and save a snapshot file ( .SNA ) but pressing a NMI whilst writing a BASIC program just resets the Speccy which is why I looked at the vDriveZX. I just wondered what other people used, the answer seems to be an emulator and then real hardware at the end so far.
R Tape loading error, 0:1
chequered flag
Drutt
Posts: 31
Joined: Sat Mar 10, 2018 7:22 am

Re: Modern methods of saving BASIC programs

Post by chequered flag »

DivMMC is much more than what is visible from the NMI menu.

You understand the concept of vDrive as 8 virtual Microdrive devices that you can insert virtual cartridges into in the form of MDR files.

DivMMC has similar concepts.
One virtual tape player connected to the EAR port. It is called "tapein".
One virtual tape recorder connected to the MIC port. It is called "tapeout".
Into these virtual tape devices you can insert virtual cassette tapes in the form of TAP files.

DivMMC also has virtual disk drives that you can insert virtual disks into in the form of TRD files.

DivMMC can also take snapshots but that is not what you want I recon.

Now that the concepts are in place maybe the manual makes sense.
https://www.sellmyretro.com/uploaded/im ... _b914a.pdf
chequered flag
Drutt
Posts: 31
Joined: Sat Mar 10, 2018 7:22 am

Re: Modern methods of saving BASIC programs

Post by chequered flag »

I was thinking of getting a Beta Disk Interface and a Gotek USB Drive
Just realized: DivMMC virtual disk drives are Beta Disk with TR-DOS.

TR-DOS is still unfamiliar to me...
User avatar
cha05e90
Dizzy
Posts: 66
Joined: Sun Nov 19, 2017 7:02 pm

Re: Modern methods of saving BASIC programs

Post by cha05e90 »

While I use my DivMMC Future with my 48k ZX Spectrum setups the mentioned vDriveZX is the one I use with my ZX Spectrum 128. I must admit that I'm slightly disappointed I can't use the DivMMC as a "tape replacement" for the 128 one (in 128 Basic!) - it does only work in 48k mode.

So for "serious" 128 usage the DivMMC seems to be rather useless (or maybe it's my fault...:-)).
48K/+/+/+/+128K/Vega/Next&80/81&88
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Modern methods of saving BASIC programs

Post by 1024MAK »

The DivMMC is a development of the DivIDE and as such the limitation of saving is not that of the hardware, but of the operating system that is being used. For example, for the DivIDE there are at least five different operating systems. Some of these are more than capable of writing any file (including BASIC programs) to the mass media when the Spectrum is in '48k' mode. But as the driving force was a system to make loading of games easy and quick, this is the area that got the most attention. So there was less development in other areas. DivIDE was actually designed as a hard disk drive interface. But as there was no standard Sinclair hard disk operating system, some of the DivIDE operating systems actually simulate floppy disks, microdrives etc.

Using in these in '128k' mode is a little tricky, due to the way that the 128 ROM switching takes place. Interception of the single 48k ROM is well understood. But in a 128k machine there are either 2 ROM images in one physical ROM chip (128k and +2) or four ROM images in two physical ROM chips (+2A, +2B, +3 and +3B). Hardware then has to snoop on the Spectrum to work out which ROM image is currently selected, otherwise the interface will page it's own ROM in at the wrong time.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
chequered flag
Drutt
Posts: 31
Joined: Sat Mar 10, 2018 7:22 am

Re: Modern methods of saving BASIC programs

Post by chequered flag »

If "modern" means "for sale now" then the operating system or firmware of DivMMC is esxDOS. It does not work with 128K Basic.

http://www.esxdos.org/index.html

The hardware in DivMMC does not work with Interface 1. So you cannot have DivMMC with Microdrive or vDrive (or ZX NET for those network games).


Here are some more modern DivMMCs.

https://www.bytedelight.com/?product_cat=divmmc-enjoy

https://www.8bits4ever.net/zxspectrum
User avatar
Seven.FFF
Manic Miner
Posts: 735
Joined: Sat Nov 25, 2017 10:50 pm
Location: USA

Re: Modern methods of saving BASIC programs

Post by Seven.FFF »

DivMMC works fine with the 128K BASIC in the +3e ROMS, doesn’t it? That’s what you’d usually get if you wanted to use the two together.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel NXTP ESP Update ESP Reset CSpect Plugins
User avatar
cha05e90
Dizzy
Posts: 66
Joined: Sun Nov 19, 2017 7:02 pm

Re: Modern methods of saving BASIC programs

Post by cha05e90 »

...but the +3e-ROMS aren't operable in a 128k toastrack model? Or are they?
48K/+/+/+/+128K/Vega/Next&80/81&88
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Modern methods of saving BASIC programs

Post by 1024MAK »

cha05e90 wrote: Fri Oct 05, 2018 11:51 am ...but the +3e-ROMS aren't operable in a 128k toastrack model? Or are they?
16K/48K/+ machines use a single 16K byte ROM chip
128K/+2 (gray) machines use a single 32K byte ROM chip
+2A/+2B/+3/+3B machines use two 32K byte ROM chips (the extra ROM contains the disk drive operating system).

The +3e ROMs are a very much improved version of the +2A/+2B/+3/+3B ROMs.

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
bytesguy
Drutt
Posts: 7
Joined: Mon Jan 04, 2021 8:58 am
Location: Cambridge

Re: Modern methods of saving BASIC programs

Post by bytesguy »

Is it possible to save from divmmc as a pure .bas file (text file), rather than saving as .tap? I'm mostly working on a PC myself but sometimes I make on the fly modifications directly on the device. Starting to wonder if it would be any easier to use my Spectrum Next instead?
User avatar
p13z
Manic Miner
Posts: 611
Joined: Sun Feb 17, 2019 10:41 pm
Location: UK
Contact:

Re: Modern methods of saving BASIC programs

Post by p13z »

Using a Spectranet for stuff like this is way easier and more useful than faffing around with olschool local removable media like DivIDE / MMC.
User avatar
1024MAK
Bugaboo
Posts: 3104
Joined: Wed Nov 15, 2017 2:52 pm
Location: Sunny Somerset in the U.K. in Europe

Re: Modern methods of saving BASIC programs

Post by 1024MAK »

The ZX Spectrum does not save files as ‘text’ files. All the keywords are stored as tokens and each program line has hidden data. For example any literal numbers are stored both as visible text digits and in the machines own run time number format.

So you would need an application to convert to and from this data format to get to/from a text file that a normal Windows / Linux / iOS machine application would work okay with.

Are you using an emulator on your PC?

Mark
:!: Standby alert :!:
“There are four lights!”
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb :dance
Looking forward to summer later in the year.
User avatar
bytesguy
Drutt
Posts: 7
Joined: Mon Jan 04, 2021 8:58 am
Location: Cambridge

Re: Modern methods of saving BASIC programs

Post by bytesguy »

p13z wrote: Mon Jan 04, 2021 10:08 am Using a Spectranet for stuff like this is way easier and more useful than faffing around with olschool local removable media like DivIDE / MMC.
Interesting, not seen that before! Might have to check it out
1024MAK wrote: Mon Jan 04, 2021 11:08 am The ZX Spectrum does not save files as ‘text’ files. All the keywords are stored as tokens and each program line has hidden data. For example any literal numbers are stored both as visible text digits and in the machines own run time number format.

So you would need an application to convert to and from this data format to get to/from a text file that a normal Windows / Linux / iOS machine application would work okay with.

Are you using an emulator on your PC?

Mark
Ah yes of course, that makes sense now that I think about it :D At the moment I use zesarux with one of the "recreated" zx spectrums as a keyboard - really looking towards finding a better way to write the basic on a PC (perhaps in VS Code?) then deploy it to an emulator/spectrum for testing. The few things I found seem to rely on the boriel basic compiler which is awesome, but a lot of the time I just want to run pure basic
User avatar
Turtle_Quality
Manic Miner
Posts: 502
Joined: Fri Dec 07, 2018 10:19 pm

Re: Modern methods of saving BASIC programs

Post by Turtle_Quality »

For entering/debugging Spectrum Basic on PC, checkout BASINC , a fork of Dunny's BASIN.
Definition of loop : see loop
AndyC
Dynamite Dan
Posts: 1388
Joined: Mon Nov 13, 2017 5:12 am

Re: Modern methods of saving BASIC programs

Post by AndyC »

BASin (and it's variants) is basically designed for that sort of thing. It's a Windows editor/emulator geared around BASIC programming. I've not used it much, but someone can probably suggest the best version to pick up (I think the latest BASinC was the version recommended last time I read about it)
User avatar
Turtle_Quality
Manic Miner
Posts: 502
Joined: Fri Dec 07, 2018 10:19 pm

Re: Modern methods of saving BASIC programs

Post by Turtle_Quality »

Use BASINC, it's got a few bugfixes and features since BASIN

https://arda.kisafilm.org/blog/?cat=13&lang=en

And it's definitely far easier to input and monitor your basic program from here than on the Spectrum, you've got cut and paste, renumbering, there are watch windows for variable contents, breakpoints, single stepping and various other goodies.
Definition of loop : see loop
User avatar
bytesguy
Drutt
Posts: 7
Joined: Mon Jan 04, 2021 8:58 am
Location: Cambridge

Re: Modern methods of saving BASIC programs

Post by bytesguy »

Thanks all! Looks like I'll be checking out BASINC this evening :mrgreen: Looks perfect for what I need - surprised I didn't stumble across this before!
User avatar
Jbizzel
Dynamite Dan
Posts: 1529
Joined: Mon May 04, 2020 4:34 pm
Location: Hull
Contact:

Re: Modern methods of saving BASIC programs

Post by Jbizzel »

The divide or similar device with the latest esxdos is surely the best modern was to use the spectrum.

You can save to the flash memory or you can load/create a virtual tape and save to a tap file.

You can even swap Tapes while one program is running.

Another option is the 2e/3e but I believe it is more tricky to swap files between the spectrum and pc so exsdos is my preference, although I have both.
User avatar
cha05e90
Dizzy
Posts: 66
Joined: Sun Nov 19, 2017 7:02 pm

Re: Modern methods of saving BASIC programs

Post by cha05e90 »

bytesguy wrote: Mon Jan 04, 2021 9:23 am Is it possible to save from divmmc as a pure .bas file (text file), rather than saving as .tap? I'm mostly working on a PC myself but sometimes I make on the fly modifications directly on the device. Starting to wonder if it would be any easier to use my Spectrum Next instead?
Of course you can save directly to SD card without the need to use a *.tap-file. AFAIK you can for example save your BASIC program with

Code: Select all

SAVE * "myprog" LINE 10
SAVE *  "dev/stuff/myrpog"
But these are - of course - not pure .txt files - but i'm sure somewhere is a esxDOS DOT command that converts tokenised BASIC files to plain .txt files and vice versa! :-)
48K/+/+/+/+128K/Vega/Next&80/81&88
User avatar
flatduckrecords
Manic Miner
Posts: 776
Joined: Thu May 07, 2020 11:47 am
Location: Oban, Scotland
Contact:

Re: Modern methods of saving BASIC programs

Post by flatduckrecords »

[mention]bytesguy[/mention] Remy Sharp has a web based tool for converting between plain text and “+3DOS” (i.e. the format created by SAVE* under esxDOS) that I’ve found really useful.

I supports Next BASIC, but I haven’t had any problems using it with Sinclair BASIC. The webpage will work offline, but if you are familiar with Node/npm you can install it locally as a command line interface as well.
Post Reply