Files problem with Hatari ?

A forum about the Hatari ST/STE emulator - the current version is v2.0.0

Moderators: simonsunnyboy, thothy, Moderator Team

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Files problem with Hatari ?

Postby ljbk » Mon May 06, 2013 11:24 am

Hi !

I was working on the Hard Disk directory adding some files via the normal Windows Explorer interface.
When i go to Hatari after that, i noticed that from the 800+ files or directories i have there, TOS (via Hatari) only recognizes 93 (!) items ...
STEem uses the same PC directory as hard drive and shows me the correct 807 items.
Both emulators use the same TOS: 1.62 UK.
Both emulators use 14 MB and 8 MHz.

Emulator machine cold reset does not solve this.
The only thing that seems left is to try to re-install Hatari.

I attach a screen dump to prove the words.

Bye,
Paulo.
You do not have the required permissions to view the files attached to this post.

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Files problem with Hatari ?

Postby ljbk » Mon May 06, 2013 1:37 pm

Hi !

I found out the reason for the problem.
Due to some unknow reason, a file in the hard disk directory gets a "strange" "last modified" date like:
11‎th ‎January de ‎1601, ‏‎04:12:43
or
‎1‎st ‎January de ‎1970, ‏‎01:00:00
Hatari will only display the files sorted by name up to that file.
As i had a date problem with "desertd2.mod" file, all files starting by e,f,g ... would not be shown / considered.

STEem does not have that problem.

Paulo.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Files problem with Hatari ?

Postby Cyprian » Mon May 06, 2013 1:41 pm

a few years ago I faced the same issue and I reported that to the Hatari team. it seems that priority of that issue wasn't to high and finally wasn't fixed:
http://lists.berlios.de/pipermail/hatar ... 01157.html
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
dma
Atari Super Hero
Atari Super Hero
Posts: 817
Joined: Wed Nov 20, 2002 11:22 pm
Location: France
Contact:

Re: Files problem with Hatari ?

Postby dma » Mon May 06, 2013 1:59 pm

Ah "desertd2.mod", i guess this must be the second tune from Kefren "Desert Dream" Amiga demo, "Checknobankh" by Laxity. ;)
http://modarchive.org/index.php?request ... uery=36330

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Mon May 06, 2013 5:21 pm

Cyprian wrote:a few years ago I faced the same issue and I reported that to the Hatari team. it seems that priority of that issue wasn't to high and finally wasn't fixed:
http://lists.berlios.de/pipermail/hatar ... 01157.html


It's not that it's not a priority, but that to fix a bug, it (often) needs to be reproducible by the maintainer. Otherwise there's not enough data to find out why it happens and whether some change actually fixed the issue. That issue wasn't reproducible on Linux and you didn't provide a test program or test data (e.g. your directory contents as suggested), so that the issue could have been investigated.

There have been some fixes to GEMDOS HD emulation since v1.6.2. You could try whether the problem is still reproducible with latest Hatari from Mercurial, and if it is, first provide GEMDOS trace (hatari --trace gemdos ...) of what happens, and if that doesn't tell anything, minimal tarball of directory contents triggering the issue on Windows.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Mon May 06, 2013 5:23 pm

ljbk wrote:I found out the reason for the problem.
Due to some unknow reason, a file in the hard disk directory gets a "strange" "last modified" date like:
11‎th ‎January de ‎1601, ‏‎04:12:43
or
‎1‎st ‎January de ‎1970, ‏‎01:00:00
Hatari will only display the files sorted by name up to that file.
As i had a date problem with "desertd2.mod" file, all files starting by e,f,g ... would not be shown / considered.
.


Could you attach tarball of minimal directory contents with which the issue can be reproduced?

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Files problem with Hatari ?

Postby ljbk » Mon May 06, 2013 8:46 pm

dma wrote:Ah "desertd2.mod", i guess this must be the second tune from Kefren "Desert Dream" Amiga demo, "Checknobankh" by Laxity. ;)
http://modarchive.org/index.php?request ... uery=36330


Yes, :) , the file was that mod but it could be any other one.
I was using that mod file to test a bug from the original Lance replayer.
Just for your info, there is a Note Delay (EDx) bug, you can notice at around 3:35 using the orginal Lance replay when comparing to Milky or Winamp.
Next version of Hacking Lance will solve that.

