Page 1 of 1

Lightning - is ROM version same as on-disk?

Posted: Sun Jan 25, 2015 5:28 pm
by martyn_hill
Hi everyone

I have a copy of Lightning SE that I purchased and used many moons ago with my original BBQL.

Now I would like to burn a ROM image for my 'new' BBQL with the various LNG extensions and was wondering if anyone here knew whether or not the disk-copy that I have been using would also take to ROM OK?

I notice some significant sparse/sections of NULs in the TEXT binary extension file, for instance, which would usually indicate to me that the the code expects to 'self-modify' and fill those gaps - obviously wouldn't work in ROM.

If there are indeed distinct versions for disk and ROM, does anyone know if the disk-copy I purchased would entitle me to burn a ROM version (if there is still a copy around)?

Thanks in advance!

M.

Re: Lightning - is ROM version same as on-disk?

Posted: Sun Jan 25, 2015 6:41 pm
by tofro
Martyn,
ROM software and disk software is definitely not the same for the QL - ROM binaries need to supply a special ROM header in order to become recognized by QDOS. On the other hand, if you load a ROM binary into RAM and call it directly, it will simply not work (the standard ROM header begins with an invalid opcode)

I don't have and don't use lightning, so can't help with specific knowledge.
In order to find out whether a binary is capable of working from ROM, simple RESPR it, and do a CALL to it. Work around a bit, touching as much functionality as possible, and then compare it to the original file contents. If it is still the same, it is probably ROMable.

If you want to put a binary into ROM that does not have a proper ROM header (that's what seems to be the case here), you need to add the same, otherwise QDOS will not properly recognize it. It needs to look like

Code: Select all

HEAD:
        DC.L      $4afb0001              ; ROM header magic
        DC.W    0                        ; Would be basic PROCS and FUNCS table
        DC.W    ORIGN - HEAD             ; Offset of code start relative to 
                                         ; HEAD (original $0 address, normally)
        DC.W    <String length of ROM name>
        DC.B    'Whatever name you choose'
        DC.W    0
ORIGN:                                   ; original code of non-ROM binary here
And if you have a properly licensed disk version of some software, I wouldn't normally expect the license to care on what type of medium you use it from.

Hope this helps,
Tobias

Re: Lightning - is ROM version same as on-disk?

Posted: Sun Jan 25, 2015 8:01 pm
by martyn_hill
Thank you, Tobias!

Yes, the ROM header would definitely need to be added, wouldn't it.

As the disk-copy LNG extensions are simply RESPRd anyhow, the question remains whether it tries to write to its own code area once running - I guess I can just test it by burning an EPROM and seeing if it still behaves - once I've designed and built my next expansion card...

M.

Re: Lightning - is ROM version same as on-disk?

Posted: Sun Jan 25, 2015 8:12 pm
by RWAP
I should have a spare Lightning SE ROM if you need one :D

I think it only contains the text routines from memory

Re: Lightning - is ROM version same as on-disk?

Posted: Sun Jan 25, 2015 8:16 pm
by martyn_hill
Hi Rich!

That would be very helpful... I'm in the process of building a toolkit of extensions to put on EPROM (or, if I finish it soon, an NV SRAM) so that I can ultimately do away with the mdvs altogether on my BBQL...

It's mostly the TEXT extension that I have been using so far, anyway.

We can discuss cost as part of our other PM :-)