Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user Sepa ! (Registered 2024-05-13) You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > 1541 bible?
2006-12-11 12:01
MRT
Account closed

Registered: Sep 2005
Posts: 149
1541 bible?

I'm looking for some kind of 1541 bible...
While I'm writing my own loader and using the Covert Bitops loader as a reference to how sectors/blocks are built up, I'm getting more and more confused...

From the code snipplet below, I think the following applies.
a. The first byte of the sector is a pointer to the next sector.
b. if there are no more sectors to load, the first byte is zero
c. if the first byte is zero, the second byte contains the number of bytes to read from this (the last) sector.
nextsect:       lda buf,y       ;File found, get starting track & sector
                sta trkbf
                beq loadend     ;If at file's end, send byte $00
                lda buf+1,y
                sta sctbf
                jsr readsect    ;Read the data sector
                bcc error
                ldy #$ff        ;Amount of bytes to send - assume $ff
                lda buf
                bne sendblk
                ldy buf+1       ;Possibly less if it's the last block
sendblk:        tya
sendloop:       jsr sendbyte    ;Send the amount of bytes that will be sent
                lda buf,y       ;Send the sector data in reverse order
                dey
                bne sendloop
                beq nextsect

Is this even remotely correct?
And are there documents describing this?

EDIT:
And if the fist byte only contains a pointer to the next sector, then how does it point to a next track???
2006-12-11 12:17
JackAsser

Registered: Jun 2002
Posts: 1990
A block consist of:

next_track, next_sector, <254 bytes of data>

if next_track==0 then next_sector describes how much of this block that belongs to the file.

If next_track!=0 then next_track+next_sector points to the next position of the file. All 254 bytes of data in the current block is considered in use by the file.
2006-12-11 13:18
Raf

Registered: Nov 2003
Posts: 343
there is AAY1541 by The Dreams and...

I have ebook , I think the title is "inside commodore dos" - there should be what you are searching for :)
google for it , it may be still downloadable from the net


www.vulture.c64.org
2006-12-11 13:52
MRT
Account closed

Registered: Sep 2005
Posts: 149
Quote: there is AAY1541 by The Dreams and...

I have ebook , I think the title is "inside commodore dos" - there should be what you are searching for :)
google for it , it may be still downloadable from the net


www.vulture.c64.org


Yes, the aay1541 I have, but that's just mem locations and pins

I just downloaded the "inside commodore dos" in PDF format.. scanned, so I can't search it. Is there anyone who has this in ASCII or HTML?
2007-04-13 13:26
hibisch
Account closed

Registered: Oct 2002
Posts: 8
A complete disassembly of the 1541 exists as a book, both available in french and german, but still, check out project 64. http://project64.c64.org
2007-04-13 14:13
Cybernator

Registered: Jun 2002
Posts: 154
I think White Flame has a txt version of Inside Commodore DOS. It (the book in general, not just White Flame's version :)) lacks detailed info on the VIA chips IIRC, but covers a great deal of low-level issues.
2007-04-13 16:01
raven
Account closed

Registered: Jan 2002
Posts: 137
There are 2 book that i strongly recommend:
Anatomy of the 1541
Anatomy of the 1571

The 1st one is missing lots of comments on the 1541 rom
listings, as the authors werent able to fully figure out
what goes on there.
With the 1571 book they managed to get nearly everything
and using the full rom disassembly with comments, its
possible to understand exactly how things work.

There is still missing info on certain register bits, which
could be filled out by either experimentation, or going
through some loaders code & figuring it out.
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Conrad
Grue/Extend
t0m3000/BOOM!^ibex-c..
psych
mayor/Taongad/Wide L..
The Syndrom/TIA/Pret..
d'Arc/Topaz Beerline
Apollyon/ALD
Alakran_64
Krill/Plush
Kakka/Extend, Damone..
E$G/hOKUtO fOrcE
WAV/Deja Vu
Marq/Fit^Lieves!Tuor..
Sentinel/Excess/TREX
CreaMD/React
tlr
encore
Guests online: 147
Top Demos
1 13:37  (9.8)
2 Next Level  (9.8)
3 Mojo  (9.7)
4 Coma Light 13  (9.7)
5 Edge of Disgrace  (9.6)
6 Comaland 100%  (9.6)
7 Uncensored  (9.6)
8 No Bounds  (9.6)
9 Wonderland XIV  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 Party Elk 2  (9.7)
2 It's More Fun to Com..  (9.6)
3 Layers  (9.6)
4 Cubic Dream  (9.6)
5 Copper Booze  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Rainbow Connection  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Booze Design  (9.3)
3 Nostalgia  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.047 sec.