Benedikt wrote on Today, 15:21:
At first glance, the Olivetti PC1's 160x200 16-color mode looks very similar to the low-resolution Tandy / PCJr. mode, except for the frame buffer address, which is b0000h (PC1) vs. b8000h.
(The frame buffer format is also the same for composite CGA, i.e. composite CGA might be a good starting point if low-res. Tandy code is not already available.)
If your are right, here is what you need to know to enable the hodden mode, and change colors in the palette - or just keep the default CGA colors.
## ⭐ THE ONLY REQUIRED STEP:
mov al, 0x4A ; Magic value to unlock 16-color mode
out 0x3D8, al ; Write to Mode Control Register
The V6355D has an integrated **3-bit DAC per channel**, providing a **512-color palette** (8 × 8 × 8 = 512 possible colors).
### DAC Specifications:
- **3 bits per channel** (Red, Green, Blue)
- **8 intensity levels** per channel (0-7)
- **512 total colors** available (8³)
- **16 simultaneous colors** on screen (selected from the 512)
- **32 bytes** of palette data (16 colors × 2 bytes each)
### Palette Data Format (2 bytes per color):
```
Byte 1: [-----RRR] Red intensity (bits 0-2, values 0-7)
Byte 2: [0GGG0BBB] Green (bits 4-6) + Blue (bits 0-2)
```
### Palette Write Sequence:
```asm
cli ; Disable interrupts during palette write
mov al, 0x40
out 0x3DD, al ; Enable palette write mode (starts at color 0)
jmp short $+2 ; I/O delay required!
; Write 32 bytes (16 colors × 2 bytes each)
mov cx, 32
mov si, palette_data
.loop:
lodsb
out 0x3DE, al
jmp short $+2 ; I/O delay required between writes!
loop .loop
mov al, 0x80
out 0x3DD, al ; Disable palette write mode
sti
```
💡 **Speed tip:** For raster effects with 600+ OUTs per frame, use short port addresses (0xDD, 0xDE instead of 0x3DD, 0x3DE) to save ~4 cycles per OUT. See **Section 3a** for details.