Format a DOM in windows and copy a win file to it for QUBIDE?

Nagging hardware related question? Post here!
User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by dilwyn »

Ha ha, they do things differently in vanpeebles-land!!!


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by dilwyn »

If you like modified Sinclair stuff, check out this 50mph C5

https://youtu.be/8ic6dxwx270


User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by vanpeebles »

Peter wrote:
vanpeebles wrote:Hahaha, a DOM is a disc on module, it's a small plug in ide flash storage that fits nicely (and it's powered by the qubide)

http://www.zen70509.zen.co.uk/ql/dom.jpg
Oh my goodness! A white QL! :o
It has white LEDs too! :D


User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by vanpeebles »

Trying to use the habi program to copy my game files to a blank dom. The files copy fine, but I'm getting bad parameter everytime when I try to run them on the QL. I tried adding the files with the header and no header option.

I'm ready to shoot these DOMs with my air rifle :twisted:


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by dilwyn »

Well, the "bad parameter" when you try to EXEC something just means no executable header - somewhere along the line it got lost. I presume that the original file executes correctly.

I have never used the Habi program but some things to think about:

1. Are you transferring from a non-QL format medium (e.g. a Windows hard drive) - AFAIK Habi can't restore a header if it's been lost before transfer.
2. Might the files be in QemuLator format from a native hard drive? Can be checked by copying to the screen or viewing in an editor on QL, at the start of the file you'll find the string "]!QDOS File Header" if it is.
3. Does the original file EXEC correctly from the original medium?

There's a good discussion on the Habi transfer software here viewtopic.php?f=2&t=3124&start=10&hilit=drive+image+cf

Assuming that the dataspace/executable file header has been lost earlier in the process, you can "recreate" the header by checking the dataspace on the original file, assuming it's called WIN1_PROG_EXE. Enter the following command on the original known-to-be-working file. Also assumes this is NOT a qemulator format file:

PRINT FDAT(\WIN1_PROG_EXE)

That gives you the dataspace value, which you'll need to restore the file. Make a note of this value.

Next, on the machine with DOM, check the length of the file with the 'bad parameter' error:

f=FLEN(\WIN1_PROG_EXE)

now respr or allocate enough space to hold the file in memory. If you have ALCHP function from TK2 it's better as you can release the memory later, otherwise use RESPR.

base=ALCHP(f)
LBYTES win1_PROG_EXE,base
SEXEC win1_new_filename,base,f,dataspace_value_you_noted_earlier
RECHP base : rem this releases memory allocated by ALCHP

The SEXEC command saves and creates a file you can execute with EXEC command. I recommend you give a different filename to the original, test the new version and rename them if it works.


Derek_Stewart
Font of All Knowledge
Posts: 3932
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by Derek_Stewart »

Hi,

There is an option to include the executable header when the Habi Editor transfers the file(s) to the Qubide partition


Regards,

Derek
User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by vanpeebles »

I tried all the settings with habi. One set of files was from a floppy disk img directly to the ql-sd bin via qemulator.

Cheers Dilwyn, I shall give this a go :) Fingers crossed! Interesting reading on that thread, I wasn't the only one having issues!


User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by vanpeebles »

Actually reading that thread, it does seem like I'm trying to have a tinkle into the wind, on a very very windy day.

I did wonder last night if it would just be easier to fire everything over as zip files onto the sd card, then unzip on the QL onto the win_


User avatar
vanpeebles
Commissario Pebbli
Posts: 2816
Joined: Sat Nov 20, 2010 7:13 pm
Location: North East UK

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by vanpeebles »

dilwyn wrote:Well, the "bad parameter" when you try to EXEC something just means no executable header - somewhere along the line it got lost. I presume that the original file executes correctly.
Just think, all these years later, and you still helping me with file headers :lol:


User avatar
dilwyn
Mr QL
Posts: 2753
Joined: Wed Dec 01, 2010 10:39 pm

Re: Format a DOM in windows and copy a win file to it for QUBIDE?

Post by dilwyn »

vanpeebles wrote:Actually reading that thread, it does seem like I'm trying to have a tinkle into the wind, on a very very windy day.

I did wonder last night if it would just be easier to fire everything over as zip files onto the sd card, then unzip on the QL onto the win_
If you're confident enough to use Zip for transfers, and all the source files are working OK on the source medium, this is probably as good a method as any - in a zip file, the executables are protected (as long as you use QDOS Zip from Jonathan Hudson of course, not a Windoze zip program.

To do the unzipping at the other end, you can use my "Unzip As A Basic Program" from archivers page on my website, under "Job2Bas" on the archivers page http://www.dilwyn.me.uk/arch/index.html. Being a BASIC program (i.e. not an executable), it's not affected by the loss of headers etc. Once it's on the target medium, just run it. It'll create a copy of Unzip on that medium for you to use to unzip anything you transfer over, thus getting around the catch-22 that you need a copy of unzip to unzip a transferred copy of unzip. There is also a self-extract version of Unzip on the same page which could be used, but a lot of people have problems with that one.

We really need a well-written guide to file transfer for QL systems. There are so many systems now it's getting a bit ridiculous for new QL users. Originally, it was quite easy, pop everything onto a floppy disk and cart it over to the other machine.


Post Reply