| |
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??? |
|
| |
JackAsser
Registered: Jun 2002 Posts: 2014 |
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.
|
| |
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 |
| |
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? |
| |
hibisch
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
|
| |
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. |
| |
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. |