(classic) Amstrad PCW

Amstrad CPC and NC systems
Post Reply
stefano
Well known member
Posts: 1663
Joined: Mon Jul 16, 2007 7:39 pm

(classic) Amstrad PCW

Post by stefano »

The work on this target was similar to the one for the Bondwell2, with extra complexity regarding the disk formats and emulator workarounds.
At the moment the basic support for graphics is available.

A possible evolution of the native console could permit the character font alteration by entering in the same graphics page already used for drawing and scrolling by leveraging on HW rolling.


pcw_dstar.png
pcw_globe.png
You do not have the required permissions to view the files attached to this post.
stefano
Well known member
Posts: 1663
Joined: Mon Jul 16, 2007 7:39 pm

Re: (classic) Amstrad PCW

Post by stefano »

pcw_stencil.png
Reasonably fast stencil and sprites are now in place :)
I'm leaving the console part aside.
In case "someone" wishes to evolve this target furtherly.. the display memory page holds the original font, which can be altered, but I'm not sure if it is of some interest to us.
You do not have the required permissions to view the files attached to this post.
RobertK
Well known member
Posts: 221
Joined: Mon Feb 26, 2018 12:58 pm

Re: (classic) Amstrad PCW

Post by RobertK »

Thanks for this new target, the graphics functions are working fine. But is the native console supposed to be fully working already?
E.g. should we be able to clear the screen using printf("\032")?

Attached is a stripped-down Native Console Test based on ansivt52.c, which works on the Bondwell 2 and Osborne 1, but not on the PCW.

BTW, what is the difference between the pcw40 and pcw80 subtypes? Is it only the disk image output format?
You do not have the required permissions to view the files attached to this post.
User avatar
dom
Well known member
Posts: 1370
Joined: Sun Jul 15, 2007 10:01 pm

Re: (classic) Amstrad PCW

Post by dom »

It looks like the PCW is an almost VT52 terminal - but that cls command is an ADM3a code.

If you search for the PCW user manual, there's a terminal characteristics with the supported codes.
RobertK
Well known member
Posts: 221
Joined: Mon Feb 26, 2018 12:58 pm

Re: (classic) Amstrad PCW

Post by RobertK »

Now I understand, there is no standardized terminal handling among CP/M machines, despite ADM3a being quite common.

Here is the working PCW native console test:

Code: Select all

/*
 *	Test the Native Console of the Amstrad PCW
 *
 *	23/3/2021 RobertK (based on ansivt52.c by Stefano)
 *
	Manual Index:
	https://www.manualslib.com/manual/1002846/Amstrad-Pcw8256.html?page=170#manual

	Character Set:
	https://www.manualslib.com/manual/1002846/Amstrad-Pcw8256.html?page=283#manual

	Terminal codes:
	https://www.manualslib.com/manual/1002846/Amstrad-Pcw8256.html?page=308#manual
 */

#include <stdio.h>

void main()
{
    int x;

    printf("Before CLS\n");
    printf("\x1b\x45");	 // ESC E -> Clear screen
    printf("\x1b\x48");  // ESC H -> Home
    printf("If this is the first thing you can read, CLS is OK.\n");

    /* Draw an X */
    for (x = 0; x < 11; x++) {
		// ESC Y r c -> gotoxy
		printf("\x1b\x59%c%c*",32 + 10 + x, 32 + 20 + x);
		printf("\x1b\x59%c%c*",32 + 20 - x, 32 + 20 + x);
    }
}
You do not have the required permissions to view the files attached to this post.
User avatar
dom
Well known member
Posts: 1370
Joined: Sun Jul 15, 2007 10:01 pm

Re: (classic) Amstrad PCW

Post by dom »

For the ADM3a machines there’s a generic console bridge which handles positioning which works reasonable well on those machines without a custom implementation.

For vt52 machines, like the pcw, you should be able to use conio directly - though I might need to change the clrscr macro to output the full escape sequence rather than our shortcut code.

I’m really trying to avoid implementing a full curses library if I can!
User avatar
dom
Well known member
Posts: 1370
Joined: Sun Jul 15, 2007 10:01 pm

Re: (classic) Amstrad PCW

Post by dom »

dom wrote: Tue Mar 23, 2021 8:22 amFor vt52 machines, like the pcw, you should be able to use conio directly - though I might need to change the clrscr macro to output the full escape sequence rather than our shortcut code.
Apologies, that's total utter garbage. I think I should have said, we'll need to tweak conio to handle VT52 machines.
stefano
Well known member
Posts: 1663
Joined: Mon Jul 16, 2007 7:39 pm

Re: (classic) Amstrad PCW

Post by stefano »

A customized VT support here must be at a fixed font size and for the expected text resolution. Otherwise the hw support for scrolling text will drive us crazy.
Besides this, as said there's space for a bit of customization, I'll have a crack at it and probably will ask for Dom's help later :D
stefano
Well known member
Posts: 1663
Joined: Mon Jul 16, 2007 7:39 pm

Re: (classic) Amstrad PCW

Post by stefano »

Sorry, I'm giving up already :)
The roller ram is really annoying, I completed the graphics port with the inclusion of bksave/bkrestore but I'm not adding extras.
User avatar
dom
Well known member
Posts: 1370
Joined: Sun Jul 15, 2007 10:01 pm

Re: (classic) Amstrad PCW

Post by dom »

The vector06 has a similar scroll register - I can take a look later on, but I want to fix the Sam bugs, sort out multi8 colours and do the screenshots before Timmy kills me :)
stefano
Well known member
Posts: 1663
Joined: Mon Jul 16, 2007 7:39 pm

Re: (classic) Amstrad PCW

Post by stefano »

yup, this would be a totally new library part, nothing to be 'fixed', just a bit of fun. Probably it is not necessary to provide the full console engine..
Post Reply