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

Anything QL Software or Programming Related.
User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

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

Post 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…


Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

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

Post 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.


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

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

Post 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).


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

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

Post 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?


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

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

Post 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.


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

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

Post 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


User avatar
bwinkel67
QL Wafer Drive
Posts: 1187
Joined: Thu Oct 03, 2019 2:09 am

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

Post by bwinkel67 »

Here is my revised version (originally downloaded from Dilwyn's site):
supercharge.zip
(54.58 KiB) Downloaded 48 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_)


Derek_Stewart
Font of All Knowledge
Posts: 3928
Joined: Mon Dec 20, 2010 11:40 am
Location: Sunny Runcorn, Cheshire, UK

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

Post 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?


Regards,

Derek
Martin_Head
Aurora
Posts: 847
Joined: Tue Dec 17, 2013 1:17 pm

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

Post 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.


User avatar
mk79
QL Wafer Drive
Posts: 1349
Joined: Sun Feb 02, 2014 10:54 am
Location: Esslingen/Germany
Contact:

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

Post 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.


Post Reply