CPCWiki forum

General Category => Programming => Topic started by: ComSoft6128 on 10:44, 18 July 20

Title: Simple BASIC question
Post by: ComSoft6128 on 10:44, 18 July 20
The disc for Mini Office 2 shows a number of protected BASIC files that I can't LIST. If (failing) memory serves, to remove the protection I should load the files and then save them again using a parameter....but....I can't remember what - any ideas?


Title: Re: Simple BASIC question
Post by: tjohnson on 11:01, 18 July 20
http://www.cpcwiki.eu/index.php/Programming:Unlocking_a_protected_basic_file
Title: Re: Simple BASIC question
Post by: ComSoft6128 on 14:09, 18 July 20
Thanks for that but Running



10 FOR i=&BE00 TO &BE0F: READ a$: POKE i,VAL("&"+a$): NEXT
20 CALL &BE00: NEW
30 DATA 21,10,be,11,0b,be,06,81,c3,e0,bc,af,32,2c,ae,c9


gives - "Line too long".


Which is also the message displayed when I try to Run the BASIC files.


Mmm.
Title: Re: Simple BASIC question
Post by: Urusergi on 16:39, 18 July 20
They can be doubly protected files.

If that's the case,  you have to find out which byte has been altered so the file cannot be listed.

Can you upload an example?
Title: Re: Simple BASIC question
Post by: Johnny Olsen on 16:55, 18 July 20
Works for me but maybe it's address &BE00 that's the problem.


10 FOR i=&BF00 TO &BF0F: READ a$: POKE i,VAL("&"+a$): NEXT
20 CALL &BF00: NEW
30 DATA 21,10,be,11,0b,be,06,81,c3,e0,bc,af,32,2c,ae,c9
Title: Re: Simple BASIC question
Post by: mr_lou on 17:35, 18 July 20
If we're talking standard SAVE "program",p style protection, almost any copy program can remove it.

Try Amsback, for example.
Title: Re: Simple BASIC question
Post by: ComSoft6128 on 17:52, 18 July 20
Quote from: Urusergi on 16:39, 18 July 20
They can be doubly protected files.

If that's the case,  you have to find out which byte has been altered so the file cannot be listed.

Can you upload an example?


Unfortunately not but the .dsk image is available here:
https://cpcrulez.fr/applications_bureau-mini_office_2.htm?t=Uw==


But...the version I have (original disc) is copy protected and all the files are set to hidden - I had to use the Nirvana Rom to have a look at the files. :(
Title: Re: Simple BASIC question
Post by: ComSoft6128 on 17:53, 18 July 20
Quote from: Johnny Olsen on 16:55, 18 July 20
Works for me but maybe it's address &BE00 that's the problem.


10 FOR i=&BF00 TO &BF0F: READ a$: POKE i,VAL("&"+a$): NEXT
20 CALL &BF00: NEW
30 DATA 21,10,be,11,0b,be,06,81,c3,e0,bc,af,32,2c,ae,c9


No joy with this either - still getting the "Line too long" message but many thanks for the help.
Title: Re: Simple BASIC question
Post by: Johnny Olsen on 09:58, 19 July 20
I have taken a quick look at it using Utopia.
Looks like there are several fake basic files.
The protected basic file "Boot.bas" has a hidden loader built-in.
load "boot.bas" poke & 172,1 - list
call &2ac to load mini office.


1 KEY DEF 66,0,0,0,0
2 MEMORY &5FFF
3 LOAD "BOOTMEN.BIN",&6000
4 OPT%=0
5 CALL &6000,@OPT%
6 OPT%=OPT%+1:IF OPT%>7 THEN 5 ELSE IF OPT%=7 THEN CALL 0
7 ON OPT% GOTO 8,9,10,11,12,13
8 RUN "WORD
9 RUN "DATABASE
10 RUN "SPREAD
11 RUN "GRAPHICS
12 RUN "COMMS
13 RUN "LABEL
14 '"¤ DATABASE SOFTWARE MCMLXXXVI

after poke &172,1

1 CLEAR:SYMBOL AFTER 256:KEY DEF 66,0,0,0,0:|TAPE:CALL &2AC:RUN"a:boot  .bas"
1 KEY DEF 66,0,0,0,0
2 MEMORY &5FFF
3 LOAD "BOOTMEN.BIN",&6000
4 OPT%=0
5 CALL &6000,@OPT%
6 OPT%=OPT%+1:IF OPT%>7 THEN 5 ELSE IF OPT%=7 THEN CALL 0
7 ON OPT% GOTO 8,9,10,11,12,13
8 RUN "WORD
9 RUN "DATABASE
10 RUN "SPREAD
11 RUN "GRAPHICS
12 RUN "COMMS
13 RUN "LABEL
14 '"¤ DATABASE SOFTWARE MCMLXXXVI



Title: Re: Simple BASIC question
Post by: ComSoft6128 on 11:49, 19 July 20
Thanks @Johnny Olsen (https://www.cpcwiki.eu/forum/index.php?action=profile;u=118) ,


Fake files - I wondered about that - especially the 90K(!?) "KOHLRABI.BAS"


Cheers,


Peter
Title: Re: Simple BASIC question
Post by: GUNHED on 09:34, 22 July 20
Quote from: ComSoft6128 on 17:53, 18 July 20

No joy with this either - still getting the "Line too long" message but many thanks for the help.

Switch all ROMs off before using.

Edit: A Kohlrabi is something to eat btw.
Title: Re: Simple BASIC question
Post by: ComSoft6128 on 11:47, 22 July 20

Hi @GUNHED (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2029),

The Rombox and Parados cart were removed before the video was made and I know what kohlrabi is - I assumed from the name it was a private joke on the programmers part.
Title: Re: Simple BASIC question
Post by: GUNHED on 13:33, 22 July 20
Quote from: ComSoft6128 on 11:47, 22 July 20
Hi @GUNHED (https://www.cpcwiki.eu/forum/index.php?action=profile;u=2029),

The Rombox and Parados cart were removed before the video was made and I know what kohlrabi is - I assumed from the name it was a private joke on the programmers part.
Yeah, I guess you're exactly right about that.


The 'line too long' sometimes appears when using truncated files. So it makes all sense.
Powered by SMFPacks Menu Editor Mod