=============================================================================== Bits 0-1: Index for target or decrementor/incrementor (uses C0/A76C data structure): 0 index => 4 value, 1 => 8 , 2 => 16 , 3 => 31 (So value = 4 * (2 ^ index), capped at 31) Bit 2: Source of target or decrementor/incrementor of Blue component 1 = Load using index from Bits 0-1 0 = 0 value Bit 3: Source of target or decrementor/incrementor of Green component 1 = Load using index from Bits 0-1 0 = 0 value Bit 4: Source of target or decrementor/incrementor of Red component 1 = Load using index from Bits 0-1 0 = 0 value Bit 7 = 1: Invert target or decrementor/incrementor (or the 0 default) with Variable $02 before using Bits 5-7 : Tint Subcommand 1 = Increment component by 1 towards specified target. (Skip if already >=) 2 = Add 31 to component, cap at 31. aka set to 31. wtf? (Much of function reads like mirror of Command 5, but setup is rigid.) 3 = Decrement component by 1 towards original palette's component value. (Skip if equal, but proceed if less.) 4 = Decrement component by 1 towards specified target. (Skip if already <=) 5 = Subtract (decrementor + 4) from component. Floor at 0. 6 = Increment component by 1 towards original palette's component value. (Skip if equal, but proceed if more.) 7 (or 0?) = Restore original palette's values. --------------------- Observations and Questions: - Subcommand 2 (Function C0/1289) is really hobbled. Or they wasted lots of time and space for a simple result. - The inversion flag and the subcommand are joined at the hip. Subcommands 4 and 5 have no choice but to invert, making them difficult to use. If you want 0 or 31 as a parameter, it's easy enough to work around, but not so much for other values. Subcommands 1-3 are mirrors (or close) of 4-6, so rewriting them more flexibly might let you do away with the higher ones. - Both of the above make me wonder how many of the subcommands are actually used by the game. - What's in Variable $02, anyway? I'd guess FFh or 1Fh, but have no clue. Much of the above (both deciphering and issues) probably also applies to Commands 52h and 53h (which tint an object). They too call C0/A70B to process the parameter byte, and while they have separate dedicated subcommand functions from 50h and 51h, they're similarly written.