roninfourseven wrote:roninfourseven wrote:stephen_usher wrote:How did you get the program onto the QL. It sounds as if it may not have the "Resource Fork", as it would be called on the Mac, half of the file, only the "Data Fork". The RF holds meta data such as the file type and the stack size etc.
Noob error I think, I unzipped the files on PC
Actually, I've gone back over my steps, and I didn't unzip them on the PC, I simply used the Windows installer for Q-Emulator which is am MSI installer and puts the files in a folder in the windows file structure.
I then used wxqt2 to copy the files to a QL formatted disk from their location, so if the files were broken, they were broken before.
Ah, that explains it.
Nothing is broken, just not fully understanding how QL file headers work on different systems.
The files will have executable file header in a QemuLator folder, but it is different to standard QL file headers. It's explained in QemuLator manual, basically because Windoze doesn't understand QL executable file headers, emulators such as this one add it to the start or end of a file, making the file a few tens of bytes longer. Thus the file exists in the QemuLator environment in a modified state which plain old QDOS does not understand.
Wxqt2 then copies this "altered" file without knowing what it is (it was written well before these modified executables came along). In an ideal world, Wxqt2 would know about these modified executables and undo them when copying to a QDOS environment. It's not a case of anything being broken, just that they need to be in the right format for the chosen media.
The clue is when trying to EXEC or EX a supposedly executable file and you get the error "Bad parameter" which is the closest QDOS gets to saying "Eh, this file has no executable header". In other words, blindly copying a file of this nature turns it into a file without a header. In other words, a data file just as though it was a text file or a BASIC program.
The easiest way to strip off the modifications to original QL executables is simply to copy them to a QDOS format medium using the emulator itself, e.g. point a QemuLator folder to that holding the QemuLator format executable, then COPY the file TO ramdisk or QDOS format floppy. Let's imagine that QemuLator drive 1 points to a Windows folder containing mdump_task:
COPY win1_mdump_task TO ram1_MDUMP_task
would then make the emulator realise it has to 'strip' the modifications off the file 'automatically' while copying. The one part I'm not sure about is whether the unregistered emulator has ramdiscs or not, although it would also work with QDOS format floppy discs.
It's quite easy if you have knowledge of BASIC and the format to write a program to strip off the modified part and resave the file in original format, but why bother when the emulator can do it for you. If you read Appendix II of the QemuLator manual it explains the file format change. Also, Section 7.2 of the manual explains about the QLToWin_exe and WinToQL_exe programs which can convert between QDOS and QemuLator formats.
Hope this helps, I appreciate it's not exactly the simplest of concepts for a new user to try to follow.