Page 2 of 2

Re: MDV Reverse Recovery

Posted: Sun Aug 25, 2024 12:50 pm
by Andrew
t0nyt wrote: Sun Aug 25, 2024 8:59 am When I exec_w (or ew) flp1_mcopy it just comes back instantly with "Bad Parameter"

Any idea what I'm doing wrong please?

Many thanks
I found mcopy in QEmulator 3.03 kit, Apple version. I do not have a Apple computer, so I cannot test it.
Mcopy lacks the QDos header data. I presume that the files .rsrc are the header used by QEmulator on Apple computers, but this is just a hunch.

What wyou can do is to recreate the necessary data.
First make a copy of mcopy.
Then run the program

Code: Select all

100 length=FLEN(\MCOPY)
200 datasp=FDAT(\MCOPY)
205 IF datasp=0 THEN datasp=2048
210 start=RESPR(length)
220 LBYTES WIN1_MCOPY, start
230 POKE start + 1024, 100
240 SEXEC WIN1_MCOPY, start, length, datasp
250 EXEC_W WIN1_MCOPY
Mcopy will start, but I only added 2k of dataspace. It might need more.
If it throws any errors during copy then just increase the dataspace in line 205 and run again the basic code.
The code is based on the example here https://superbasic-manual.readthedocs.i ... html#sexec

Re: MDV Reverse Recovery

Posted: Sun Aug 25, 2024 2:14 pm
by t0nyt
Andrew wrote: Sun Aug 25, 2024 12:50 pm
t0nyt wrote: Sun Aug 25, 2024 8:59 am When I exec_w (or ew) flp1_mcopy it just comes back instantly with "Bad Parameter"

Any idea what I'm doing wrong please?

Many thanks
I found mcopy in QEmulator 3.03 kit, Apple version. I do not have a Apple computer, so I cannot test it.
Mcopy lacks the QDos header data. I presume that the files .rsrc are the header used by QEmulator on Apple computers, but this is just a hunch.

What wyou can do is to recreate the necessary data.
First make a copy of mcopy.
Then run the program

Code: Select all

100 length=FLEN(\MCOPY)
200 datasp=FDAT(\MCOPY)
205 IF datasp=0 THEN datasp=2048
210 start=RESPR(length)
220 LBYTES WIN1_MCOPY, start
230 POKE start + 1024, 100
240 SEXEC WIN1_MCOPY, start, length, datasp
250 EXEC_W WIN1_MCOPY
Mcopy will start, but I only added 2k of dataspace. It might need more.
If it throws any errors during copy then just increase the dataspace in line 205 and run again the basic code.
The code is based on the example here https://superbasic-manual.readthedocs.i ... html#sexec
Many thanks Andrew, that worked a treat (I didn't have FLEN/FDAT so hardcoded the values)

It locked up with 2048 so I hit it with a metaphorical hammer and set datasp=110*1024

Much appreciated

EDIT: I do have FLEN/FDAT but didn't realise the \ was needed with the path I gave it)