Page 2 of 3

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sat Oct 09, 2021 11:04 am
by mk79
Yes, most of the strange keywords map to RTS. I guess they were part of the Lenselok protection and thus have been removed when the protection was removed. And it would explain the need for switching to mode 4…

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sat Oct 09, 2021 11:36 am
by Martin_Head
mk79 wrote:Yes, most of the strange keywords map to RTS. I guess they were part of the Lenselok protection and thus have been removed when the protection was removed. And it would explain the need for switching to mode 4…
Yes, they are. And the Lenselok code still appears to be there in Parser_task. I have not yet figured out how it's bypassed. I have to get round the problem of the unprintable keyword's. So I can get it to LOAD and RUN.

Parser_task is a bit of a weird beast. It's been compiled without line numbers. I've not seen another SuperCharge program without line numbers. And I've had to make another decompiler for it.

I can't see anything in the SuperCharge manual that says you can compile without line numbers, except for command files. And I don't quite see how you could do that with a program that has loops, and GO TO's.

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sat Oct 09, 2021 11:50 am
by bwinkel67
mk79 wrote:Offset $11C and $15C... (extensions_code)
Ah, extendions_code, I missed that. Found 00 01 80 63, thanks. Will try and skip that part to see what happens.

Oh, and I forogot about the copy protection SUPERCHARGE has (though it's been deactivated by someone).

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sat Oct 09, 2021 11:56 am
by bwinkel67
Martin_Head wrote:I'm in the process of trying to decompile SuperCharge's Parser_task...
Oh wow, I didn't realize there was a decompiler for SuperCharge. Did you write it or was that from DP as well? Is it available to play with?

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sat Oct 09, 2021 4:33 pm
by mk79
Martin_Head wrote:I can't see anything in the SuperCharge manual that says you can compile without line numbers, except for command files. And I don't quite see how you could do that with a program that has loops, and GO TO's.
Seeing to what extrems they went to protect the software, this, too, is probably a special for themselves to make reverse engineering more difficult.

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sun Oct 10, 2021 2:03 am
by bwinkel67
mk79 wrote:
bwinkel67 wrote:Can you modify it without the TRAP?
This is a computer of the 80s, you can do anything you like.
If so, could you show a machine code example so I can try and find it in the SUPERCHARGE codebase.
Offset $11C and $15C... (extensions_code)

extension1.pngextension2.png
So I NOP'ed out both the clear screen:

Code: Select all

42 99 51 c9 ff fc 42 39 00 01 80 63 
...and the mode change:

Code: Select all

70 10 72 00 74 ff 4e 41 13 fc 00 02 00 01 80 63 
...that did the trick. Just doing the latter still caused the problem but with both, no longer is it forced to monitor mode.

Thank you for the help!

Btw, found this nifty website that helped me disassemble the code in a jiffy. I know there are a ton of assemblers out there but if you don't want to (or can't) install something on your machine, that worked nicely:

https://onlinedisassembler.com/odaweb/T7apWfCy/0

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sun Oct 10, 2021 2:43 am
by bwinkel67
Here is my revised version (originally downloaded from Dilwyn's site):
supercharge.zip
(54.58 KiB) Downloaded 51 times
Changes:
  • Removed forced monitor mode
  • For BOOT, SUPERCHARGE, and EXTENSIONS_BAS, instead of hardcoding flp1_, I query for device on channel #0 (just type in valid device, i.e. mdv2_)

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sun Oct 10, 2021 8:41 am
by Derek_Stewart
hi,

The problem with this solution, is that the screen will be in Monitor mode and the QL hardware will be in TV Mode.

Does this not cuase a problem with other tasks running on the QL?

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sun Oct 10, 2021 9:26 am
by Martin_Head
bwinkel67 wrote:
Martin_Head wrote:I'm in the process of trying to decompile SuperCharge's Parser_task...
Oh wow, I didn't realize there was a decompiler for SuperCharge. Did you write it or was that from DP as well? Is it available to play with?
Here's the last one I posted here. viewtopic.php?f=3&t=2373&p=28287&hilit=discharge#p28287
It also decompiles Turbo programs.

And here's a QLiberator decompiler viewtopic.php?f=3&t=3042&hilit=delib&start=100#p30978

The decompilers don't produce ready to run BASIC programs. You have to do some tiding up. I think the SuperCharge one has a walk through demo on decompiling.

Re: MT.DMODE alternative (i.e. how else to change display mode)

Posted: Sun Oct 10, 2021 9:29 am
by mk79
Derek_Stewart wrote:The problem with this solution, is that the screen will be in Monitor mode and the QL hardware will be in TV Mode.

Does this not cuase a problem with other tasks running on the QL?
No, if he NOPed all out there will be no mode change at all.