Author Topic: Simple BASIC question  (Read 875 times)

0 Members and 1 Guest are viewing this topic.

Online ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.876
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1968
  • Likes Given: 4114
Simple BASIC question
« on: 12: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?



Offline tjohnson

  • Supporter
  • 6128 Plus
  • *
  • Posts: 974
  • Country: gb
    • index.php?action=treasury
  • Liked: 304
  • Likes Given: 278

Online ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.876
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1968
  • Likes Given: 4114
Re: Simple BASIC question
« Reply #2 on: 16: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.

Offline Urusergi

  • CPC6128
  • ****
  • Posts: 233
  • Country: es
  • Liked: 471
  • Likes Given: 1634
Re: Simple BASIC question
« Reply #3 on: 18: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?
« Last Edit: 18:41, 18 July 20 by Urusergi »

Offline Johnny Olsen

  • Supporter
  • CPC6128
  • *
  • Posts: 289
  • Country: dk
  • Liked: 217
  • Likes Given: 430
Re: Simple BASIC question
« Reply #4 on: 18: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

Offline mr_lou

  • 6128 Plus
  • ******
  • Posts: 3.180
  • Country: dk
    • index.php?action=treasury
    • 8-bit Memoirs - a Blu-ray diskmag-like eBook about the 8-bit era
  • Liked: 1345
  • Likes Given: 2661
Re: Simple BASIC question
« Reply #5 on: 19: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.

Online ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.876
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1968
  • Likes Given: 4114
Re: Simple BASIC question
« Reply #6 on: 19:52, 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. :(

Online ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.876
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1968
  • Likes Given: 4114
Re: Simple BASIC question
« Reply #7 on: 19:53, 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.

Offline Johnny Olsen

  • Supporter
  • CPC6128
  • *
  • Posts: 289
  • Country: dk
  • Liked: 217
  • Likes Given: 430
Re: Simple BASIC question
« Reply #8 on: 11: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



« Last Edit: 12:06, 19 July 20 by Johnny Olsen »

Online ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.876
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1968
  • Likes Given: 4114
Re: Simple BASIC question
« Reply #9 on: 13:49, 19 July 20 »
Thanks @Johnny Olsen ,


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


Cheers,


Peter

Online GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.356
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1100
  • Likes Given: 2649
Re: Simple BASIC question
« Reply #10 on: 11:34, 22 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.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.03.01)

Online ComSoft6128

  • ..................................
  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.876
  • Country: scotland
  • CPC THEN CPC NOW
    • index.php?action=treasury
  • Liked: 1968
  • Likes Given: 4114
Re: Simple BASIC question
« Reply #11 on: 13:47, 22 July 20 »

Hi @GUNHED,

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.
« Last Edit: 13:50, 22 July 20 by ComSoft6128 »

Online GUNHED

  • 6128 Plus
  • ******
  • Posts: 2.356
  • Country: de
  • Reincarnation of TFM
    • FutureOS - The quickest OS for the CPC and Plus
  • Liked: 1100
  • Likes Given: 2649
Re: Simple BASIC question
« Reply #12 on: 15:33, 22 July 20 »
Hi @GUNHED,

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.
http://futureos.de --> Get the revolutionary FutureOS (Recent update: 2021.01.24)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.03.01)