gillvm wrote:Hi,
I have recently got a ql and decided to dabble with qubide with minerva, tk2 and an sd card adapter.
After a lot of hassle I managed to get this all working and figured out how to format and transfer files via the sd card using habi's image editing software.
So I can see files on the ql but I can seem to run them, (apart from psion chess which works fine) I usually get an error like bad line (or something similar). A program that I really want to run is Spooks (a pacman clone). I can see that this works on the ql emulator but when I run the same commands on the ql it doesnt work.
I am guessing this is a memory issue? Or I am not using the right command syntax
Can anyone help please, btw I am using the 'lrun' command.
Thnaks
Vincent
As ToFro said, things can get complex and 100% accuracy in the description of the problem is vital for correct diagnosis. Unfortunately, when it comes to QL, if you know enough to explain the problem with 100% accuracy, you generally know enough to solve the problem without third party help, that's my experienceof running Quanta Helpline anyhow.
When you get the error message 'Bad Line' after using a LRUN command, it generally means you are trying to run something which is not really a BASIC program after all. BASIC does some checking on loading a program, finds it's not a fully valid line and flags it up as a 'bad line'. Sometimes, you find the keyword 'MISTake' added to these lines if they are vaguely BASIC-like but not quite valid.
Briefly, there's more than one type of QL 'program' as far as you are concerned
1. BASIC programs, which are loaded or started with commands like LOAD or LRUN.
2. Machine code programs, called JOBS, which are started with commands such as EXEC or EXEC_W
3. Machine code routines (as opposed to programs) which may be loaded using a command such as LBYTES and started with a CALL command.
To make matters more complex, some programs are started by a BOOT command written in BASIC, these then chain in a program started with an EXEC or EXEC_W program.
To make matters even more complex, where emulators such as Q-emulator are concerned, the 'EXEC' or 'EXEC_W' programs are modified when stored on a non-QL format medium such as a Windows hard disk. The reasons are complex, but basically operating systems such as Windows don't understand the file headers of a QL program file and basically just lose or forget it (a prime example is when you unzip a zip file created on a QL, but unzipped in Windows using Windows itself, WinZip, 7-zip or similar programs), so the poor emulator or QL system on which these program files end up are trying to make sense of a program which to all intents have a part missing.
Emulators and some hard disk systems modify these files to integrate the part which goes missing into the body of the file. Normally, this is completely invisible to you the user and this modified file is created and decoded automatically depending on where the file is copied to - copy a file from a directory stored on a Windows hard disk to a QL format floppy disk on a PC and the modification is removed). Where this goes wrong is where such a modified file gets copied from somewhere where it's been stored in a modified format by an emulator, independently of the emulator, the 'modification' does not get undone so the poor QL ends up without a clue what's going on and all sorts of strange errors crop up.
Without a full understanding of how this works, it'll be hard for inexperienced users to work it out. One handy rule of thumb is that ONLY programs started with EXEC/EXEC_W commands get affected in this way, BASIC programs are not affected. So, if on trying to LRUN a program you get BAD LINE type error messages it means either the program is corrupted and damaged, or you are trying to LRUN something which is actually not a BASIC program.
For many older commercial programs, a quick way of checking for this is to look at a program called BOOT in the software concerned. You can either LOAD and LIST it, or COPY_N filename TO SCR to view it. Within the boot program, have a look to see if you can find EXEC or EXEC_W (or sometimes EX or EW equivalents on programs which require the Toolkit 2). This can give a clue as to whether the "program" you are trying to run needs to be started with EXEC (or equivalent) or LRUN.
Another way of checking is to look at the extension of a filename. Early programs often did not use extensions to the filename (e.g. QUILL). Most BASIC programs will have an extension such as _bas (e.g. MDV1_MYPROGRAM_BAS). These can almost always be started with an LRUN command. Programs which have filenames ending in _task, _bin, _obj and a few other extensions which imply 'machine code' will usually get started with EXEC-type commands.
The above is a bit of background which might be heavy going for an inexperienced QL user, but hopefully might give you a bit of a clue as to what's going on. As Tobias said, it is hard to know exactly what's going wrong without more information. Unfortunately, the endless permutations of modern QL systems mean that whereas back in 1984, this might have been a lot easier to diagnose, nowadays we are blessed with so many QL-compatible systems with consequently so many more combinations of things which can go wrong!