Evening all,
I have been using EasySourse_exe from Easy Pointer 3 to try and convert
my old menu definitions to assembly. It gives me a way to visually
design a window and convert that to assembly.
Well, that was the theory but it simply won't work under high colour
mode. After a wee bit of time remembering how to get DEA to work - it's
been a while - I managed a disassembly and quickly found the broken bit
with the help of JMON and the disassembly.
Basically, it reads the screen mode with MT_DMODE and if not in mode 0
(aka mode 4) loops back to check the mode again. In mode 8 or mode 32
(high colour) it simply loops until killed.
I have patched out a MOVE.l A4,-(a7) instruction with a short branch to
the bit of the code after the corresponding MOVE.L (a7)+,A4 and it works
happily in high colour mode now.
Obviously, it may not work correctly if you try to run it in MODE 8 -
but hey, I hardly ever run MODE 8 these days and indeed, never did!
Here are details of what I did to patch it:
copy 'easysource_exe' to 'easysource_original_exe'
fileLength=flen(\'easysource_exe')
fileData=fdat(\'easysource_exe')
addr = alchp(fileLength)
lbytes easysource_exe,addr
poke_w addr + hex('108'), hex('601c')
sbytes easysource_exe,addr,fileLength,fileData
It works a treat!
I can easily convert my menu definitions into assembly once more.
Caveats: I don't know if the version from Easy Pointer 2 can be patched
at these offsets, buyer beware as it was. Mine was from EP3 and I can't
guarantee that any other version can be patched as above.
It cannot cope with the new High colour window definitions, palettes and
so on, only the old fashioned (!) mode 4 and mode 8 stuff. But once you
get the initial menu definition converted, substituting palette entries
is easy enough.
Cheers,
Norman.
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm