Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
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: 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.
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

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
Paulko64
Nordischsound/Hokuto..
Mr. Mouse/XeNTaX/G*P
JEZ
t0m3000/hf^boom!^ibx
HCL/Booze Design
/Panor..
iAN CooG/HVSC
E$G/HF ⭐ 7
REBEL 1/HF
Guests online: 139
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Logo Graphicians
1 t0m3000  (10)
2 Sander  (9.8)
3 Mermaid  (9.5)
4 Facet  (9.4)
5 Shine  (9.4)

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