freemint / tos.hyp

The tos.hyp tries to document all functions from TOS. It also has information about MagiC, N.AES, MyAES, Geneva, XaAES, oAESis and some emulators.
https://freemint.github.io/tos.hyp
GNU General Public License v2.0
13 stars 11 forks source link

Description of extension array is missing (RSC files) #109

Open xdelatour opened 2 years ago

xdelatour commented 2 years ago

(Source : AES_4_For_MultiTOS.pdf)

Extension array:
LONG filesize       /* size of the file                                       */
LONG color_io       /* slot for color icons, containing an offset to 
                     * Table CICONBLK's                                       */
LONG dummy[?]       /* more extension slots, to be defined                    */
LONG end_extensions /* always 0L                                              */

If a slot is unused, it should be set to -1L

Table CICONBLK's:
    0L`
    0L
    ... (last entry of color icons)
    -1L (end of table marker, this entry will never be converted to
        actual memory pointer)
mikrosk commented 2 years ago

So where do you suggest we add this information?

th-otto commented 1 year ago

If would IMHO be messy to add all this information to tos.hyp. If someone needs to read/write resources with this format, he should rather look at a commented source to understand all the details.

IIRC i've even posted some sample code long time ago on atari-forum.com.

xdelatour commented 1 year ago

If you think it would be messy to add this information, I agree to close this issue.

However, I'm thinking the lack of information clould involve wrong implementation.

For example, the Changelog of MyAES includes:

Fix Jinnee 1 crash displaying cicon, cicon list chain stop with 0xFFFFFFFF rather NULL (Patch 2 MyAES 0.98 )

Although -1 is really the end of table marker, 0 has never been

Furthermore, description of RSXHDR is wrong: tos.hyp said 'Version number should be 3 for new format' AND 'In the newer format rsh_rssize can be used as an offset to the extension array'. Value '3' only means 32-bit header. Both 16 and 32-bit resource may have an extension array if the 3rd bit is set.

Finally, source code may include experimental feature, such as XaAES which use the 2nd slot of the extension array to store a pointer to an embedded color palette.

th-otto commented 1 year ago

Well i just find it difficult to explain all the gory details in words, without providing example files or sources. But if you think you can do that, please go ahead. It doesn't have to be in UDO format, plain text will be good enough for a start.