Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Reading/Writing to Tracks 36 through 40?

215 views
Skip to first unread message

dun...@yahoo.com

unread,
Jan 8, 2005, 10:26:02 PM1/8/05
to
I've been trying to read/write to Tracks 36 through 40, but Disk Doctor
only goes up to Track 35 (obviously). But I've heard of disks storing
data on Tracks 36 through 40, and I'd like to take advantage of that
extra space on disk to store additional programs.

Do I get an "?ILLEGAL TRACK AND SECTOR ERROR" if I try to store
programs on Tracks 36 through 40?

How do I write information/read information from Tracks 36 through 40
on a standard 5.25" floppy diskette?

How would such a program be written in BASIC/ML?
And is there any such program to do just that?

Paul

doctor...@hotmail.com

unread,
Jan 8, 2005, 10:35:07 PM1/8/05
to
Paul,

Use Star Commander and your X-1541 cable. From the Star Commander
screen, be sure your highlight is on the DOS directory, not the 1541
directory, then press F5. Select 1541/40 tracks.

James
www.cbm264.com

dun...@yahoo.com

unread,
Jan 9, 2005, 2:30:13 AM1/9/05
to
James,

Is this the only way to read/write to Tracks 36 through 40 (via Star
Commander)?

Paul

Peter Smith

unread,
Jan 9, 2005, 3:32:33 AM1/9/05
to
dun...@yahoo.com schrieb:
There are some books describing how to read/write track 36-40, I
remember that it is NOT possible with standard IEC commands. Instead,
you have to send a small ML program to the connected drive and then you
have to call this small program ("Block Execute", remember, the drives
have their own CPU and own RAM, and there is the possibility to send up
to 2 KB to the drive).
There is a german book which describes such a program (used for copy
protection), "Martin Hecht" was the author, "Das grosse COMMODORE 64
Buch", "DATA BECKER", see pages around 500 for the hints.

Regards
Peter

dun...@yahoo.com

unread,
Jan 9, 2005, 4:17:27 AM1/9/05
to
So I would send a "B-E" command to the disk drive, and then would be
able to format/read/write to Tracks 36 through 40?

Is there a BASIC loader version of this ML program available?
It sounds like something good for archiving more data per disk.

Paul

Peter Smith

unread,
Jan 9, 2005, 7:08:29 AM1/9/05
to
dun...@yahoo.com schrieb:
No, just this "B-E" command is not enough. First you have to write a
small 6502 assembler program with the proper drive commands (usually a
few "jsr"s to a BIOS routine from the drive itself), convert it to DATA
lines (in a BASIC loader program), then send it via "B-E" to transfer
and execute it.
It is a bigger listing so first I have to scan it. May be a bit later I
can publish it here.

Regards
Peter

Peter Smith

unread,
Jan 9, 2005, 8:00:42 AM1/9/05
to
dun...@yahoo.com schrieb:
Paul,

I was a bit confused before. You have to use "M-W" and "M-E" to transfer
and execute the floppy program. "B-E" (Block-Execute) is able to execute
to the code of one block, not more.
I will publish the scanned routines on my C64 pages at
http://www.8086.info/c64 ...

Regards
Peter

Peter Smith

unread,
Jan 9, 2005, 8:55:33 AM1/9/05
to
dun...@yahoo.com schrieb:

> So I would send a "B-E" command to the disk drive, and then would be
> able to format/read/write to Tracks 36 through 41?

>
> Is there a BASIC loader version of this ML program available?
> It sounds like something good for archiving more data per disk.
>
> Paul
>
I have done it, you can download 2 assembler and 2 basic code fragments
from the page at http://www.8086.info/c64 now.

Regards
Peter

Riccardo Rubini

unread,
Jan 9, 2005, 9:00:29 AM1/9/05
to
Peter Smith wrote:

> I have done it, you can download 2 assembler and 2 basic code
> fragments from the page at http://www.8086.info/c64 now.

Thanks for sharing, Peter. Your homepage is very interesting, I had it
bookmarked and then lost after an HDD crash, I am happy to see it again.

Your pictures of the CP/M cart are very good. What did you use to take those
shots ? I can't match that quality with my equipment ( and, more possibly,
with my skills <:-) ...

Riccardo


Peter Smith

unread,
Jan 9, 2005, 9:56:57 AM1/9/05
to
Riccardo Rubini schrieb:
>> [...] from the page at http://www.8086.info/c64 now.

>
>
> Thanks for sharing, Peter. Your homepage is very interesting, I had it
> bookmarked and then lost after an HDD crash, I am happy to see it again.
>
> Your pictures of the CP/M cart are very good. What did you use to take those
> shots ? I can't match that quality with my equipment ( and, more possibly,
> with my skills <:-) ...

