Re: Copy Protection of PET cassettes - Flash Attack.

From: Ethan Dicks <>
Date: Tue, 10 Aug 2010 10:56:23 -0400
Message-ID: <>
On 8/10/10, Daniel Kahlin <> wrote:
> On Tue, 10 Aug 2010, Anders Carlsson wrote:
>> Daniel Kahlin wrote:
>>> Anyway a quick analysis shows that the game loads $027A-$2000. The first
>>> chunk at $027A looks like a cassette header indicating a file "FLASH

$027A- $028E are full of file parameters (type of program, start/end
addresses, filename, etc) when saving anything on Tape #1 (not sure
about Tape #2 without checking the code).

>> While I haven't studied the PET memory map recently, isn't $03FD part of
>> the cassette buffer?


Tape #1 buffer: 027A-0329
Tape #2 buffer: 033A-03F9

$03FD-$03FF are outside of the tape buffers.

>>If so, perhaps the computer rebuilds that part of memory
>> when you save in a normal way, and you lose whatever was there.

On BASIC 4 machines, there is quite a bit of mucking around in the
Tape #2 buffer (check any memory map).  I didn't own a BASIC 4 PET
when I was using tapes, so I never had those locations stepped on, but
if you happen to be using BASIC 4 for this tape manipulation, it's
possibly that it could be part of your problem.

> From what I can tell it isn't part of the cassette buffer.  Judging from
> the flash attack file there is space for two cassette buffers.
> One from $027A-$0339 and one from $033A to $03F9.
> Though, the layout in the flash attack file could be a decoy.
> I'm leaning towards that there might be a different low limit for tape
> saving on the PET.  IIRC this limit is $0300 on the C64 and VIC20.

Back in the day when I used BASIC 2 PETs and tape drives every day, I
used to write a lot of code for the second cassette buffer.  I don't
remember having any hassles with loading or saving it via TIM.  I also
never fiddled whatsoever with anything in the first cassette buffer
since you can't load or save that memory with that tape drive - you'd
essentially need to save data in the first cassette buffer via a drive
plugged into the secondary port (the outside port on original chicklet
PETs or the inside port on dynamic PETs) or save to disk (which I
didn't have back then).

When writing hybrid programs (ML and BASIC) I used to use TIM to save
the second cassette buffer _and_ BASIC programs as a unit, but it was
using the standard commands, with the start address of $033A and the
end address of however far into main memory the BASIC code went.

As for "low limits", the C-64 and VIC-20 are different from the PET
because they only have one cassette buffer, so you can't use one drive
to save the contents of the other drive's buffer area.  On the PET,
this was done routinely.


       Message was sent through the cbm-hackers mailing list
Received on 2010-08-10 15:00:38

Archive generated by hypermail 2.2.0.