CI4 and CI8 Textures are possible in Fast3D 1.0 (64x64 Textures)
Users browsing this thread: 1 Guest(s)

Yes, you heard me. 64x64 is a thing and it works in SM64. It just takes lower colour format, in this case CI4. IA4/I4 can give you even 128x64 but without colour (must be used with a combiner). However, IA/I is old news, CI is not. CI was never ever used in the original game, but it actually is apart of the F3D microcode. Below I have an example script I made, making use of 0xF0 (Load palette)
E7 00 00 00 00 00 00 00 - Pipe-Sync
FC FF FF FF FF FC F2 79 - Setcombine
B6 00 00 00 00 02 00 00 - GeoMode
BB 00 00 01 FF FF FF FF - G_Texture Scaling Factor set to max
FD 10 00 00 03 02 96 28 - Set RGBA16 addr to load
F5 00 01 00 01 00 00 00 - Hey! We're using Tile descriptor 1 for palettes!
F0 00 00 00 01 03 C0 00 - Load palette with colour count of 16
BA 00 0E 02 00 00 80 00 - SetOtherMode_H (Shift TMEM)
FD 50 00 00 03 02 96 48 - set CI4 addr to load
F5 50 00 00 07 01 80 60 - SetTile for CI4, 64x64 no mirroring, wrap
E6 00 00 00 00 00 00 00 - RDP Load-Sync
F3 00 00 00 07 3F F2 00 - Load CI data into TMEM
F5 40 08 00 00 01 80 60 - RENDERTILE, 4bpp (CI4) at 64x64
F2 00 00 00 00 0F C0 FC - Set tile size  (Bottom-right coords at 0FC, 0FC)
04 30 00 40 03 02 95 E8 - Load Vertex Array into buffer
BF 00 00 00 00 00 0A 14 - Draw triangle 1
BF 00 00 00 00 00 14 1E - Draw triangle 2
BB 00 00 00 FF FF FF FF - Disable texture
FC FF FF FF FF FE 79 3C - SetCombine reverted
B7 00 00 00 00 02 00 00 - ClearGeoMode
BA 00 0E 02 00 00 00 00 - Shift TMEM back (MAKE SURE TO DO THIS, for the sake of all other textures)
B8 00 00 00 00 00 00 00 - CLOSE DISPLAYLIST

Here we have some new 64x64 CI4 1-up Mushrooms Smile Now we wait for levels to start using 64x64..
[Image: unknown.png?width=1126&height=683]

Useful notes about TMEM were found here:
http://fgfc.ddns.net/PerfectGold/Textures.htm

Update: Shygoo tested it on console and it works! Nintendo simply never utilised it in SM64 despite being able to.
(This post was last modified: 09-11-2017, 02:48 AM by Trenavix.)

Nice! I was hoping someone would find out how to get this format to work. I tried getting CI textures to work eairler this year, but I could never get the palette colors to show up. I didn't know that a SetOtherMode_H command was needed to get it to work, so thanks a lot for that!

The 64x64 resolution is a nice upgrade, but the caveat here is that you only have 16 colors to work with. Although having only 16 colors can also be a benefit as well. The property I like the most about CI textures is that you can easily change the colors of the palette and/or change what palette the texture is using through custom asm code.

I made a little proof of concept on how to dynamically switch the palettes in a CI4 texture; assuming that the segmented address of the 0xF5 render tile is static. The demo will only show a rotating blue [!] block with a glow effect. You will need a extended 64mb rom that is properly aligned (use queueRAM's extender, not VL-Tone's original extender).

​You can view the code here

[Image: ActualSecondaryFlee-size_restricted.gif]
(It looks surprisingly good, considering that it only uses 11 colors.)

A cool idea that you can probably do with this is implement a real-time day/night cycle for a level. Kaze made a proof of concept video about it back in 2014, but his method of changing every pixel in a rgba16 256x256 skybox would be impractical to pull off. If the background was in a CI format instead of a RGBA format, then it would be no problem changing (at the most) 256 colors for a CI8 skybox background.
(This post was last modified: 13-11-2017, 05:18 PM by David.)

CI4 and CI8 Textures are possible in Fast3D 1.0 (64x64 Textures)
Users browsing this thread: 1 Guest(s)