Author Topic: Palette opcodes.  (Read 1997 times)

Akari

  • *
  • Posts: 766
    • View Profile
Palette opcodes.
« on: 2006-11-21 19:23:49 »
Qhimm already wrote some info about palette opcodes, but this is not enough.

Quote
MPPAL, STPAL, LDPAL, CPPAL, RTPAL, ADPAL, MPPAL2, STPLS, LDPLS, CPPAL2, RTPAL2 and ADPAL2 involve the manipulation of field palettes. Palettes are manipulated in the script, then uploaded to and downloaded from VRAM as needed (palettes are only "active" when in VRAM, of course). MultiPlyPALette, CoPyPALette, STorePALette, LoaDPALette, RoTatePALette, ADdPALette etc., with the "duplicate" commands working on either the entire palette or a subset of it. Arguments to the various commands are a bit inconsistent, but the last argument typically denotes the size of the palette (0x0F or 0xFF, signifying 16- or 256-sized palettes). The MPPAL opcodes use fixed-point values for the R, G and B coefficients.

It will be great if someone can share knowledge with me about this opcodes, so I can implement paletted animation to background. (I already finished with sprite animation so this is the only one left).