You do not really need skills for it, just a better digicam ;-)
No, I've made many shots and picked the best one for the page, sharpened
the images a bit with Paintshop, and that's all.
See also my (highres) pictures from another old piece of hardware, the
serial/parallel interface for the Amstrad PCW series at
http://www.8086.info/pcw , these pictures are much better.

Regards
Peter

trieck

unread,
Jan 9, 2005, 10:34:23 AM1/9/05
to
Paul,

I have not attempted this. However, in the book "Inside Commodore DOS"
on pg. 30, it states the following:

"Unfortunately, the accuracy of the head positioning mechanism and the
width of the path of magnetization produced by the read/write head
makes the use of these 'phantom' tracks unreliable."
Has anyone seen any reliability problems?

Tom Rieck

silverdr

unread,
Jan 9, 2005, 10:40:39 AM1/9/05
to
dun...@yahoo.com wrote:
> I've been trying to read/write to Tracks 36 through 40, but Disk Doctor
> only goes up to Track 35 (obviously). But I've heard of disks storing
> data on Tracks 36 through 40, and I'd like to take advantage of that
> extra space on disk to store additional programs.

If you are using the 1541 or equivalents then the most efficient way is
to get a modified ROM for the drive. Many floppy speeders, including my
beloved ;-) DolphinDOS allow you to fully use 40 tracks.

>
> Do I get an "?ILLEGAL TRACK AND SECTOR ERROR" if I try to store
> programs on Tracks 36 through 40?

Depends on how you would try to store them. You should be able to bypass
the DOS restrictions if you write a small code to run inside the floppy
controller. Using regular interface commands on an unmodified (1541)
drive will give you ILLEGAL TRACK OR SECTOR error.

>
> How do I write information/read information from Tracks 36 through 40
> on a standard 5.25" floppy diskette?
>

With Dolphin/Prologic etc. you just SAVE and that's all. Note, however
that a regular drive won't read it back.

> How would such a program be written in BASIC/ML?
> And is there any such program to do just that?

OTOH If you don't want to store regular files but rather wish to store
some extra data of your "full-disc" programs, then you need to write
your ML for the floppy controller, which you can execute with T/S
parameters whenever required. It shouldn't be too difficult once you
know the controller programming basics and I recall a couple of such
ready solutions existed.

doctor...@hotmail.com

unread,
Jan 9, 2005, 11:37:08 AM1/9/05
to
Paul,

There are some programs on my website that allow a Plus/4 to
read/write/format 36 or 40 tracks. However I don't have any for
C64/128. I don't see the value in pushing the 1541 past 35 tracks
unless you're adding copy protection. In this case, there are other
alternatives.

If you're simply seeking to avoid "DISK FULL" errors, you might use
your 1571 instead. 1571 disks are also archivable with Star Commander.

The programs are "681 Blocks" and "840 Blocks" at
http://www.cbm264.com/svs/svsindex.html

James
www.cbm264.com

dun...@yahoo.com

unread,
Jan 9, 2005, 2:27:06 PM1/9/05
to
Peter,

Awesome, thanks for the routines. :)

So to write to Tracks 36 through 41, I just change line 140 in the
second program to:

140 PRINT#1,"M-W"CHR$(3)CHR$(0)CHR$(1)

Is this correct?

Paul

dun...@yahoo.com

unread,
Jan 9, 2005, 2:56:50 PM1/9/05
to
Silver,

I wanted to use Track 36 as a second directory/BAM, then Tracks 37
through 41 to store additional data/files.

The programs Peter posted a link to seem to read/write to Tracks beyond
35, but what I really want to do is be able to load/save programs using
the suggested routines on the page for read/writing beyond Track 35.
Paul

dun...@yahoo.com

unread,
Jan 9, 2005, 6:18:46 PM1/9/05
to
Peter,

For some reason my 1571 in my 128-D just hangs up when it run the
formatting program in C64 mode.

The drive will turn on, then when it reads "Track Sector" it starts
blinking endlessly.

Finally, when I select the starting and ending track, it turns on and
just runs and runs and runs forever without stopping.

Does this program only work with the 1541 disk drive?

Paul

silverdr

unread,
Jan 9, 2005, 6:36:34 PM1/9/05
to

I guess that with the quality of the SD 5.25 magnetic media of the 70s
it would possibly require another speed zone to make the upper tracks
work reliable. I don't see any reason for the _stepper_ mechanism (of
the 80! tracks drive) to be less reliable in the last 10 tracks than in
the lower 70. The major difference is the lower linear speed though.

Now to answer your question from my perspective: Since mid 80s I have
used 40 tracks format in my 1541. With small exceptions I always used
quality DD media and... NO, I have never experienced any problems
specifically related to the upper tracks. My 40 tracks formatted
diskettes are still readable after 18 years.

