Anybody know what program can:
Does anybody know of a PC program (or a "set") that can scan through a BASIC program, and replace "D*, D1 or D2" with two spaces. Then, save that scanned BASIC program as a TZX or TAP file?
On the Spectrum, DT Toolkit does exactly this, but adds silly beeps to the start or end of the file, and wheras I could live with that, it doesn't actually help too much as I still then have to save the altered file to the PC anyway.
To explain better what I need, I'll explain what I want to use it for. Pretty things like menus would be nice, but not necessary.
First, I want to scan a basic loader program and remove the +D loading syntax and replace with tape loading syntax. This is as easy as simply removing all occurances of D*, D1 or D2. Rather than alter the file length, I replace these two characters with spaces. I then compare filenames, as tape IS case sensitive, +D floppy isn't. I simply make sure they match. I then resave this file to +D floppy. Then I load Transit and copy the BASIC, screen and main file block to the PC running Cool Edit. Then I TZX the wav files and load them into Spectaculator AND a real Spectrum to test them. If they pass I save them to the proper folder on my hard drive. I then update my (as yet unpublished) website accordingly.
If I could do this on the PC, it would save so much time, but no emulator I know of can either handle +D floppies or save files as TZX/TAP. RealSpec comes close, it's just really too difficult to get to grips with.
On the Spectrum, DT Toolkit does exactly this, but adds silly beeps to the start or end of the file, and wheras I could live with that, it doesn't actually help too much as I still then have to save the altered file to the PC anyway.
To explain better what I need, I'll explain what I want to use it for. Pretty things like menus would be nice, but not necessary.
First, I want to scan a basic loader program and remove the +D loading syntax and replace with tape loading syntax. This is as easy as simply removing all occurances of D*, D1 or D2. Rather than alter the file length, I replace these two characters with spaces. I then compare filenames, as tape IS case sensitive, +D floppy isn't. I simply make sure they match. I then resave this file to +D floppy. Then I load Transit and copy the BASIC, screen and main file block to the PC running Cool Edit. Then I TZX the wav files and load them into Spectaculator AND a real Spectrum to test them. If they pass I save them to the proper folder on my hard drive. I then update my (as yet unpublished) website accordingly.
If I could do this on the PC, it would save so much time, but no emulator I know of can either handle +D floppies or save files as TZX/TAP. RealSpec comes close, it's just really too difficult to get to grips with.
Post edited by DEATH on
Oh bugger!<br>
Comments
Edit: Can you not create +D disk images and put those up on the web? It's not as if the +D isn't widely supported.
D.
Hmmm, but it doesn't seem to be supported widely enough. There's nothing I can find that will read and write directly to a +D floppy (in the A: drive f a PC) Now if SAMDISK could extract all the files from an image or real floppy, then that would be half of what I need. Taper (and maybe Tapir) could do the rest.
Paul, sorry mate, I sound so ungrateful - I'd use BASin if it would save me some time, but I don't think it will.
BASin does everything except work directly with MGT images - so I have to tap/tzx the files I want to convert in the first place, which involves sampling. I may as well manually alter the loading syntax before I sample it.
Dom, I've seen you post before. I don't suppose you are Mr M are you?
Anyway, what does your program do? If it dumps off all the files from a +D disk (or image), then yes, that would be very useful indeed - I can then use BASin as Paul suggested to alter the loading syntax. Can I put files back onto a disk/into an image file?
It doesn't support saving files to the disc image but give me a couple of years and I'll get around to adding it! :) If it's helpful, download it from http://www.rst38.org.uk/spectrum/pdread.zip
I still use DiscDOS even today! It's good to see you on here Dom.
Lloyd.
I've been concentrating on the image side of it, but since SamDisk/dir a: shows MGT files, it would be useful to have a feature to bulk-extract them too. I probably won't have anything for adding files to existing images for quite a while, but there are a number other solutions for that...
I still use Disk Image Manager for adding/removing individual files from disks, though it'll give tokenised BASIC blobs rather than text, which might not be what you want. It does have real disk support, but only for Win9x. You also need to rename your .mgt images to have a .dsk extension before the program will let you open them, to match what the old-style SAM images used.
Si
Dom sent a link that would rip the files off a disk, and that's half the battle. I can use Dunny's program to edit the Basic bits and then maybe TAPIR to make a single TZX of all the files that make up a particular game. Since it all gets done on a PC, it should be faster. :)
Thanks to all those who helped, assuming things go to plan, my problem should be solved :)
Now that's an idea!
I wonder if there would be a checksium or something error....
Only one way to find out!
You may have to take care of the (unlikely) cases where the string you're searching for is split across a sector boundary. The final 2 bytes in most MGT sectors hold the track+sector for the next block, and it's possible the "D1" is split across that. I suppose you could still bulk-extract and then do the search and replace on the BASIC files.
Si
Is there a published spec for the format? Have I asked this before? The RealSpectrum site has a fair bit of info on the PlusD.
When a basic prog is saved to disk is it similar to saving to tape in that you get two copies of the program, 1 that is the bytes in memory that are actually interpreted when run and 1 that is the ytes displayed when the prog is listed?
Have you tried zxspin's support of the PlusD yet? that might help speed up testing after a search and replace.
I also find RealSpec difficult to use (not impossible) but it also seems to mess with that files if they are overwritten in the disc images, but I can't pin that down just yet.
Si
I've done a small test on Utils disk 1 from the library, and so far, all the files want to load from tape - which is EXACTLY how I want them. I still have to get them over to the PC, but Dom's program will save me having to send them via tape.
I appreciate the help guys, if ya ever get a duff Speccy, you know where to send it......
Lloyd.
On a small wooden raft?
Burning in a blaze of glory?
The util we need here is one which can lift the code from the disk and drop it straight into a .tzx...
Wasn't there a post earlier today about something similar?
could go partway...
Thanks to an idea by Dekh and software by (among others) Dunny, Woody and Simon, the process is now very much speeded up as it's done on the PC. Only now use the Spectrum to test :) I also have somebody helping now too, with ready to run TZX files. All I do is test!