On the Next this mode has two palette options. PALETTE FORMAT 0 replicates a standard ULA machine. In this format BRIGHT is ignored and all colours are displayed at the highest brightness. The PAPER colour is the INK colour with flipped bits, this means only certain INK/PAPER combinations are allowed Red/Cyan , Blue/Yellow, Black/White, Green/Magenta. Using black ink on white paper also means that the paper colour is very bright for text, and BRIGHT 0 does nothing. BORDER is ignored and will be given the same colour as the PAPER.
PALETTE FORMAT 1 turns on enhanced ULA. This allows each palette entry to be adjusted individually and given any of the 512 colours available. I could not find any useful information in the manual on how to set the colours for PAPER or BORDER in LAYER 1,2. After some experimentation I have found how to do this :
Code: Select all
10 LAYER PALETTE 1,0,0
20 LAYER PALETTE 1,135,0
30 LAYER PALETTE 1,188,BIN 101101101
40 LAYER 1,2
50 PALETTE FORMAT 1
60 LAYER PALETTE 1
70 BANK 5 ERASE 0,6912,0
80 BANK 5 ERASE 8192,6912,0
Line 10-30 set up three colours in palette 1. Colour register 0 is used for INK and is set to 0 (BIN 000000000) - Black. After some experimentation I found the registers for BORDER and PAPER which can be set as different colours. Register 135 is the border colour, I have set it to black. Register 188 is the paper colour, I have set this to the same shade as BRIGHT 0: PAPER 7. The colours are set as a 9-bit GRB.
Line 40 sets the screen mode. Line 50 sets the palette format, or rather the number of palette registers used for INK colours. For layer 1,2 set this to 1. Using a different format changes the register used by PAPER, stick to 1 it will work fine as Hi Res only uses one ink colour. Line 60 sets palette 1 to be the used palette.
Line 70-80 perform a CLS. I have found that CLS sometimes creates a 'N Statement lost' error, maybe a bug in NextBASIC? I use the BANK x ERASE function to set both screen buffers to all 0's instead. In hires mode both buffers are used for odd and even character columns. The attribute areas are not used.
After this you have a 512x192 screen which works fine with all the usual PRINT commands!