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 > Number of sequential files open on 1541
2016-01-23 22:45
Mathman
Account closed

Registered: Jul 2008
Posts: 3
Number of sequential files open on 1541

Hi all,
the VIC-1541 manual states that five sequential files may be open at the same time, but is that really true? My experimentation gives that three is the maximum if one actual wants to read from those files. From my investigations, it seems like there are five buffers in the 1541, of which two are reserved for BAM + directory listing and only the remaining three are available for reading sequential files. Can anyone confirm if this theory is true?
Thanks.
2016-02-02 09:47
Martin Piper

Registered: Nov 2007
Posts: 722
What's your test code?
2016-02-02 19:33
Fungus

Registered: Sep 2002
Posts: 686
The buffers don't have anything to do with how many files can be open, they are used and purged as needed. Get the Inside Commodore DOS book from bombjack and check the size of the channel/file tables, it's probably five or six at most. I believe you can have only 1 file at a time open for writing, but several reading... however why you would want to have multiple files open if you are doing anything other than using REL files is the question.
2016-02-02 20:06
Frantic

Registered: Mar 2003
Posts: 1648
I *think* (not sure) he uses them for byte-for-byte reading/writing, if that makes any difference. I suppose purging buffers may be a problem then?
2016-02-02 22:14
Fungus

Registered: Sep 2002
Posts: 686
Just write a custom driver and then the limit is easier to expand I guess.
2016-02-02 22:55
Mathman
Account closed

Registered: Jul 2008
Posts: 3
Yes correct. I read byte-for-byte from several files, alternating between them.

It's not important enough that I would write a new driver. I am just interested in knowing if I understood correctly, why it does not work.

Also, why would one like to have a file open if it is not possible to read from it?
2016-02-03 00:11
Fungus

Registered: Sep 2002
Posts: 686
you aren't switching context correctly then, don't use clrchn (it will close it).
2016-02-03 13:19
chatGPZ

Registered: Dec 2001
Posts: 11386
also keep the command channel open all the time - closing it closes all files too
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
acrouzet/G★P
csabanw
Bitbreaker/Performers
CopAss/Leader
theK/ATL
algorithm
Mr. Commodore/UCF/Un..
Guests online: 123
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 Layers  (9.6)
2 No Listen  (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 Triad  (9.3)
5 Censor Design  (9.3)
Top Diskmag Editors
1 Magic  (9.8)
2 hedning  (9.6)
3 Jazzcat  (9.5)
4 Elwix  (9.1)
5 Remix  (9.1)

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