Re: [cc65] Re: readdir bug

From: Ullrich von Bassewitz <uz1musoftware.de>
Date: 2012-09-14 18:10:16
Hi!

On Fri, Sep 14, 2012 at 04:39:59PM +0200, Spiro Trikaliotis wrote:
> As it is, though, (assuming the program "test" exists on the disk), the
> behaviour is exactly what you see in the test program: After opening and
> closing the file, the dir channel returns erroneous values. I believe
> that the 1541 overwrites some pointers which confuse it completely, but
> I have not tested it yet.

This would mean it's an error in the floppy. But why then does the Atari
behave in an identical manner? Or are these two problems unrelated?

> Perhaps, we should convince the VICE developers to add a "debugging
> chip" which only outputs data to the host. That is, something like
[...]

That might help a bit. Fixing the label stuff would also be helpful. And then
there's still the debug info generated by the linker. There are emulators that
are able to debug on source code level, just as a reminder :-(

> With the "#if 1", the entry type is set to "program", so that the test
> program actually opens the file. With the "#if 0", it skipps it instead.

Yes, I noticed that.

> > Unfortunately this is complicated by not having a decent debugger available.
> > My current version of VICE is not even able to load the label file any more.
>
> Did you change the format of the label files?

No. The files are actually read without errors. But VICE won't find the labels
afterwards. At least most of them.

> Now, what about a fix? I am not sure how to proceed. The directory would
> have to be read in one chunk (or, by using the offset and seekdir()? But
> that would slow down the process of reading the dir extremely.)

Reading the whole directory in one step uses quite some memory. Unfortunately
the only other idea I have is to document this bug and let the programmer
handle it.

Regards


        Uz


-- 
Ullrich von Bassewitz                                  uz@musoftware.de
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Sep 14 18:10:24 2012

This archive was generated by hypermail 2.1.8 : 2012-09-14 18:10:27 CEST