silverdr

unread,
Jan 9, 2005, 6:50:07 PM1/9/05
to
dun...@yahoo.com wrote:
> Silver,
>
> I wanted to use Track 36 as a second directory/BAM, then Tracks 37
> through 41 to store additional data/files.

Usually there shouldn't be a need for second DIR/BAM. There is enough
space on track $12 to keep the information you want, unless you are
running out of dir-entries (144 AFAIR?). Thus you should be able to have
all the extra tracks for your data.

I believe you may even use the existing format extension of e.g.
DolphinDOS and make your routines cope with it. This would have the
additional benefit of compatibility with extended drives.

>
> The programs Peter posted a link to seem to read/write to Tracks beyond
> 35, but what I really want to do is be able to load/save programs using
> the suggested routines on the page for read/writing beyond Track 35.
> Paul
>

If you could explain what is your driving factor? Do you want to store
extra files for yourself or do you plan on distributing your software,
which could benefit from extra storage on one disk side? Or maybe you
just want to exercise it for fun?

dun...@yahoo.com

unread,
Jan 9, 2005, 7:18:10 PM1/9/05
to
Silver,

I have a lot of disks -- over 300, in fact -- and I have many, many
files spread across many, many disks. It's very cumbersome to always
check through 50+ disks for one specific file, so I've wanted to
archive as many related files on each disk as possible (to make them
easier to find). With the storage limitation on 1541-formatted 5.25"
disks being 168KB, I'd like to raise that to around 192KB per disk, per
side, so that I can store approximately 10-15% more files on each disk
(and have less disks) =).

The two programs Peter posted on his website don't seem to work on my
128-D with built-in 1571. The program just makes the drive spin
endlessly when it attempts to format tracks 36 through 41. I am
assuming that the ML routines in the programs he suggested are
1541-only, as they may work with the 1541 ROM but not necessarily the
later 1571 ROM.

Paul

Cameron Kaiser

unread,
Jan 9, 2005, 11:41:06 PM1/9/05
to
"trieck" <tri...@gmail.com> writes:

>"Unfortunately, the accuracy of the head positioning mechanism and the
>width of the path of magnetization produced by the read/write head
>makes the use of these 'phantom' tracks unreliable."

I don't have my copy in front of me, but I seem to remember this was talking
about half-tracks, wasn't it?

--
Cameron Kaiser * cka...@floodgap.com * posting with a Commodore 128
personal page: http://www.armory.com/%7Espectre/
** Computer Workshops: games, productivity software and more for C64/128! **
** http://www.armory.com/%7Espectre/cwi/ **

Peter Smith

unread,
Jan 10, 2005, 5:44:43 AM1/10/05
to
dun...@yahoo.com schrieb:

> Peter,
>
> For some reason my 1571 in my 128-D just hangs up when it run the
> formatting program in C64 mode.
>
> The drive will turn on, then when it reads "Track Sector" it starts
> blinking endlessly.
>
> Finally, when I select the starting and ending track, it turns on and
> just runs and runs and runs forever without stopping.
>
> Does this program only work with the 1541 disk drive?

I guess yes, because it uses some device dependant machine language
routines. Unfortunately the C128D (particulary the version with the
metal case) is NOT machine language compatible with the VIC 1541 drive.
The DOS differs, that is the easy explanation for this.

Regards
Peter

Peter Smith

unread,
Jan 10, 2005, 5:47:39 AM1/10/05
to
dun...@yahoo.com schrieb:

Paul,

try to get a modified DOS (ROM/EPROM). May be for the C128 was also
published a ROM cartridge, but for sure I know this only for the C64.

Regards
Peter

Peter Smith

unread,
Jan 10, 2005, 5:51:35 AM1/10/05
to
dun...@yahoo.com schrieb:

> Peter,
>
> Awesome, thanks for the routines. :)
>
> So to write to Tracks 36 through 41, I just change line 140 in the
> second program to:
>
> 140 PRINT#1,"M-W"CHR$(3)CHR$(0)CHR$(1)
>
> Is this correct?
>
> Paul
>

No. To write to tracks beyond 35, you have to modify the machine
language routine. The file named 1541_read_sec_track_31-41.txt on my
page (http://www.8086.info/c64) has to be modified in line 304.
Instead of
304 DATA 76,209,244, ... it must be
304 DATA 76,117,245, ...
You have also modify the checksum in line 100 into 3517 (instead of 3608).

Regards
Peter

silverdr

unread,
Jan 10, 2005, 5:09:24 PM1/10/05
to
dun...@yahoo.com wrote:
> Silver,
>
> I have a lot of disks -- over 300, in fact -- and I have many, many
> files spread across many, many disks. It's very cumbersome to always
> check through 50+ disks for one specific file, so I've wanted to
> archive as many related files on each disk as possible (to make them
> easier to find). With the storage limitation on 1541-formatted 5.25"
> disks being 168KB, I'd like to raise that to around 192KB per disk, per
> side, so that I can store approximately 10-15% more files on each disk
> (and have less disks) =).

