30 January 2019, 23:55 | #1 |
Registered User
Join Date: May 2011
Location: Cambridge
Posts: 682
|
HUNK_END optional in Amiga load files?
I'm picking apart Amiga load files and I noticed that some do not have a HUNK_END block between hunks. Instead it seems that the hunk number is implicitly incremented when the next CODE/DATA/BSS block is reached.
Question is: Is this legit? Will all Kickstart versions load such binaries okay? I have always observed HUNK_END at the very end of a load file -- I assume that one is absolutely necessary? I am generating packed executables so it would be nice to elide these HUNK_END blocks if they're not needed. Otoh it doesn't save much, so I won't bother if it's going to cause hassle. |
31 January 2019, 01:57 | #2 |
Semi-Retired
Join Date: Mar 2012
Location: Leiden / The Netherlands
Posts: 2,002
|
I am not sure. Could you give an example of an offending binary?
|
31 January 2019, 12:07 | #3 |
Registered User
Join Date: May 2011
Location: Cambridge
Posts: 682
|
Seems common in small demos. Possibly because this is a common packed-exe trick. eg, first two I looked at:
Strukton by Focus Design: https://files.scene.org/view/parties...d_strukton.zip Imacennial by Dekadence: http://www.dekadence64.org/dkd-imac.lha |
31 January 2019, 15:10 | #4 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
|
Quote:
Works in every existing kickstart so far. So definitely a "feature" that will be maintained for compatibility in 'future'() kickstarts. EDIT: long time ago I had also tested for the last HUNK_END and from what I remember was never excludable Last edited by ross; 31 January 2019 at 15:26. |
|
31 January 2019, 16:01 | #5 | |
Registered User
Join Date: May 2011
Location: Cambridge
Posts: 682
|
Quote:
I have another question, about extra space at the end of relocatable blocks: That is, when the longword count in HUNK_HEADER (3f3) is longer than the longword count in the CODE/DATA/BSS block itself. It looks like DOS will allocate this extra space, but may not initialise it to zeroes (like it does for the first N longwords declared within a BSS block). Can I rely on this as it may make my packs a bit smaller? EDIT: KS2+ seem to zero the extra BSS space. Earlier KS seem not to. Perhaps it is best to zero it then. Last edited by Keir; 31 January 2019 at 16:16. |
|
31 January 2019, 16:43 | #6 | |
Defendit numerus
Join Date: Mar 2017
Location: Crossing the Rubicon
Age: 53
Posts: 4,474
|
Quote:
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
how much .abk files can I load simultaneously | Blackgoat | Coders. AMOS | 9 | 22 March 2016 18:45 |
Worms DC and Gloom WHD load files | zerohour1974 | support.Games | 4 | 18 March 2015 18:10 |
Cannot load files with unicode string from command line | CiroConsentino | support.FS-UAE | 6 | 19 August 2014 13:58 |
Cannot load some dms files in WinUAE | anthonyhead | support.WinUAE | 18 | 31 May 2010 05:40 |
Save/Load State with HDF-Files | Frieshansen | support.WinUAE | 2 | 10 March 2007 18:09 |
|
|