CPCWiki forum

General Category => NC100, NC200, PCW, PDA600 - the rest of the Family! => Topic started by: JohnElliott on 20:40, 28 March 23

Title: PCW CP/M and colours
Post by: JohnElliott on 20:40, 28 March 23
Although the PCW is a monochrome machine, it nevertheless internally maintains settings for foreground and background colour. That's why the ESC b and ESC c escape codes are still there and still take 6-bit colour values.

What I hadn't realised until today was that there's a little difference of opinion between the two modules in the EMS file responsible for screen handling. SCR, the low-level module responsible for actually drawing characters on the screen, has default colour settings of Border=1, Background=1, Foreground=60 -- that is, bright yellow on dark blue, like the CPC at startup.
 cpm_yellow.png
At a slightly higher level is TE, the Terminal Emulator, responsible for interpreting escape codes, setting the cursor position and so on. It initialises after SCR, and decides to set the colours to Background=1, Foreground=63 -- bright white on dark blue.
cpm_white.png

So far, I haven't found anything similar in LocoScript. LocoLink 2.02 incorporates SCR but not TE, so it sticks with the yellow on blue colour scheme.
Title: Re: PCW CP/M and colours
Post by: erikarn on 21:08, 28 March 23
ha that's neat! If only we had colour plane support in the PCW ASIC. :0 Or an expansion card that hijacked the video so we could implement an 80x32 text expansion with greyscale. :)


-a
Title: Re: PCW CP/M and colours
Post by: RockRiver on 21:21, 25 September 24
Spanish Amstradians scene tried to ask Roland Perry about ANT ,  Ant Number Two (hybrid PCW-CPC project).
Maybe there are two prototype boards...

Interesting that 64 colour PCW , compatible with CPC

Interesting too Habisoft's "ColorIn" fpga board project, that makes possible PCW with 4 colours in old software and maybe more in new programs.

PCWcolor FPGA cores exist with AY sound option : Mister ; Neptuno ; Poseidon ; Neptuno+ ... machines
Title: Re: PCW CP/M and colours
Post by: RockRiver on 23:17, 06 April 25
What about a CP/M 256 for "PCWplus" future add-on board ?

https://worldofspectrum.net/item/0027218/

Or a PALETTE.COM for PCWcolor/PCWplus ?

Nowadays PCWcolor suported by Zesarux and CP/Mbox emulators and Fpga Cores
Title: Re: PCW CP/M and colours
Post by: JohnElliott on 01:15, 11 April 25
CP/M 256 for the +3 was easier than the PCW in one respect; there's only one release of +3 CP/M so it knows exactly which functions to hook and what address they're at. In other respects colour support would be easier on the PCW because it would just change palette registers, not have to make any updates to video RAM.

If I were trying to patch colour support into PCW CP/M, I'd start by finding the address of the TE_SET_BORDER handler, which goes:
_TE_SET_BORDER:
     jp scr_set_border
Then follow that jump to get to scr_set_border:
scr_set_border:
     xor a

scr_set_ink1:
and patch at scr_set_ink1. This should be reached with A=palette register (0 for border, 1-16 for inks), B=colour (00ggrrbb), C=blink colour (00ggrrbb). 

Once that was done, PALETTE.COM (or selecting colours with ESC b / ESC c) would work without further changes. btw, did you know that PALETTE takes up to 16 parameters, corresponding to the 16 possible colours in CPC mode 0?
Powered by SMFPacks Menu Editor Mod