Commodore and old system LHA archive format...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Spork Schivago
    Badcaps Legend
    • Mar 2012
    • 4734
    • United States of America

    #61
    Re: Commodore and old system LHA archive format...

    If I got the endianness stuff right, I think I know why you thought I didn't know it. My comment about the seconds being more than 78 years. It's because I had some news today that really shook me up. I'm not allowed to tell anyone I know personally yet, but my wife told me she's pregnant! I'm going to be a dad!!!!

    I am sooooo freaking nervous and excited. She said I could tell you guys. She's sleeping and has been shortly after she told me. I came in here to work on this to try to take my mind off of it. I'm so nervous that I won't be a good dad or something. Besides me and my wife, you guys are the only ones who know.
    -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

    Comment

    • rhomanski
      nowhere man
      • Dec 2009
      • 5157
      • U S of A

      #62
      Re: Commodore and old system LHA archive format...

      Congratulations! Don't worry, you'll get the hang of it. Unless you have a girl and then you ain't seen worrying yet. Wait till she starts dating and brings home a long haired drug addict. Lol.
      sigpicThe Sky Is Falling

      Comment

      • stj
        Great Sage 齊天大聖
        • Dec 2009
        • 30956
        • Albion

        #63
        Re: Commodore and old system LHA archive format...

        or a zombie on prescription crap!

        Comment

        • Spork Schivago
          Badcaps Legend
          • Mar 2012
          • 4734
          • United States of America

          #64
          Re: Commodore and old system LHA archive format...

          Originally posted by rhomanski
          Congratulations! Don't worry, you'll get the hang of it. Unless you have a girl and then you ain't seen worrying yet. Wait till she starts dating and brings home a long haired drug addict. Lol.
          LOL! Thanks! I'm just hoping for a healthy baby. Can't see why it won't be healthy though. Is it normal for pregnant women to sleep a lot? My wife's been asleep more than she's been awake lately.
          -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

          Comment

          • diif
            Badcaps Legend
            • Feb 2014
            • 6978
            • England

            #65
            Re: Commodore and old system LHA archive format...

            Congratulations.

            Oh yes the worry !!!! and the things we've been through.....dealing with a some scrote is easy lol

            Comment

            • Spork Schivago
              Badcaps Legend
              • Mar 2012
              • 4734
              • United States of America

              #66
              Re: Commodore and old system LHA archive format...

              So, I discovered something with the JetBBS.dat format. In the hex editor, if I input these values, I get these results for the time stamp...
              Code:
              0xA016CF12 - 01-01-80 12:00am
              0x1F16CF12 - 12-31-07 11:58pm
              Does anyone know what's going on there? As to why A016CF12 might make it 01-01-80 12:00am but 0x1F16CF12 would make it 12-31-07 11:58PM?
              -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

              Comment

              • stj
                Great Sage 齊天大聖
                • Dec 2009
                • 30956
                • Albion

                #67
                Re: Commodore and old system LHA archive format...

                Originally posted by Spork Schivago
                LOL! Thanks! I'm just hoping for a healthy baby.
                then stay away from satanists bearing vaccines.

                Comment

                • fzabkar
                  Badcaps Veteran
                  • Mar 2009
                  • 772
                  • Australia

                  #68
                  Re: Commodore and old system LHA archive format...

                  Sorry for my outburst. My frustration got to me.

                  I thought we had established that the byte order was little-endian, and we did this by analysing your own examples as well as mine. Yet you insisted on interpreting the date/time stamp as big-endian. It seemed we were back at square one.

                  As for the discrepancies in your data, I don't have an answer. In your earliest examples the date/time stamp was in Unix format. The 32-bit little-endian dword counted the number of seconds since 1/1/1970 0:00. In your later examples the same data seemed to be counting the number of seconds since 4:00PM on Dec 31, 1997. This makes no sense to me.

                  Comment

                  • Spork Schivago
                    Badcaps Legend
                    • Mar 2012
                    • 4734
                    • United States of America

                    #69
                    Re: Commodore and old system LHA archive format...

                    We gotta pick out some cool names too. Man, I feel like I'm in shock. I can't believe I'm actually gonna be a father.
                    -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                    Comment

                    • fzabkar
                      Badcaps Veteran
                      • Mar 2009
                      • 772
                      • Australia

                      #70
                      Re: Commodore and old system LHA archive format...

                      0x12CF161F seconds = 3652 days + 7 hours + 58 minutes

                      http://www.timeanddate.com/date/date...=&ad=3652&rec=

                      So this is counting the time since 4PM Dec 31, 1997.

                      0x12CF161F seconds = 3652 days + 8 hours

                      No idea.

                      Comment

                      • stj
                        Great Sage 齊天大聖
                        • Dec 2009
                        • 30956
                        • Albion

                        #71
                        Re: Commodore and old system LHA archive format...

                        Originally posted by Spork Schivago
                        We gotta pick out some cool names too. Man, I feel like I'm in shock. I can't believe I'm actually gonna be a father.
                        Freya or Athena would be cool - look up norse mythology.

                        Comment

                        • Spork Schivago
                          Badcaps Legend
                          • Mar 2012
                          • 4734
                          • United States of America

                          #72
                          Re: Commodore and old system LHA archive format...

                          Originally posted by fzabkar
                          Sorry for my outburst. My frustration got to me.

                          I thought we had established that the byte order was little-endian, and we did this by analysing your own examples as well as mine. Yet you insisted on interpreting the date/time stamp as big-endian. It seemed we were back at square one.

                          As for the discrepancies in your data, I don't have an answer. In your earliest examples the date/time stamp was in Unix format. The 32-bit little-endian dword counted the number of seconds since 1/1/1970 0:00. In your later examples the same data seemed to be counting the number of seconds since 4:00PM on Dec 31, 1997. This makes no sense to me.
                          It's my fault. I was just really excited and really worried about being a new dad. My wife didn't want me to tell anyone yet but later in the day, she said I could tell you guys. I knew it was little endian, but when she fell asleep, I didn't know what to do with myself, so I just went in the work room and started working. I had so much going through my mind at the time, I was just trying to stay busy, I didn't even notice I was posting them as big endian.

                          It is weird. The headers I found show LHA uses the Unix format. I think this is where the confusion might of came from. This custom .dat doesn't follow the actual LHA format. It's close, but it's not the same. The only thing I found that produced identical files (minus the time stamp and crc (because of the missing time stamp)) was this program:
                          https://oku.edu.mie-u.ac.jp/~okumura/compression/ar002/

                          It seems JetSetup.exe is packed with something called EXEPACK. I unpack it and I see it's been compiled with Microsoft Quick C 2.x [1990]. Is it possible that Quick C uses a funky date / time format? All 00's = roughly 1997....but the bytes I showed takes it back to 01-01-1980 12:00am.

                          I was thinking, could maybe the variable used to store the timestamp in the original program used to create JetSetup.exe be using unsigned long and the data we see in JetBBS.dat be looking weird because we're viewing it as signed?

                          I know what signed and unsigned mean, but I don't know how the data for signed and unsigned is stored in memory. If I have an unsigned int variable called x, and I store 1 in the file, but then later on, I read it into a signed int variable, wouldn't 1 be a negative value?
                          -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                          Comment

                          • mariushm
                            Badcaps Legend
                            • May 2011
                            • 3799

                            #73
                            Re: Commodore and old system LHA archive format...

                            Signed/Unsigned : it depends on the architecture of the hardware.

                            On x86 x64 and others, two's complement is used : https://en.wikipedia.org/wiki/Signed...27s_complement

                            A more detailed article : https://en.wikipedia.org/wiki/Two's_complement

                            PS. Since the software is so old, don't make assumptions that variables or data is 32 bit (4 bytes). The software may have stored the information in two signed 16 bit variables, or maybe it did some bit optimizations (like dos did with storing dates)
                            Last edited by mariushm; 02-24-2016, 02:58 AM.

                            Comment

                            • Spork Schivago
                              Badcaps Legend
                              • Mar 2012
                              • 4734
                              • United States of America

                              #74
                              Re: Commodore and old system LHA archive format...

                              Originally posted by mariushm
                              Signed/Unsigned : it depends on the architecture of the hardware.

                              On x86 x64 and others, two's complement is used : https://en.wikipedia.org/wiki/Signed...27s_complement

                              A more detailed article : https://en.wikipedia.org/wiki/Two's_complement

                              PS. Since the software is so old, don't make assumptions that variables or data is 32 bit (4 bytes). The software may have stored the information in two signed 16 bit variables, or maybe it did some bit optimizations (like dos did with storing dates)
                              I couldn't find any information on Microsoft's Quick C data types or date / timestamp. I have to admit, I didn't really look too hard last night. I'll spend some more time looking into it. I decompressed the JetSetup.exe so I could use a debugger on it. It's just that I don't know much about using debuggers. I can use OllyDbg, but that's for PE Applications. It seems DOS apps are a hole nother ball game.

                              Thanks for the suggestions. If I remember correctly, Two's Complement means a 1 in the MSB means negative....but you also have to add one to the binary digit, right? I'll check out the articles you linked too. Been a long time since I played with two's complement.
                              -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                              Comment

                              • Spork Schivago
                                Badcaps Legend
                                • Mar 2012
                                • 4734
                                • United States of America

                                #75
                                Re: Commodore and old system LHA archive format...

                                Originally posted by fzabkar
                                0x12CF161F seconds = 3652 days + 7 hours + 58 minutes

                                http://www.timeanddate.com/date/date...=&ad=3652&rec=

                                So this is counting the time since 4PM Dec 31, 1997.
                                Yeah, that's the easy part. I wrote a small program that converts the hex into years, month, day, hour, min, seconds, in big and little endian. It doesn't take into account leap years. I want to take into account how many days are in a month and leap years. Then when I enter the current 4 bytes in the archive file, it'll show me the same timestamp that DOS shows me. Once I do this, I'll implement it into ar.c.

                                Originally posted by fzabkar
                                0x12CF161F seconds = 3652 days + 8 hours

                                No idea.
                                This is what was confusing me. 0x12CF16A0 starts the counter at 01-01-1980 12:00AM. I would think 0x00000000 would start the counter at 01-01-1980. I've tried looking at it in binary but I didn't really notice anything. I still gotta play with it a little bit. Figure out what ranges go from 01-01-1980 12:00AM to 12-31-97 4:00PM. Then I can work on implementing the time stamp.
                                -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                Comment

                                • Spork Schivago
                                  Badcaps Legend
                                  • Mar 2012
                                  • 4734
                                  • United States of America

                                  #76
                                  Re: Commodore and old system LHA archive format...

                                  Originally posted by fzabkar
                                  0x12CF161F seconds = 3652 days + 7 hours + 58 minutes

                                  http://www.timeanddate.com/date/date...=&ad=3652&rec=

                                  So this is counting the time since 4PM Dec 31, 1997.

                                  0x12CF161F seconds = 3652 days + 8 hours

                                  No idea.
                                  Also, I just wanted to make sure my program is handling the little endian timestamp conversions properly. I pop in 0x12CF161F, I get:
                                  3652 days (which you've already confirmed)

                                  10 years, 0 months, 2 days, 7 hours, 58 minutes, 23 seconds. That sounds about right, doesn't it? It doesn't take leap years into account...just 365 days a year.
                                  -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                  Comment

                                  • fzabkar
                                    Badcaps Veteran
                                    • Mar 2009
                                    • 772
                                    • Australia

                                    #77
                                    Re: Commodore and old system LHA archive format...

                                    I was going to suggest a test procedure, but your latest "1/1/80 0:00" result has upset my line of thought. I have no idea what is going on here.

                                    Prior to your latest test, my guess was that low numbers for the date/time stamp were being treated as counts of seconds since 4PM Dec 31, 1997. If the stamp were a sufficiently large number (eg 28 years), then this would decode to 2026 which exceeds the system time. In such cases the stamp would be reinterpreted as a count of seconds since 1/1/70 0:00.

                                    To test this idea, I was going to propose that you alter the system date to 2037 (Unix has a 2038 "millenium" bug). Then see whether large numbers for the stamp resolve to 1997 based counts rather than 1970.

                                    Comment

                                    • Spork Schivago
                                      Badcaps Legend
                                      • Mar 2012
                                      • 4734
                                      • United States of America

                                      #78
                                      Re: Commodore and old system LHA archive format...

                                      Originally posted by fzabkar
                                      I was going to suggest a test procedure, but your latest "1/1/80 0:00" result has upset my line of thought. I have no idea what is going on here.

                                      Prior to your latest test, my guess was that low numbers for the date/time stamp were being treated as counts of seconds since 4PM Dec 31, 1997. If the stamp were a sufficiently large number (eg 28 years), then this would decode to 2026 which exceeds the system time. In such cases the stamp would be reinterpreted as a count of seconds since 1/1/70 0:00.

                                      To test this idea, I was going to propose that you alter the system date to 2037 (Unix has a 2038 "millenium" bug). Then see whether large numbers for the stamp resolve to 1997 based counts rather than 1970.
                                      That's a good suggestion. However, I don't think time is supposed to start at Dec 31, 1997. I don't think it's because of a bug that we get dates before than. The reason I say this, JetBBS 5.0 was released in 1996. The time stamps seem to match up like they're supposed to.

                                      I used some programs to figure some stuff out about JetSetup.exe. I can send you a zip file for the original program if you'd like to play around more.

                                      It shows JetSetup.exe is compressed with EXEPACK. Once I unpacked it, it shows it was compiled with Microsoft Quick C 2.x [1990]. I almost want to say I remember something about Quick C being able to use EXEPACK. I thought maybe someone used something like a time structure to save the date / timestamps, instead of implementing a function to handle the raw bytes. Then they just wrote the structure to the file. Maybe Quick C does some funky stuff for timestamps.

                                      I contacted the original creator of ar (the LHA one, not the ar Unix utility). He said he never implemented timestamps but said LHA was being written off his ar program, around that time. Maybe an early version of LHA handled timestamps differently than it does today.

                                      I think we almost have this completely figured out though. I just gotta map out how it counts. I believe it is seconds. Just if the hex value is in a certain range, it's seconds from 1980. If it's in a different range, it's seconds since 1997.
                                      -- Law of Expanding Memory: Applications Will Also Expand Until RAM Is Full

                                      Comment

                                      Related Topics

                                      Collapse

                                      • Document Archive
                                        HP Station de travail Z2 format tour G4 i7-8700 Specification for Upgrade or Repair
                                        by Document Archive
                                        This specification for the HP Station de travail Z2 format tour G4 can be useful for upgrading or repairing a desktop PC that is not working. As a community we are working through our specifications to add valuable data like the Station de travail Z2 format tour G4 boardview and Station de travail Z2 format tour G4 schematic. Our users have donated over 1 million documents which are being added to the site. This page will be updated soon with additional information. Alternatively you can request additional help from our users directly on the relevant badcaps forum. Please note that we offer no...
                                        09-12-2024, 02:20 PM
                                      • piernov
                                        NVidia bumpgate
                                        by piernov
                                        Just archiving everything related to bumpgate since most stuff has disappeared from Google. Maybe people will finally take the time to read some of it and stop shouting "reflow gpu" at every occasion but rather try to understand what the real issue is…
                                        Interesting parts about the failure analysis are "Why Nvidia's chips are defective" and "Why Nvidia's duff chips are due to shoddy engineering"


                                        May complete this post at a later date with more details.
                                        Basically issue is a combination of thermal dissipation of the chip with hotspot,...
                                        03-27-2021, 10:34 AM
                                      • s_henya
                                        Imac 2012 format
                                        by s_henya
                                        Hi guys,

                                        Just found this old but nice IMac 2012.
                                        current user had a password which i dont know.
                                        i want to format it and do a clean IOS installation.
                                        i tried command. + R after powering on but it didn’t do anything and IOS continued to load.
                                        i tried the online recovery but it gave me denied icon after connecting to the Wifi.

                                        is there any working method to format it?
                                        guess i can take the long way of ordering the prying tools and format the hdd using another pc.
                                        but i was hoping for another quicker solution....
                                        06-07-2024, 06:37 AM
                                      • inflex
                                        IMPORTANT information - XinZhiZao / XZZ PCB File format is now supported by FlexBV (free and licenced editions)
                                        by inflex
                                        This is an important update for ALL the repair community.

                                        For years now the repair industry has suffered to a new class of gatekeeper when it comes to getting our boardviews & schematics, files are being leaked out of factories but only to select groups who then no longer share those files out to the community, locking them up in a proporiatory format with online-only access.

                                        The XZZ PCB file format has now been reverse engineered and you can now read those .pcb files in FlexBV, free, demo and licenced edtiions.

                                        https://pldaniels.com/flexbv5
                                        ...
                                        11-28-2024, 08:37 PM
                                      • inflex
                                        WANTED: Teboview / TVW file format specification to write OpenBoardview decoder
                                        by inflex
                                        There's file format called "Teboview" with an extension .tvw, and I've noticed some Lenovo laptop boards are using it.

                                        I would like to write a decoder for the format for OpenBoardview but thus far, naturally, I've not found any useful specification on the internet. I've downloaded TeboView-ICT but unfortunately it also doesn't provide a lot of information about the technical information for each part/net/etc.

                                        I've decoded a moderate amount of the file format but I would *really* appreciate it if anyone could drop a file format spec accidentally
                                        ...
                                        10-31-2021, 05:30 AM
                                      • Loading...
                                      • No more items.
                                      Working...