Compatible with:
DOS Maximite CMM MM150 MM170 MM+ MMX Picromite ArmiteL4 Armite F4 ArmiteH7 CMM2

MAP( n ) = rgb% 
MAP( n ) = rgb% 
MAP( n ) = rgb% 


The MAP commands allow the programmer to set the colours used in 8-bit colour modes. 
Each value in the 8-bit colour pallet can be set to an independent 24-bit colour.

MAP( n ) = rgb% 
This will assign the 24-bit colour 'rgb% to all pixels with the 8-bit colour value of 'n'. The change is activated after the MAP SET command

This will set the colour map to the colours implemented in the original Colour Maximite.

This will cause MMBasic to update the colour map (set using MAP(n)=rgb%) during the next frame blanking interval.

This will reset the colour map to the default colours. This map is used to assign 24-bit colours to individual values in the 8-bit colour space.

 ' Set up an array to hold the colour mappings we are going to use
 DIM INTEGER cmap(6)
 'Clear the screen
 'Set up 6 colours in the array
 ' Do an initial update of the CLUT to set up our colours
 'Display an outer circle in white
 ' Now draw a simple colour pie chart using our new colours with the ARC command
 ARC MM.HRES/2,MM.VRES/2,0,MM.VRES/2-10,0,60,MAP(1)
 ARC MM.HRES/2,MM.VRES/2,0,MM.VRES/2-10,60,120,MAP(2)
 ARC MM.HRES/2,MM.VRES/2,0,MM.VRES/2-10,120,180,MAP(3)
 ARC MM.HRES/2,MM.VRES/2,0,MM.VRES/2-10,180,240,MAP(4)
 ARC MM.HRES/2,MM.VRES/2,0,MM.VRES/2-10,240,300,MAP(5)
 ARC MM.HRES/2,MM.VRES/2,0,MM.VRES/2-10,300,360,MAP(6)
 ' Start a never ending loop
   ' each time round the loop move the colours in our array one place to the left
   ' Use array element 0 to store the first element that is going to be at the end
   ' reset the colour map
   ' pause so we can see the change
   PAUSE 200
 ' This subroutine updates the colour map for the colours we are using
 ' set map positions 1 to 6 to the new colours
 ' then apply the change
SUB mapclut
 MAP set


Last edited: 30 September, 2020