The problem is related to the "date modified".
But i don't have the situation anymore as i Hexedited and saved the 5 files with this situation to get a correct case.
I don't know how i got to the original situation.
My guess is that sometime (may be years ago) i openned the archive i attach and copied the files to one of the directory.
Maybe the version of archive handler i used then did not support the dates included (2049) and produced some files with strange "date modified" values.


Paulo.

PS:
I just found one zip that contains the file with the problem ... :)
Just copy the file from the zip to your Hatari hard disk directory to reproduce the problem.
You do not have the required permissions to view the files attached to this post.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Files problem with Hatari ?

Postby Cyprian » Mon May 06, 2013 9:44 pm

Eero Tamminen wrote:
Cyprian wrote:a few years ago I faced the same issue and I reported that to the Hatari team. it seems that priority of that issue wasn't to high and finally wasn't fixed:
http://lists.berlios.de/pipermail/hatar ... 01157.html


It's not that it's not a priority, but that to fix a bug, it (often) needs to be reproducible by the maintainer. Otherwise there's not enough data to find out why it happens and whether some change actually fixed the issue. That issue wasn't reproducible on Linux and you didn't provide a test program or test data (e.g. your directory contents as suggested), so that the issue could have been investigated.

actually I did it :) I sent demos.tst.zip and following link: http://lineout.atari.org/crap/128chess.zip
I've checked both under Hatari from CVS and first one works ok and second one doesn't

Eero Tamminen wrote:There have been some fixes to GEMDOS HD emulation since v1.6.2. You could try whether the problem is still reproducible with latest Hatari from Mercurial, and if it is, first provide GEMDOS trace (hatari --trace gemdos ...) of what happens, and if that doesn't tell anything, minimal tarball of directory contents triggering the issue on Windows.


"hatari --trace gemdos" gives me only following output in stderr.txt and exit.

Code: Select all

Hatari v1.6.2+ (Apr  4 2013), compiled on:  Apr  4 2013, 22:03:22
Configured max Hatari resolution = 832x576.
Can not load TOS file:
'c:\Atari\_Emulatory\Hatari_TEST\tos.img'
GEMDOS HDD emulation, C: <-> c:\_Twardziel.
Gemdos_Boot()
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
npomarede
Atari God
Atari God
Posts: 1178
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Files problem with Hatari ?

Postby npomarede » Mon May 06, 2013 10:29 pm

Hello
from the gemdos doc, function 87 Fdatime uses a timeptr structure like this :

Code: Select all

typedef struct
{
   uint16_t     time;  /* Time like Tgettime */
   uint16_t     date;  /* Date like Tgetdate */
} DOSTIME;

The structure of both integer values is arranged as follows :
Bit   Time
0-4   Seconds in units of two (0-29)
5-10   Minutes (0-59)
11-15   Hours (0-23)

Bit   Date
0-4   Day of month (1-31)
5-8   Month (1-12)
9-15   Year (0-119, 0=1980)

So, with such a structure, it seems impossible to have date before 1980 (2049 should be OK though).
In the case where the underlying filsesystem has dates outside 1980-2099, I think they should be converted maybe to 1/1/1980 if below or 31/12/2099 if above when reported to the emulated TOS (by modifying GemDOS_DateTime2Tos() in gemdos.c to add more cases for tm_year)

Nicolas

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Files problem with Hatari ?

Postby ljbk » Tue May 07, 2013 7:44 pm

Eero Tamminen wrote:
ljbk wrote:I found out the reason for the problem.
Due to some unknow reason, a file in the hard disk directory gets a "strange" "last modified" date like:
11‎th ‎January de ‎1601, ‏‎04:12:43
or
‎1‎st ‎January de ‎1970, ‏‎01:00:00
Hatari will only display the files sorted by name up to that file.
As i had a date problem with "desertd2.mod" file, all files starting by e,f,g ... would not be shown / considered.
.


Could you attach tarball of minimal directory contents with which the issue can be reproduced?


Hi !

Just in case you did not notice, i managed to find the file with the strange "date modified" and i included it in a zip you can download from my last post before this one.
To reproduce the error just copy the file from the zip to your Hatari "hard drive" directory.

Paulo.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Tue May 07, 2013 8:45 pm

ljbk wrote:Just in case you did not notice, i managed to find the file with the strange "date modified" and i included it in a zip you can download from my last post before this one. To reproduce the error just copy the file from the zip to your Hatari "hard drive" directory.


Thanks! (It may go to weekend, but hopefully I have already time before that to check the issue.)

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Wed May 08, 2013 5:43 pm

