You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, RAGE1 uses generic SP1 tiles (8x8), which are defined as 16-bit pointers to allow for unlimited number of tiles. SP1 also allows for 8-bit tile IDs. At program startup, tile IDs corresponding to ASCII characters are defined with the ROM chars, but the others are unused by RAGE1.
A table in your program memory is needed for relating the tile with its address for byte-data, in 16-bit mode. But for 8-bit tiles, there is a 512-byte table reserved in high RAM (a pointer to each tile's 8-byte data). This space is wasted if using 16-bit tile IDs.
If the number of tiles used by a game is sufficiently small, RAGE1 can switch to using only 8-bit tile IDs. This would allow not using the general tile pointer table which RAGE1 currently uses, smaller btile definitions and more room for code. Remember that text characters are also tiles, they need to be taken into account when calculating the number of tiles. If we only use some characters for text (e.g. numbers and capital letters), the remaining tiles can be used for graphics in 8-bit mode.
In 8-bit mode, all structures that contain tile IDs should be adjusted to use the 8-bit format instead of the 16-bit one (for getting savings also from this)
The byte arena for the definition of all 8x8 tiles can still be deduplicated as proposed in #85 for a minimum size representation of the tile data.
The selection of 8-bit or 16-bit tile mode should be done automatically based on the number of tiles used, DATAGEN should take this into account and generate code accordingly.
The text was updated successfully, but these errors were encountered:
Currently, RAGE1 uses generic SP1 tiles (8x8), which are defined as 16-bit pointers to allow for unlimited number of tiles. SP1 also allows for 8-bit tile IDs. At program startup, tile IDs corresponding to ASCII characters are defined with the ROM chars, but the others are unused by RAGE1.
A table in your program memory is needed for relating the tile with its address for byte-data, in 16-bit mode. But for 8-bit tiles, there is a 512-byte table reserved in high RAM (a pointer to each tile's 8-byte data). This space is wasted if using 16-bit tile IDs.
If the number of tiles used by a game is sufficiently small, RAGE1 can switch to using only 8-bit tile IDs. This would allow not using the general tile pointer table which RAGE1 currently uses, smaller btile definitions and more room for code. Remember that text characters are also tiles, they need to be taken into account when calculating the number of tiles. If we only use some characters for text (e.g. numbers and capital letters), the remaining tiles can be used for graphics in 8-bit mode.
In 8-bit mode, all structures that contain tile IDs should be adjusted to use the 8-bit format instead of the 16-bit one (for getting savings also from this)
The byte arena for the definition of all 8x8 tiles can still be deduplicated as proposed in #85 for a minimum size representation of the tile data.
The selection of 8-bit or 16-bit tile mode should be done automatically based on the number of tiles used, DATAGEN should take this into account and generate code accordingly.
The text was updated successfully, but these errors were encountered: