Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
xdelatour opened this issue Oct 2, 2022 · 4 comments
Open

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

xdelatour opened this issue Oct 2, 2022 · 4 comments

Comments

@xdelatour
Copy link
Contributor

  • Extension array: there is an extension array if the bit 2 (third bit) of rsh_vrsn is set ((rsh_vrsn & 4) == 4). The extension array immediately follows the old RSC. Hence, its offset matches the rsh_rssize field.

(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)
  • RSC-file version: The resource files are ordinary GEM resource files but with version number checking. The first byte in the resource header of the resource file contains the version number. (Source: tos_releases_notes_19930624)
@mikrosk
Copy link
Member

mikrosk commented Oct 17, 2022

So where do you suggest we add this information?

@th-otto
Copy link
Contributor

th-otto commented Nov 7, 2022

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
Copy link
Contributor Author

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
Copy link
Contributor

th-otto commented Nov 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants