• CPC text mode

    From B. P. TBC@21:1/5 to All on Fri Jul 1 15:04:34 2016
    Hi!
    Has the Amstrad CPC 464 a real text mode, like the C64? Or the CPC has
    only graphics mode?

    P.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthew Phillips@21:1/5 to All on Fri Jul 1 19:09:39 2016
    In message <nl5pp4$iq7$1@dont-email.me>
    on 1 Jul 2016 B. P. TBC wrote:

    Has the Amstrad CPC 464 a real text mode, like the C64? Or the CPC has
    only graphics mode?

    The CPC 464 only has three graphics modes. All modes are 200 pixels high (25 text lines of 8 pixels). MODE 0 is 160 pixels wide, MODE 1 is 320 pixels
    wide and MODE 2 is 640 pixels, with 4, 2 and 1 bits per pixel respectively,
    so all 16K.

    --
    Matthew Phillips
    Durham

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From CP/M User@21:1/5 to Matthew Phillips on Tue Jan 10 22:30:28 2017
    On Saturday, 2 July 2016 04:09:47 UTC+10, Matthew Phillips wrote:
    In message on 1 Jul 2016 B. P. TBC wrote:

    Has the Amstrad CPC 464 a real text mode, like the C64? Or the CPC has only graphics mode?

    The CPC 464 only has three graphics modes. All modes are 200 pixels high (25 text lines of 8 pixels). MODE 0 is 160 pixels wide, MODE 1 is 320 pixels wide and MODE 2 is 640 pixels, with 4, 2 and 1 bits per pixel respectively, so all 16K.

    --
    Matthew Phillips
    Durham

    Hello,

    The Amstrad has an 4 Graphics Mode if you include the more obscure 4 coloured Mode 0, it works differently from MODE 0 in that a hidden screen can be drawn and displayed based on the INKs. From what I can tell it has't been widely used and as MODE 0
    offers up to 16 colours, it's more effective to use that MODE when writing games.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthew Phillips@21:1/5 to All on Wed Jan 11 08:00:58 2017
    In message <98b46670-36cd-4ae0-bcf2-c2f030295391@googlegroups.com>
    on 11 Jan 2017 CP/M User wrote:

    On Saturday, 2 July 2016 04:09:47 UTC+10, Matthew Phillips wrote:
    In message on 1 Jul 2016 B. P. TBC wrote:

    Has the Amstrad CPC 464 a real text mode, like the C64? Or the CPC has only graphics mode?

    The CPC 464 only has three graphics modes. All modes are 200 pixels high (25 text lines of 8 pixels). MODE 0 is 160 pixels wide, MODE 1 is 320 pixels wide and MODE 2 is 640 pixels, with 4, 2 and 1 bits per pixel respectively, so all 16K.

    The Amstrad has an 4 Graphics Mode if you include the more obscure 4
    coloured Mode 0, it works differently from MODE 0 in that a hidden screen
    can be drawn and displayed based on the INKs. From what I can tell it has't been widely used and as MODE 0 offers up to 16 colours, it's more effective to use that MODE when writing games.

    It's not known to the MODE command, is it? Nor is it mentioned in the documentation of SCR SET MODE.

    It's possible to do various tricks with the Amstrad hardware, like split mode screens, and extra tall screens, but careful use of interrupts and switching the screen memory location, so it may well be possible to produce a 160 pixel wide screen with only four colours. But I've never seen anything written
    about it in any of the Amstrad computer magazines in my collection.

    --
    Matthew Phillips
    Durham

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From CP/M User@21:1/5 to Matthew Phillips on Fri Jan 13 13:48:16 2017
    On Wednesday, 11 January 2017 19:01:13 UTC+11, Matthew Phillips wrote:
    In message on 11 Jan 2017 CP/M User wrote:

    On Saturday, 2 July 2016 04:09:47 UTC+10, Matthew Phillips wrote:
    In message on 1 Jul 2016 B. P. TBC wrote:

    Has the Amstrad CPC 464 a real text mode, like the C64? Or the CPC has only graphics mode?

    The CPC 464 only has three graphics modes. All modes are 200 pixels high (25 text lines of 8 pixels). MODE 0 is 160 pixels wide, MODE 1 is 320 pixels wide and MODE 2 is 640 pixels, with 4, 2 and 1 bits per pixel respectively, so all 16K.

    The Amstrad has an 4 Graphics Mode if you include the more obscure 4 coloured Mode 0, it works differently from MODE 0 in that a hidden screen can be drawn and displayed based on the INKs. From what I can tell it has't been widely used and as MODE 0 offers up to 16 colours, it's more effective to use that MODE when writing games.

    It's not known to the MODE command, is it? Nor is it mentioned in the documentation of SCR SET MODE.

    It is a mode in it's own right, though I'm unsure if the firmware recognises it, There was an article about it along with a BASIC RSX driver program. I posted some examples on the CPC-Wiki a while ago:

    http://www.cpcwiki.eu/forum/programming/double-buffering-and-frame-flyback/msg91485/#msg91485

    using that program along with an example of my own, but found it wasn't really viable for using in games and for any games programmers who made any wire-framed graphical games (e.g. Tank busters), it would of been easier to just use MODE 0 and Flip to
    the visible INKs for drawing the graphics once they have been drawn.

    It's possible to do various tricks with the Amstrad hardware, like split mode screens, and extra tall screens, but careful use of interrupts and switching the screen memory location, so it may well be possible to produce a 160 pixel wide screen with only four colours. But I've never seen anything written about it in any of the Amstrad computer magazines in my collection.

    Perhaps analyse the RSX program from "The Fourth Mode" article to see, what I found of that program was it was a bit on the slow side while switching from the hidden screen, that to me suggests Firmware is involved, but wouldn't be as straightforward as
    a "SCR SET MODE (&BC0E)" as the 2 screens are within the 16kb block.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Matthew Phillips@21:1/5 to All on Sat Jan 14 16:10:14 2017
    In message <363b84c8-4b27-43e0-8519-3a2894d33570@googlegroups.com>
    on 13 Jan 2017 CP/M User wrote:

    On Wednesday, 11 January 2017 19:01:13 UTC+11, Matthew Phillips wrote:
    In message on 11 Jan 2017 CP/M User wrote:

    On Saturday, 2 July 2016 04:09:47 UTC+10, Matthew Phillips wrote:
    In message on 1 Jul 2016 B. P. TBC wrote:

    Has the Amstrad CPC 464 a real text mode, like the C64? Or the CPC has only graphics mode?

    The CPC 464 only has three graphics modes. All modes are 200 pixels high (25 text lines of 8 pixels). MODE 0 is 160 pixels wide, MODE 1
    is 320 pixels wide and MODE 2 is 640 pixels, with 4, 2 and 1 bits per pixel respectively, so all 16K.

    The Amstrad has an 4 Graphics Mode if you include the more obscure 4 coloured Mode 0, it works differently from MODE 0 in that a hidden
    screen can be drawn and displayed based on the INKs. From what I can
    tell it has't been widely used and as MODE 0 offers up to 16 colours, it's more effective to use that MODE when writing games.

    It's not known to the MODE command, is it? Nor is it mentioned in the documentation of SCR SET MODE.

    It is a mode in its own right, though I'm unsure if the firmware recognises it, There was an article about it along with a BASIC RSX driver program. I posted some examples on the CPC-Wiki a while ago:

    http://www.cpcwiki.eu/forum/programming/double-buffering-and-frame-flyback/msg91485/#msg91485

    using that program along with an example of my own, but found it wasn't really viable for using in games and for any games programmers who made any wire-framed graphical games (e.g. Tank busters), it would of been easier to just use MODE 0 and Flip to the visible INKs for drawing the graphics once they have been drawn.

    Thanks for the reference. I fished the magazine off my shelf and had a go at hand-disassembly of the RSX commands.

    The |MODE command that puts the computer into the "MODE 3" of the article
    does this:

    XOR A
    CALL &BC0E
    DI
    EXX
    LD A,C
    OR 3
    LD C,A
    EXX
    EI
    LD A,99
    LD (&A9),A
    RET

    I suspect the final two commands before the RET are not crucial and are being used to keep a record of which "screen" is in use.

    So the 4-colour 20 x 25 mode is not known to the firmware. The EXX command, which has to be done while interrupts are disabled, accesses the Z80
    alternate register set. Most of my books have no information about what the alternate registers are used for, but the full Amsoft firmware guide covers this in Appendix XI. The register C' holds the current mode in bits 0 and 1, and the lower and upper ROM states in bits 2 and 3.

    So it is "MODE 3" after a fashion. The firmware is unaware of this mode,
    whose existence is probably just a side-effect of the silicon implementation
    of the gate array.

    In this mode, only half of the bits of each byte of screen memory are used by the video chip, but the firmware still thinks you are in mode 0 and,
    depending on pen colour, will manipulate all the bits in each byte. Thus setting up fresh content in the hidden half of each byte is not exactly trivial. The RSX provided in the article to switch between the visible and
    the hidden content disassembles as follows:

    LD A,(&A9)
    CP 100
    RET Z
    INC A
    LD (&A9),A
    LD BC,&4000
    LD HL,&C000
    .loop
    LD A,(HL)
    RLCA
    RLCA
    LD (HL),A
    INC HL
    DEC BC
    LD A,B
    OR C
    JR NZ,loop
    RET

    So it's not surprising you found it slow. The article claims that "games like Design Design's Tankbusters use this mode" but I doubt anyone would have bothered to go to this effort for so little gain.

    There is also a mistake in line 120 of the listing, which should read GOTO
    100 at the end instead of GOTO 110. The listing works as written, but the mistake means that some typing errors in the hexadecimal would not have been picked up.

    --
    Matthew Phillips
    Durham

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From CP/M User@21:1/5 to All on Sat Jan 14 18:01:28 2017
    It's interesting, but I had to wonder how someone came across this. As for Tankbusters, I think it's just standard MODE 0 and their using the INK palette to rotate the shapes and volcano, which just leaves the Colours for the Status bar and the Enemy
    Tank to worry about.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)