FAT16-Problem

Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1409
Registered: 03 / 2005
Subject:

Re: FAT16-Problem

 · 
Posted: 04.01.2019 - 14:21  ·  #17
There is only one line of code different between the working and non-working version, so somehow that must be causing the problem.

But as to how or why, I have no idea.

Code
SYSTEM._DrawVerLineP: 
                        LDD       _ACCB, Y+007h 
                        LDD       _ACCA, Y+008h 
                        LDD       _ACCALO, Y+005h 
                        LDD       _ACCAHI, Y+006h 
                        LDD       _ACCDLO, Y+003h 
                        LDD       _ACCDHI, Y+004h 
                        LDD       _ACCBLO, Y+001h 
                        LDD       _ACCBHI, Y+002h 
                        LDS       _ACCCLO, ViewPortPTR 
                        LDS       _ACCCHI, ViewPortPTR+1 
                        STD       Z+20, _ACCDLO 
                        STD       Z+21, _ACCDHI 
                        STD       Z+22, _ACCBLO 
                        STD       Z+23, _ACCBHI 
                        LDD       _ACCELO, Z+0 
                        LDD       _ACCEHI, Z+1 
                        CP        _ACCB, _ACCELO 
                        CPC       _ACCA, _ACCEHI 
                        BRMI      SYSTEM._L1759 
                        LDD       _ACCELO, Z+4 
                        LDD       _ACCEHI, Z+5 
                        CP        _ACCELO, _ACCB 
                        CPC       _ACCEHI, _ACCA 
                        BRMI      SYSTEM._L1759 
                        CP        _ACCBLO, _ACCALO 
                        CPC       _ACCBHI, _ACCAHI 
                        BREQ      SYSTEM._L1759 
                        BRPL      SYSTEM._L1756 
                        PUSH      _ACCALO 
                        PUSH      _ACCAHI 
                        MOV       _ACCALO, _ACCBLO 
                        MOV       _ACCAHI, _ACCBHI 
                        POP       _ACCBHI 
                        POP       _ACCBLO 
SYSTEM._L1756: 
                        LDI       _ACCDHI, 080h 
                        LDD       _ACCELO, Z+2 
                        LDD       _ACCEHI, Z+3 
                        CP        _ACCALO, _ACCELO 
                        CPC       _ACCAHI, _ACCEHI 
                        BRPL      SYSTEM._L1757 
                        MOV       _ACCALO, _ACCELO 
                        MOV       _ACCAHI, _ACCEHI 
SYSTEM._L1757: 
                        LDD       _ACCELO, Z+6 
                        LDD       _ACCEHI, Z+7 
                        CP        _ACCELO, _ACCBLO 
                        CPC       _ACCEHI, _ACCBHI 
                        BRPL      SYSTEM._L1758 
                        MOV       _ACCBLO, _ACCELO 
                        MOV       _ACCBHI, _ACCEHI 
SYSTEM._L1758: 
                        PUSH      _ACCB 
                        PUSH      _ACCA 
                        PUSH      _ACCALO 
                        PUSH      _ACCAHI 
                        PUSH      _ACCBLO 
                        PUSH      _ACCBHI 
                        PUSH      _ACCDHI 
                        LDD       _ACCDLO, Y+0 
                        AND       _ACCDLO, _ACCDHI 
                        BREQ      SYSTEM._L1760 
                        RCALL     SYSTEM._GraphDotW1 
                        RJMP      SYSTEM._L1762 
SYSTEM._L1760: 
                        RCALL     SYSTEM._GraphDotW0 
SYSTEM._L1762: 
                        POP       _ACCDHI 
                        LSR       _ACCDHI 
                        BRNE      SYSTEM._L1761 
                        LDI       _ACCDHI, 080h 