ljbk wrote:I just found one zip that contains the file with the problem ... :)
Just copy the file from the zip to your Hatari hard disk directory to reproduce the problem.


From 128chess.zip I get files with dates in 2004.

From desertd2.zip I get a file with date in 2038.

From modules.rar, I get files with dates in 1970.

Hatari shows all of them fine.

Could you provide a tarball containing the problematic files (in case tar stores & restores older timestamps)?

Hippy Dave
Atari Super Hero
Atari Super Hero
Posts: 515
Joined: Sat Jan 10, 2009 5:40 am

Re: Files problem with Hatari ?

Postby Hippy Dave » Wed May 08, 2013 6:26 pm

Eero Tamminen wrote:
ljbk wrote:I just found one zip that contains the file with the problem ... :)
Just copy the file from the zip to your Hatari hard disk directory to reproduce the problem.


From 128chess.zip I get files with dates in 2004.

From desertd2.zip I get a file with date in 2038.

From modules.rar, I get files with dates in 1970.

Hatari shows all of them fine.

Could you provide a tarball containing the problematic files (in case tar stores & restores older timestamps)?

2038 and 1970 look suspiciously Linux related. Where 2038 is the 32 bit GNU/Linux (have not mastered time) BUG!!! :x

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Wed May 08, 2013 9:39 pm

Hippy Dave wrote:
Eero Tamminen wrote:Could you provide a tarball containing the problematic files (in case tar stores & restores older timestamps)?

2038 and 1970 look suspiciously Linux related. Where 2038 is the 32 bit GNU/Linux (have not mastered time) BUG!!! :x


Hatari uses time_t which on 32-bit systems (like mine) is 32-bit. As to whether ZIP & RAR timestamps are 32-bit, I don't know, but I suspect they are (TOS one is 16-bit time + 16-bit date). I think ZIP changing the date is quite valid, you certainly don't have TOS files that really are from earlier time than 1970, or later than 2038... :-)

npomarede wrote:So, with such a structure, it seems impossible to have date before 1980 (2049 should be OK though).
In the case where the underlying filsesystem has dates outside 1980-2099, I think they should be converted maybe to 1/1/1980 if below


Hatari has always done that (I think it was inherited from STonX code originally).

This could be (again) be Windows localtime() issue (Windows stat() returning values that it's localtime() function doesn't accept). I.e. GNU/Cygwin build instead of mingw one for Windows might actually work OK...

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Wed May 08, 2013 9:54 pm

ZIP time & date are both 16-bit:
http://en.wikipedia.org/wiki/Zip_%28fil ... le_headers

When browsing some unzipping code, ZIP seems to be using MSDOS datestamps, which are exactly the same as TOS ones. I.e. ZIP dates start from same epoc as TOS, 1980, which I think to mean that ZIP files cannot have dates earlier than that... -> Your Windows ZIP extractor is broken in regards to timestamps?

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Thu May 09, 2013 10:43 am

Eero Tamminen wrote:This could be (again) be Windows localtime() issue (Windows stat() returning values that its localtime() function doesn't accept).


Does the attached workaround fix the issue for Windows?
You do not have the required permissions to view the files attached to this post.

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Files problem with Hatari ?

Postby ljbk » Thu May 09, 2013 10:46 am

Eero Tamminen wrote:ZIP time & date are both 16-bit:
http://en.wikipedia.org/wiki/Zip_%28fil ... le_headers

When browsing some unzipping code, ZIP seems to be using MSDOS datestamps, which are exactly the same as TOS ones. I.e. ZIP dates start from same epoc as TOS, 1980, which I think to mean that ZIP files cannot have dates earlier than that... -> Your Windows ZIP extractor is broken in regards to timestamps?


The Windows ZIP extractor that produced the zip is the "official" Microsoft Explorer one ... :)
Of course this could be considered a Microsoft bug ... :D
I can not remember which program was used to open the .rar file that contains the 5 mods. It was that .rar browser/extractor that produced the files with the funny date modified dates.
Anyway, even with that file, with the 1601(!) date, TOS (via STEem) does not stop showing me the full set of hard drive files while TOS (via Hatari) does.
But some Win 32 programs like Hex Editor XVI32 refuse to open the file.


Paulo.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Thu May 09, 2013 11:54 am

ljbk wrote:Anyway, even with that file, with the 1601(!) date, TOS (via STEem) does not stop showing me the full set of hard drive files while TOS (via Hatari) does.


