Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
 Welcome to our latest new user maak ! (Registered 2024-04-18) 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: 631
What's your test code?
2016-02-02 19:33
Fungus

Registered: Sep 2002
Posts: 609
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: 1627
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: 609
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: 609
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: 11100
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
Guests online: 77
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 The Ghost  (9.6)
10 Bromance  (9.6)
Top onefile Demos
1 It's More Fun to Com..  (9.9)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 Rainbow Connection  (9.5)
6 TRSAC, Gabber & Pebe..  (9.5)
7 Onscreen 5k  (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 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top NTSC-Fixers
1 Pudwerx  (10)
2 Booze  (9.7)
3 Stormbringer  (9.7)
4 Fungus  (9.6)
5 Grim Reaper  (9.3)

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