I see. For this reason, I would rather opt for either a harddrive
solution (I personally mostly use IDE64 but any other would do) or at
least a modified ROM - possibly with a floppy speeder and a decent copy
program. DD3 is one of the good options. Writing your own DOS extension
is not impossible but at least is not trivial and not having it well
tested / stoned in ROM and always ready - just adds to the already
tedious enough job of reorganising 300+ dikettes.

>
> The two programs Peter posted on his website don't seem to work on my
> 128-D with built-in 1571. The program just makes the drive spin
> endlessly when it attempts to format tracks 36 through 41. I am
> assuming that the ML routines in the programs he suggested are
> 1541-only, as they may work with the 1541 ROM but not necessarily the
> later 1571 ROM.
>

Since you are not using regular DOS interface but a low level "haxie",
you can't really expect that a low level code written for the 1541 would
work on something not being close to 100% 1541 compatible on that level.

BlackJack

unread,
Jan 10, 2005, 5:26:59 PM1/10/05
to
On Sun, 09 Jan 2005 16:18:10 -0800, dunric wrote:

> I have a lot of disks -- over 300, in fact -- and I have many, many
> files spread across many, many disks. It's very cumbersome to always
> check through 50+ disks for one specific file, so I've wanted to
> archive as many related files on each disk as possible (to make them
> easier to find).

I strongly suggest a "disk database" instead of using nonstandard disk
formats. There are programs specifically for this task - reading in
directories, allowing to note down comments for disks and files etc.

Ciao,
Marc 'BlackJack' Rintsch

Joseph Fenn

unread,
Jan 10, 2005, 7:50:43 PM1/10/05
to

****************************************************
* Ham KH6JF AARS/MARS ABM6JF QCWA WW2 VET WD RADIO *
* Army MARS State Coordinator for Hawaii *
****************************************************

I have a flock of fd2000/1541/1581 disks to keep track of all the files,
why dont you get DCMR it is a disk catalogger or file lister if you
wish and can handle up to 3000 titles and print them out on
a printer in 6 columns alphabetically on 8 by 14 paper sheets.
There was another one that originated in Australia for the 128 mode
also but I cant remember the TITLE of that one.
Kokomo Joe

Sam Gillett

unread,
Jan 10, 2005, 9:02:25 PM1/10/05
to

"Joseph Fenn" wrote ...

> I have a flock of fd2000/1541/1581 disks to keep track of all the files,
> why dont you get DCMR it is a disk catalogger or file lister if you
> wish and can handle up to 3000 titles and print them out on
> a printer in 6 columns alphabetically on 8 by 14 paper sheets.
> There was another one that originated in Australia for the 128 mode
> also but I cant remember the TITLE of that one.

There are several good disk cataloging programs floating around for C128
mode. One that I like is UltraCat v2.0, which can be found on Snakeman's
website

http://www.q-link.cc/c128util.shtml

--
Best regards,

Sam Gillett

Change is inevitable,
except from vending machines!

trieck

unread,
Jan 10, 2005, 10:27:00 PM1/10/05
to
It doesn't specifically mention the term "half-tracks". Just that the
stepper motor can position the read/write head to more than 70
different positions.

silverdr

unread,
Jan 11, 2005, 7:57:18 AM1/11/05
to

I guess the term was "invented" later.

s...@c64.org

unread,
Jan 11, 2005, 11:25:26 AM1/11/05
to
Hi Paul,

The initial idea for The Star Commander to access tracks 36 to 40 on
1541 disks came from WoMo, if I remember correctly. However, he
mentioned already back then that it wouldn't work with 1571 drives:
their DOS _does_ handle tracks 36 to 40, it's just that those are the
first five tracks on the other side of the disk. (Tracks 1 to 35 are on
the upper side, tracks 36 to 70 on the lower side).

To access the extra tracks in native 1571 mode, of course, _can_ be
done but with quite a lot of hacking (manual seeking; moving the head
with your own routines). So, I suggest that you switch the 1571
(temporarily) to 1541 emulation mode instead; see the "U0>M0" command.
Bye,

Joe

Jerry Kurtz

unread,
Jan 11, 2005, 4:01:44 PM1/11/05
to
Sounds like what you really need is a 1581 or something like that which
natively has a higher capacity.
0 new messages