Released Hatari returns GEMDOS error code to program on reading a file for which timestamp host (Windows localtime() function) returns an error. Patch attached to above post will in that case default to TOS epoch date instead. If you re-build Hatari patched with that, does it work?

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Files problem with Hatari ?

Postby Cyprian » Thu May 09, 2013 12:04 pm

Eero Tamminen wrote:
ljbk wrote:I just found one zip that contains the file with the problem ... :)
Just copy the file from the zip to your Hatari hard disk directory to reproduce the problem.


From 128chess.zip I get files with dates in 2004.


I've checked that file again and:
- when I extract it with standard Windows7, the create date is set to today;
- in case of Total Commander the create date is in the past:
TC_Date_Issue.png
You do not have the required permissions to view the files attached to this post.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Files problem with Hatari ?

Postby ljbk » Thu May 09, 2013 1:56 pm

Eero Tamminen wrote:
ljbk wrote:Anyway, even with that file, with the 1601(!) date, TOS (via STEem) does not stop showing me the full set of hard drive files while TOS (via Hatari) does.


Released Hatari returns GEMDOS error code to program on reading a file for which timestamp host (Windows localtime() function) returns an error. Patch attached to above post will in that case default to TOS epoch date instead. If you re-build Hatari patched with that, does it work?


Sorry, i am not used to, don't know really how to, have never "re-build Hatari patched with that".
As i am not familiar with the Hatari build process, may be it is faster if you propose a build candidate so that i can test.


Paulo.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Thu May 09, 2013 5:36 pm

ljbk wrote:Sorry, i am not used to, don't know really how to, have never "re-build Hatari patched with that".
As i am not familiar with the Hatari build process, may be it is faster if you propose a build candidate so that i can test.


Before commiting the patch to Hatari, I really would like to get some kind of verification that it actually fixes the issue.

Nicolas, did you have some kind of Windows setup where you could test this?

User avatar
npomarede
Atari God
Atari God
Posts: 1178
Joined: Sat Dec 01, 2007 7:38 pm
Location: France

Re: Files problem with Hatari ?

Postby npomarede » Mon May 13, 2013 8:10 am

Hello

Christer Solskogen put a version of latest dev version with Eero's patch :

http://antarctica.no/~hatari/hatari-2a1d59da0849-special/

Can you try it with your files ?

Nicolas

User avatar
ljbk
Atari Super Hero
Atari Super Hero
Posts: 513
Joined: Thu Feb 19, 2004 4:37 pm
Location: Estoril, Portugal

Re: Files problem with Hatari ?

Postby ljbk » Mon May 13, 2013 1:13 pm

npomarede wrote:Hello

Christer Solskogen put a version of latest dev version with Eero's patch :

http://antarctica.no/~hatari/hatari-2a1d59da0849-special/

Can you try it with your files ?

Nicolas


Hi !

I downloaded the Win64 and Win32 version.
The Win64 version complains about libtermcap-0.dll not found but the the 1.62 version one is there: may be it is not a 64-bit one.
The Win32 version also does not work. I get an alert with:
hatari.exe - Entry Point Not Found
The procedure entry point InterlockedCompareExchange@12 cound not be located in the dynamic link library libtermcap-0.dll.

Paulo.

User avatar
Cyprian
Atari God
Atari God
Posts: 1404
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: Files problem with Hatari ?

Postby Cyprian » Mon May 13, 2013 1:20 pm

Paulo, faced the same issue. fortunately I had a copy of libtermcap-0.dll (not from Hatari 1.6.2 but from previous build) and it works fine.
I can add here valid libtermcap-0.dll.
Jaugar / TT030 / Mega STe / 800 XL / 1040 STe / Falcon030 / 65 XE / 520 STm / SM124 / SC1435
SDrive / PAK68/3 / CosmosEx / SatanDisk / UltraSatan / USB Floppy Drive Emulator / Eiffel / SIO2PC / Crazy Dots / PAM Net
Hatari / Aranym / Steem / Saint
http://260ste.appspot.com/

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1558
Joined: Sun Jul 31, 2011 1:11 pm

Re: Files problem with Hatari ?

Postby Eero Tamminen » Mon May 13, 2013 4:58 pm

Christer mentioned that he has already fixed the termcap issue and I just commited the workaround to Hatari, so fixed Windows version should be soon available in daily builds.

EDIT: it's now here: http://antarctica.no/~hatari/hatari-1a53619931fb/


Social Media

     

Return to “Hatari”

Who is online

Users browsing this forum: No registered users and 2 guests