Supercharged program tied to MDV1

Anything QL Software or Programming Related.
Post Reply
User avatar
bwinkel67
QL Wafer Drive
Posts: 1196
Joined: Thu Oct 03, 2019 2:09 am

Supercharged program tied to MDV1

Post by bwinkel67 »

So I was trying to run ARTice from my vDrive's MDV8 and it just sits there (I don't have vMap). I had gone into the main binary and replaced three instances of MDV1 to MDV8. Two were just text for menu options and shouldn't impact anything, but the third was pointing to a critical support file called "art_data" which appeared in the binary as:

Code: Select all

2‘Öˆ\€ Œ†]ý  “Ј “¬ˆ`€ –bŽp  MDV1_art_data —"ˆ`r†¸ —"ˆ`†J   —6“¬ˆh—"ˆ`† S
The change to "MDV8_art_data" causes things to hang. I changed everything else that pointed to MDV1 (all support SuperBASIC files) to MDV8 and just left that alone and put a microcartridge in MDV1 with "art_data" on it, and it works. Funny thing is that if there's no cart in MDV1 it never seems to spin the drive seeing if the file is there...instead it just freezes up. So something else is going on in the main program. It seems to have been a Supercharged program (so that means it was written in SuperBASIC, no?).

I can put it in a hex editor...anyone have an idea what else I'd need to look for to disassociate the art_data from MDV1 so I can have it point to MDV8? I don't think this is some sort of copy protection since that would be pretty weak (the software is freely available on Dilwyn's site, btw). I'm usually good about unsticking programs from MDV1/MDV2 unless there is copy protection.


User avatar
Ruptor
Gold Card
Posts: 418
Joined: Fri Dec 20, 2019 2:23 pm
Location: London

Re: Supercharged program tied to MDV1

Post by Ruptor »

bwinkel67 wrote:So I was trying to run ARTice from my vDrive's MDV8 and it just sits there
Have you tried if MDV2 works? Could there be an MDV number limit of 2 buried in the software that testing MDV2 would demonstrate if it worked with the existing changes you have identified?


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

Re: Supercharged program tied to MDV1

Post by bwinkel67 »

Ruptor wrote:
bwinkel67 wrote:So I was trying to run ARTice from my vDrive's MDV8 and it just sits there
Have you tried if MDV2 works? Could there be an MDV number limit of 2 buried in the software that testing MDV2 would demonstrate if it worked with the existing changes you have identified?
Oh, that's a good idea...I'll try that.


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

Re: Supercharged program tied to MDV1

Post by bwinkel67 »

A secondary question. We have vMap which is specifically for vDrive. We also have an flp_use (or similar) command for remapping to different devices. Has there been an attempt to write a software version of vMap so say you could map a microdrive (or maybe any device) to a different physical drive. Something like:

map_use flp3 mdv1

Would something like that be difficult to write? I mean flp_use basically does this:

map_use flp1 mdv1 flp2 mdv2 flp3 mdv3 ...

But the more flexible would be the most useful so to remap any device, something like:

map_use flp3 mdv1 ram1 mdv2

Maybe to simplify it you don't allow a string of arguments and have to do it one at a time:

map_ues flp3 mdv1
map_use ram1 mdv2

(Note I would have used the keyword dev_use but saw that to already be used to map to different sub-directories so that's pretty close)


User avatar
janbredenbeek
Super Gold Card
Posts: 632
Joined: Wed Jan 21, 2015 4:54 pm
Location: Hilversum, The Netherlands

Re: Supercharged program tied to MDV1

Post by janbredenbeek »

Are you by any chance using an official Sinclair ROM? There is a known bug in the MDV driver of these ROMs (AH/JM/JS) which corrupts a flag of MDV1 and MDV2 when accessing MDV7 or MDV8. After this, an OPEN on MDV1 or MDV2 will not check the cartridge as it should until the machine is reset.

The bug is in the OPEN routine of the MDV driver; I'm not sure how vDrive affects this driver (AFAIK it is a hardware emulation of the MDV). It should not occur on Minerva.


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

Re: Supercharged program tied to MDV1

Post by bwinkel67 »

I figured it out. So I was able to edit the executable after all and change it to point from MDV1 to MDV8. The problem initially was that I was using Notepad and it changes something in the file even though it's the exact same byte size. I used Emacs on a Linux system to make the change and voila, now it looks for the file on MDV8.


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

Re: Supercharged program tied to MDV1

Post by Derek_Stewart »

Hi,

Why not use the EditorSE to load the binary and overwrite changes the required area, as long as the file is not extended, then save as a binary file.

This can be used very easily on any QL that can run the EditorSE.


Regards,

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

Re: Supercharged program tied to MDV1

Post by bwinkel67 »

When installing new software, since most of it comes from the web and in form of zip files, I usually create my vDrive images to use on my actual QL in Windows so it's easier editing and trying it out there. Just surprised that Notepad is replacing something...maybe NULLs. I also have a handy hex editor on windows (HexEdit by Georffrey Prewelt) which is a small stand-alone app written in 1998 and does the trick...used to edit PDF files to get rid of author info with that. Just didn't think I needed to use it when simply replacing a character string.


Post Reply