Spectrum machine language files

edited January 2010 in Emulators
Hopefully this will get moderated to the correct forum, if I'm in the wrong place..

I've failed to get my old 48K Spectrum microdrive files, via the audio route, into anything readable by Spectaculator.

I've transferred the files (Basic and Code) to the PC via RS232, using SPEC232.zip I found at http://omega.webnode.com/products/rsp/.

The files are sent with SAVE*"b" from the Spectrum, but as they are in machine language the emulator treats them as unrecognisable.

They LOAD *"b" back to the Spectrum, so it isn't that they are corrupted.

All the converters (makeTzx etc) I have located, expect to use spectrum tape input.

Any help in converting these 'real' Spectrum files to something an emulator can recognise gratefully received.

Thank you
Post edited by optics42 on

Comments

  • edited January 2010
    Any PC file named with a ".bin" extension can be imported anywhere on RAM inside Spectaculator just dragging the file and dropping it on the emulator window, then filling which address you want it to be imported to.

    So take the file you are transferring and rename it to .bin, then import it on the emulator.
  • edited January 2010
    ..then you can save it onto a virtual microdrive.

    (For Spectactulator:
    1) Load bin file is loaded into memory
    2) Create a microdrive cartridge using File->New->Microdrive Cartridge (.mdr)
    3) Format the microdrive cartridge using FORMAT "m";1;"label"
    4) Save the file using SAVE *"m";1;"file" CODE start, length )
  • edited January 2010
    Thanks for the prompt response.

    The Basic and Code files export from the Spectrum in using SAVE*"b" complete with a 9 byte header.

    The 48K manual says that the address of a Spectrum program is 23635.

    I've stripped the header from the basic program saved from the Spectrum, changed the extension to .bin and loaded it to 23565, this just locks the emulator. (I've also tried it without removing the header bytes).

    Should it be loaded to another location?
  • edited January 2010
    ZX Blockeditor is a brilliant (Windows) product which allows you to create and edit ZX tape files (plus disks I believe now?).

    <EDIT> I just read your response, as I was going to mention the 9 byte Interface 1 "B" channel header.

    Also when using I/F 1 it moves PROG (sys variable at 23635/6) to point to 23813 (standard value on Spectrum is 23755). You can't really LOAD a BASIC file as binary into 23813 because you also need to update the system variables, which the ROM does for you when doing a LOAD "".

    Create a TAP file using ZX Blockeditor. Get it to create a normal 17 byte BASIC header and then import you BIN file as the main program block. This should work for you. The help file with ZX Blockeditor is good. Just google for it as I can't remember the URL. It is free.
  • edited January 2010
    Thanks for the input.

    I should have made it clearer that these weren't Z80 instruction code files, but Spectrum machine language.06h=PRINTR, EBh=FOR etc.

    I hadn't tried ZXBlock editor as it referred to 'tape' files...I'll get it now...

    Thanks again
  • edited January 2010
    Have collected the ZX-Blockeditor and it certainly has a pile of options!

    I've tried adding the post-header section of a short basic prog onto the 17 byte header loader block and converted the combination to both .tap and .tzx.

    Spectaculator loads but can't LIST either file.

    Can you suggest how I should be combining the 2 sections or is editing of one or the other needed?
  • edited January 2010
    You've created the header via "Compose datablock" and clicked on the TAP tab? (*not* the BASIC tab - it's a bit misleading!!).
    You'll need to know the length of your BASIC program, and I'm assuming you SAVEd it with no variables - so the variable length would be 0.
    You then need to append a standard datablock (datablocks tab). Click on the folder icon and select your BIN file.

    If it won't LIST then this indicates that the file is not tokenised BASIC. You did remove the 9 byte header? If your first BASIC line is line 10, then the first two bytes should be 00 and 0A (10 decimal)

    Check the first byte pointed to by PROG (23813) - easier in an emulator. If it contains 128 then try POKEing it with zero. This might persuade the program to LIST. (POKE 23813,0 or POKE 23755,0 depending if I/F1 is active or not)

    You said you have some CODE files from microdrives, are any of them SCREEN$ files? If so, then this would be a good way to prove the process of making a working TAP file.
  • edited January 2010
    Thanks Jimmy.

    I redid the file as per your instructions (I had used .bas instead of .tap).

    Tried the POKE's...no joy...then just to check I tried to 'Open' a .tap in Spectaculator from the WOS archive...still nothing.

    Something crippled in the Spectaculator trial??...nope...

    Tried the Cassette Recorder option...progress shows 'Block 1 loading, Block 2 loading'

    Great...

    ...but LIST...still nothing

    Just on the offchance..I tried the Fuse emulator...prog opens runs and lists as expected...so all this hassle must be a case of RTF-Spectaculator-M.
    Thanks again for all the help.

    I will continue to see if I can find out why I can't open these files in Spectaculator...I must have one of the options incorrectly set.
  • edited January 2010
    Just sent you an e-mail about this (more info in there).

    You can just used the emulated Interface 1 to LOAD *b it using the file on your PC as an input file (Tools->Options, ZX Interface 1 tab).

    Cheers,

    Jon.
  • edited January 2010
    Jon, many thanks for the feedback and the email.
Sign In or Register to comment.