Re: Recovered a .bas file from my old Mac Plus

2017-06-07 Thread Peter Corlett via cctalk
On Tue, Jun 06, 2017 at 08:32:14PM -0700, Michael Hunter via cctalk wrote:
[]
> Anyway, the .bas file is not plaintext, but I can see strings in it.  Here
> are the first few bytes:

That text looks like length-prefixed records:

: f900

0002:  1b00 3aaf e84f 6e65 2046 7275 636b  :..One Fruck
0010: 6564 2075 7020 7069 616e 6f00 00 ed up piano..

001D: 0c 0061   ..a
0020: 3af8 823a 20f8 8300 00   :..: 

0029:   1e 009a 2022 5374   ... "St

Whether it's an 8 bit prefix with a spurious NUL byte or 16 bit little-endian,
I couldn't say without seeing a longer example. The first line is probably a
REM statement, but I'd expect a single-byte token for it and see the two-byte
sequence AF E8. There's a spurious colon before it, but that's just the BASIC
statement separator and perhaps ": REM" was a popular idiom in that dialect.
Maybe AF is REM and the first word in your comment happened to also be a BASIC
keyword and was also (accidentally?) tokenised.

> I remember watching a documentary saying that source code used to be encoded
> / compressed.

They are usually *tokenised*, in which BASIC keywords are replaced by a single
(typically high-bit-set) character. This both reduces the memory requirements
and makes the interpreter faster. Your "fun" job is to figure out which
characters map to which tokens. Or just Google it, probably.

[...]
> begin 644 piano.bas

Bizarrely, I don't seem to have a uudecoder installed. I haven't seen a
uuencoded file in years. So my comments above are based on your short hexdump.



Re: Recovered a .bas file from my old Mac Plus

2017-06-07 Thread Torfinn Ingolfsen via cctalk
Also, emulators exist that allow you to emulate a Mac Plus on a
current computer.
Example: http://www.gryphel.com/c/minivmac/

HTH
-- 
Regards,
Torfinn Ingolfsen


Re: Recovered a .bas file from my old Mac Plus

2017-06-07 Thread Chuck Guzis via cctalk
On 06/06/2017 08:32 PM, Michael Hunter via cctech wrote:
> Hey folks,
> 
> I hope all is well. Curiosity got the better of me and I sent in an EMAC
> external HDD I had for my old Mac Plus in for recovery. I'm happy to report
> that the recovery was a success. Now I'm struggling to figure out how to
> get at the old content :)

Was that Chipmunk BASIC?  If so, versions for OS X and Linux still exist.

--Chuck



Re: Recovered a .bas file from my old Mac Plus

2017-06-06 Thread dwight via cctalk
If you still have a MAC plus handy you can experiment

by making short programs and viewing them in hex.

You can build up a translation dictionary that way.

I've done that for other Basics in the past.

You show 16 bit values, be careful they are sometimes

byte swapped. The original encoding is most likely bytes

and not words in size.

Dwight



From: cctalk <cctalk-boun...@classiccmp.org> on behalf of Michael Hunter via 
cctalk <cctalk@classiccmp.org>
Sent: Tuesday, June 6, 2017 8:32:14 PM
To: cct...@classiccmp.org
Subject: Recovered a .bas file from my old Mac Plus

Hey folks,

I hope all is well. Curiosity got the better of me and I sent in an EMAC
external HDD I had for my old Mac Plus in for recovery. I'm happy to report
that the recovery was a success. Now I'm struggling to figure out how to
get at the old content :)

The biggest prize was finding piano.bas, which is a BASIC piano program I
wrote that (if I recall correctly) allows you to set how many notes to have
between octaves.

Anyway, the .bas file is not plaintext, but I can see strings in it.  Here
are the first few bytes:

: f900 1b00 3aaf e84f 6e65 2046 7275 636b  :..One Fruck
0010: 6564 2075 7020 7069 616e 6f00 000c 0061  ed up pianoa
0020: 3af8 823a 20f8 8300 001e 009a 2022 5374  :..: ... "St

