Page 1 of 2

Modern methods of saving BASIC programs

Posted: Thu Jul 12, 2018 6:38 pm
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

Re: Modern methods of saving BASIC programs

Posted: Thu Jul 12, 2018 7:08 pm
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.

Re: Modern methods of saving BASIC programs

Posted: Thu Jul 12, 2018 8:05 pm
by chequered flag

Re: Modern methods of saving BASIC programs

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

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

https://vdrivezx.com/

Re: Modern methods of saving BASIC programs

Posted: Fri Jul 13, 2018 8:49 am
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.

Re: Modern methods of saving BASIC programs

Posted: Fri Jul 13, 2018 8:54 am
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.

Re: Modern methods of saving BASIC programs

Posted: Fri Jul 13, 2018 10:37 am
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

Re: Modern methods of saving BASIC programs

Posted: Fri Jul 13, 2018 12:02 pm
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...

Re: Modern methods of saving BASIC programs

Posted: Fri Jul 13, 2018 1:29 pm
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...:-)).

Re: Modern methods of saving BASIC programs

Posted: Fri Jul 13, 2018 2:20 pm
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

Re: Modern methods of saving BASIC programs

Posted: Fri Jul 13, 2018 5:28 pm
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

Re: Modern methods of saving BASIC programs

Posted: Tue Jul 24, 2018 11:49 pm
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.

Re: Modern methods of saving BASIC programs

Posted: Fri Oct 05, 2018 11:51 am
by cha05e90
...but the +3e-ROMS aren't operable in a 128k toastrack model? Or are they?

Re: Modern methods of saving BASIC programs

Posted: Fri Oct 05, 2018 4:30 pm
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

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 9:23 am
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?

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 10:08 am
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.

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 11:08 am
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

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 11:20 am
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

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 11:28 am
by Turtle_Quality
For entering/debugging Spectrum Basic on PC, checkout BASINC , a fork of Dunny's BASIN.

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 11:29 am
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)

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 11:44 am
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.

Re: Modern methods of saving BASIC programs

Posted: Mon Jan 04, 2021 11:53 am
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!

Re: Modern methods of saving BASIC programs

Posted: Tue Jan 05, 2021 8:18 am
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.

Re: Modern methods of saving BASIC programs

Posted: Tue Jan 05, 2021 9:23 am
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! :-)

Re: Modern methods of saving BASIC programs

Posted: Tue Jan 05, 2021 1:42 pm
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.