EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: Dates older than 1980 = Invalid?  (Read 3083 times)

Zandro

  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 40
  • Operating System:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Firefox 60.0 Firefox 60.0
    • View Profile
Dates older than 1980 = Invalid?
« on: 22 April 2019, 01:56 »

Hello, long time no speak.  I was adapting a dat for DOS era content, and many files are dated 1979-12-03, functionally as placeholders for unknown values.  This is posing a problem for use with clrmamepro as I've found that all dates prior to 1980-01-01 00:00:00 are treated as illegal values.  Was this set arbitrarily? Can it be set so something more accommodating, such as 1900?  The first hard drives were commercially produced even before the UNIX epoch (1970-01-01), and floppy disks were becoming normal during the mid to late 1970s.

Alternatively, is there a way to store a file WITHOUT a date set, or is that a violation of the zip standard?

Example:
game (
   name "Las Vegas Blackjack v1.05 (1982)(Quala Software) [Strategy, Cards]"
   rom ( name "AUTOEXEC.BAT" size 24 date "1979-12-03 00:04:00" crc 282A252C )
   rom ( name "BASICA.COM" size 16256 date "1981-08-04 00:00:00" crc 1DF9FAD6 )
   rom ( name "BLACKJAK.BAS" size 23296 date "1982-07-27 00:06:26" crc 9D3CA6FC )
   rom ( name "COMMAND.COM" size 3231 date "1981-08-04 00:00:00" crc 5016C475 )
   rom ( name "DATE.COM" size 252 date "1981-08-04 00:00:00" crc EEF91299 )
)


Thank you,
Z
Logged


Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 113
  • Offline Offline
  • Posts: 3292
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 73.0.3683.103 Chrome 73.0.3683.103
    • View Profile
Re: Dates older than 1980 = Invalid?
« Reply #1 on: 22 April 2019, 06:48 »

MS DOS:
The MS-DOS date format can represent only dates between 1/1/1980 and 12/31/2107.

NTFS:
A file time is a 64-bit value that represents the number of 100-nanosecond intervals that have elapsed since 12:00 A.M. January 1, 1601 Coordinated Universal Time (UTC).

Statndard ZipFiles use Date in MS-DOS format

So in theory, using uncompressed files should work and zip files shouldn't. However due to holiday I haven't checked this yet and I don't know the day formats in rar/7z...have to check that later.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 113
  • Offline Offline
  • Posts: 3292
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 73.0.3683.103 Chrome 73.0.3683.103
    • View Profile
Re: Dates older than 1980 = Invalid?
« Reply #2 on: 22 April 2019, 20:06 »

update:

there is a check during datfile parsing which checks given dates against MS-DOS (1980+) date format...so such dates won't be accepted, no matter if NTFS will be able to handle it (you'd run into trouble with zipfiles anyway....).

I will do some additional tests for pure ntfs/7z/rar later and may remove the initial check.

update 2:
removing the initial check is not enough since there seem to be some file attribute routines which won't accept files < 1980 either and will convert your 1970 file to something in 2008 ;-) ....so....as mentioned I will do some further investigation but don't count for it in April
« Last Edit: 22 April 2019, 20:13 by Roman »
Logged

Zandro

  • Member
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 40
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Firefox 60.0 Firefox 60.0
    • View Profile
Re: Dates older than 1980 = Invalid?
« Reply #3 on: 23 April 2019, 07:22 »

Well, now that I'm aware of the deeply rooted reason for the limitation in zip files, I'm not going to fight it. Considering that this set is DOS specific and these older dates are probably faked anyway, I can simply change them to the oldest value actually supported.

I have PM'd you a zip copy of the set represented by my earlier example, because I find it interesting that its allegedly pre-DOS autoexec.bat does not list a modified date in winrar or 7zip.  I surmise it is because there is no timestamp actually stored for it, and I'm curious if there can be some method to do the same in clrmamepro, such as setting the dat's rom date field to 0000-00-00 00:00:00 (or "0").

I will respect whatever comes from this, because I know time is not always on our side. ;D
« Last Edit: 23 April 2019, 07:27 by Zandro »
Logged
Pages: [1]   Go Up
 

Page created in 0.174 seconds with 20 queries.