home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / programming / c / awin / c2pham6.asm < prev    next >
Encoding:
Assembly Source File  |  1999-05-17  |  760 b   |  34 lines

  1. ; FILE: GG:src/own/awin/c2pham6.ASM          REV: 0 --- rgb565 -> grbb4444 ham6 c2p
  2. ; LINK: >LEAVEOBJ>
  3. ; History
  4. ;  0      Started 18th Dec 1998.
  5. ;
  6.  
  7. ; rgb565 -> ham6 grbb4444 [2x1] routine
  8. ;
  9. ;theory:
  10. ;
  11. ;     scrpix1       scrpix2
  12. ;  [          ]  [          ]
  13. ;
  14. ;    g      r      b      b
  15. ;
  16. ;   [ ]    [ ]    [ ]    [ ]
  17. ;
  18. ; 00gggg 10rrrr 01bbbb 01bbbb
  19. ;
  20. ; 543210 543210 543210 543210
  21. ;
  22. ; So we need ham6 screen with double width and downscale chunky width
  23. ; with ratio 1:2. Also we fill plane4 with %00110011=$33 and plane5 with
  24. ; %01000100=$44. Then set palette (16 colours) to represent 16 green
  25. ; shades. During conversion we convert rgb565 to grbb4444 and then
  26. ; c2p that to four planes.
  27. ;
  28. ;implementation:
  29. ;
  30. ; awin.c/awinitc2pham6
  31. ; awin.c/awdoc2pham6
  32.  
  33.  
  34.