I remember watching a documentary saying that source code used to be
encoded / compressed.

Anybody have any suggestions on how to decode it? Sorry if it's poor form
to put this in the body but here's the whole file:

begin 644 piano.bas
M^0`;`#JOZ$]N92!&<G5C:V5D('5P('!I86YO```,`&$Z^((Z(/B#```>`)H@
M(E-T87)T:6YG('!I=&-H("@T-#`I(CMA```;`)H@(DAA;&8@<W1E<',@=7`@
M*#`I(CMB```8`)H@(DQO;W`_('DL;B`H;BDB.V<D```1`)@@8>H1()<@``
M`'<``!(`8CIDZF'N$_`H8N\/#"D```L`^,`@9"P@$P``$P"4('/J$2#E(!P3
MB#JI(',```D`9>IE[!(``!$`F"!EZA0@ER`;9@``$0"8(&7J&""7(!L`
M``!F```1`)@@9>H9()<@```&<```D`8NIB[!,```L`ER`;8@``"P!F
M.F+J8NP2```+`)<@```&(``!<`9SH@F"!G).HB>2(@ER`;:```"P"7
M(!L```!A```*`&@Z(&+J$0``"P"7(!L```!B```+`'H<`;@```L`ER`;
(8@``
`
end

Also, again sorry if this is poor form, but I'm looking to find a good home
for the Mac Plus, if you know somebody in the Bay Area who's interested
please let me know.

Thanks!

Mike

PS I'm interested in other formats I'm seeing too (.ht, some extensionless
thing that might be MacPaint), any pointers are appreciated!


Recovered a .bas file from my old Mac Plus

2017-06-06 Thread Michael Hunter via cctalk
Hey folks,

I hope all is well. Curiosity got the better of me and I sent in an EMAC
external HDD I had for my old Mac Plus in for recovery. I'm happy to report
that the recovery was a success. Now I'm struggling to figure out how to
get at the old content :)

The biggest prize was finding piano.bas, which is a BASIC piano program I
wrote that (if I recall correctly) allows you to set how many notes to have
between octaves.

Anyway, the .bas file is not plaintext, but I can see strings in it.  Here
are the first few bytes:

: f900 1b00 3aaf e84f 6e65 2046 7275 636b  :..One Fruck
0010: 6564 2075 7020 7069 616e 6f00 000c 0061  ed up pianoa
0020: 3af8 823a 20f8 8300 001e 009a 2022 5374  :..: ... "St

I remember watching a documentary saying that source code used to be
encoded / compressed.

Anybody have any suggestions on how to decode it? Sorry if it's poor form
to put this in the body but here's the whole file:

begin 644 piano.bas
M^0`;`#JOZ$]N92!&`)H@
M(E-T87)T:6YG('!I=&-H("@T-#`I(CMA```;`)H@(DAA;&8@H1()<@``
M`'<``!(`8CIDZF'N$_`H8N\/#"D```L`^,`@9"P@$P``$P"4('/J$2#E(!P3
MB#JI(',```D`9>IE[!(``!$`F"!EZA0@ER`;9@``$0"8(&7J&""7(!L`
M``!F```1`)@@9>H9()<@```&<```D`8NIB[!,```L`ER`;8@``"P!F
M.F+J8NP2```+`)<@```&(``!<`9SH@F"!G).HB>2(@ER`;:```"P"7
M(!L```!A```*`&@Z(&+J$0``"P"7(!L```!B```+`'H<`;@```L`ER`;
(8@``
`
end

Also, again sorry if this is poor form, but I'm looking to find a good home
for the Mac Plus, if you know somebody in the Bay Area who's interested
please let me know.

Thanks!

Mike

PS I'm interested in other formats I'm seeing too (.ht, some extensionless
thing that might be MacPaint), any pointers are appreciated!