SYSTEM._L1761: 
                        POP       _ACCBHI 
                        POP       _ACCBLO 
                        POP       _ACCAHI 
                        POP       _ACCALO 
                        POP       _ACCA 
                        POP       _ACCB 
                        SUBI      _ACCALO, 0FFh 
                        SBCI      _ACCAHI, 0FFh 
                        CP        _ACCBLO, _ACCALO 
                        CPC       _ACCBHI, _ACCAHI 

with the next line FAT16 on PORTE works:
Code

                        BRNE      SYSTEM._L1758 

but with this line it doesn't
Code

                        BRCC      SYSTEM._L1758 

here is rest of routine
Code

SYSTEM._L1759: 
                        RET
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: FAT16-Problem

 · 
Posted: 04.01.2019 - 15:13  ·  #18
Hello Merlin,
strange! The problem isn't the FAT driver but the Graph driver??
rolf
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2134
Registered: 03 / 2003
Subject:

Re: FAT16-Problem

 · 
Posted: 04.01.2019 - 15:22  ·  #19
Hallo Rolf,

dafür spricht evtl. auch die Tatsache, daß es mir bei rückgemeldete 0 Bytes frei und trotzdem geschriebenen Daten das Dateisystem zerhagelt. Die Directory-Einträge sind vorhanden, aber Dateien und Verzeichnisse können nicht geöffnet werden.

Falls du es noch nicht gesehen hast: du hast ne Mail von mir :)

Gruss
Harry
Merlin
Administrator
Avatar
Gender:
Age: 24
Posts: 1409
Registered: 03 / 2005
Subject:

Re: FAT16-Problem

 · 
Posted: 04.01.2019 - 16:16  ·  #20
Hi Rolf.

I cannot say what the problem is really. Just that the working and non-working versions differ by just one line and that line is in the graphics routines. It makes no sense to me, and why moving the disk to port D should make a difference makes no sense either.
Thomas.AC
Benutzer
Avatar
Gender: n/a
Age: 43
Posts: 308
Registered: 07 / 2013
Subject:

Re: FAT16-Problem

 · 
Posted: 04.01.2019 - 17:11  ·  #21
Hallo Harry,
an welchen Portpins ist das LCD bei dir angeschlossen?
Gruß
Thomas
rh
Administrator
Avatar
Gender:
Location: Germany
Age: 24
Homepage: e-lab.de
Posts: 5558
Registered: 03 / 2002
Subject:

Re: FAT16-Problem

 · 
Posted: 04.01.2019 - 17:28  ·  #22
@all,
ich verstehe das nicht!
Merlin findet nur eine Zeile Differenz und das im Graphtreiber !!!
Ich mache mich auf die Suche
rolf
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2134
Registered: 03 / 2003
Subject:

Re: FAT16-Problem

 · 
Posted: 04.01.2019 - 17:32  ·  #23
Hallo Thomas,

Hardware-SPI Port C.

..... und das ist kein LCD ;). 8 MAX7219 kaskadiert. Siehe auch topic.php?t=3493

Harry
Attachments
FAT16-Problem
Filename: GPST7_10.jpg
Filesize: 1.94 MB
Title:
Download counter: 184
Harry
Moderator
Avatar
Gender:
Location: zwischen Augsburg und Ulm
Age: 59
Posts: 2134
Registered: 03 / 2003
Subject:

Re: FAT16-Problem

 · 
Posted: 05.01.2019 - 14:05  ·  #24
Ich hab jetzt noch Thorstens Idee ausprobiert, aber auch mit dem Soft_SPI für die SD-Karte geht es nicht.

- alle Processe vor F16_GetDiskFree gesperrt: keine Änderung

Harry
Selected quotes for multi-quoting:   0

Registered users in this topic

Currently no registered users in this section

The statistic shows who was online during the last 5 minutes. Updated every 90 seconds.
MySQL Queries: 16 · Cache Hits: 15   137   152 · Page-Gen-Time: 0.077581s · Memory Usage: 2 MB · GZIP: on · Viewport: SMXL-HiDPI