News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_JohnElliott

PCW CP/M and colours

Started by JohnElliott, 20:40, 28 March 23

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JohnElliott

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.
 You cannot view this attachment.
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.
You cannot view this attachment.

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.

erikarn

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

RockRiver

#2
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

RockRiver

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

JohnElliott

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