News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
L

What's "wrong" with CRTC 2?

Started by LambdaMikel, 17:48, 07 March 18

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

What CRTC Type does your CPC have?

CPC 464 Type 0
4 (12.1%)
CPC 464 Type 1
0 (0%)
CPC 464 Type 2
1 (3%)
CPC 464 Type 3
0 (0%)
CPC 464 Type 4
0 (0%)
CPC 664 Type 0
0 (0%)
CPC 664 Type 1
0 (0%)
CPC 664 Type 2
2 (6.1%)
CPC 664 Type 3
0 (0%)
CPC 664 Type 4
0 (0%)
CPC 6128 Type 0
12 (36.4%)
CPC 6128 Type 1
10 (30.3%)
CPC 6128 Type 2
0 (0%)
CPC 6128 Type 3
3 (9.1%)
CPC 6128 Type 4
1 (3%)

Total Members Voted: 33

LambdaMikel

Got a "brand new" NOS CPC 464, and to my surprise, it has CRTC 2 - never seen one before. Rare?
Well, tried Batman demo, and it doesn't like the CRTC 2.


So - what's so bad about it for demos?

Duke

http://web.archive.org/web/20170501112330/http://www.grimware.org/doku.php/documentations/devices/crtc

"The CRTC Type 2, beside being the original one, is the "worse" type (according to the low democoders standards :) because most of the simple tricks used to do splitscreens or other demo-effects does not work with it."

GUNHED

Wasn't type 0 the original one? Don't know for 464, but for 6128 type 0 was the first one they used (at least in Gemany).



http://futureos.de --> Get the revolutionary FutureOS (Update: 2023.11.30)
http://futureos.cpc-live.com/files/LambdaSpeak_RSX_by_TFM.zip --> Get the RSX-ROM for LambdaSpeak :-) (Updated: 2021.12.26)

roudoudou





CRTC numbers refers to discovering order but most of 464 & 664 are CRTC-2



My pronouns are RASM and ACE

Audronic

Hi All
Is there a Program that is able to identify the CRTC Versions.
Thanks


Ray
Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

roudoudou

Quote from: Audronic on 00:04, 08 March 18
Hi All
Is there a Program that is able to identify the CRTC Versions.
Thanks


Ray


There is an old program on quasar.cpcscene.net (and informations about differences) in French
http://quasar.cpcscene.net/doku.php?id=coding:test_crtc


And an article (FR) to identify them without programming
http://cpc.sylvestre.org/technique/technique_identifier_crtc.html
My pronouns are RASM and ACE

Bryce

Quote from: Audronic on 00:04, 08 March 18
Hi All
Is there a Program that is able to identify the CRTC Versions.
Thanks

Ray

I think there are tricks to find which version CRTC is installed. You write to a CRTC register and read back the value. On certain CRTC versions the register is read-only so the data read back isn't what was written. I think some demos did this check.

Bryce.

arnoldemu

From my testing type 2 is not that bad and it's quite capable of running a lot of effects if people worked with it. I am sure there is a way to write effects that will work on all without needing to detect the crtc type, just get the programming of the registers in the right place and it'll work on all.

Type 1 is the easiest and lets you do the most without trying to hard.
Type 0,3 and 4 needs a little extra effort.
Type 2 needs a bit more.

for type 2:

It can't "turn on border" with R8 or R6, so those effects are out.
It can't handle R4=0, R9=0 so those effects are out and so is horizontal rupture.
It's interlace is different to the others. (but then interlace on type 1 is not identical to type 0).

With R4=0, R9=0, you either force it into a display where you get 127 char lines made of a single scanline OR it doesn't display anything.




My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Longshot

Here is a program that displays the CRTC type.
I think it is reliable.
There are several methods to differentiate CRTCs.

CRTC 0 is 0 because it was the one in my CPC.

CRTC 1 is the first one I managed to differentiate
Thanks to a test I found in Crafton & Xunk (Get Dexter) (but who paradoxically was made to test type 2 but also eliminated type 1)
[ in the game the display of the screen uses an hardware scroll with the CRTC Reg2>49 (when Reg3=14/Reg0=63) : crashes with the CRTC 2 ]
[ Also with a CRTC 1 or 2, the display does not use hardware horiz scroll, even if CRTC 1 was able to ]
[ I had not understood why the display did not use a hardware scroll. On the cpc of a friend, i had removed the crtc test in the game and the hardware scroll was running...]

CRTC 2 was the CRTC in the CPC of DIGIT (Logon System) and then i understood the reason for the presence of the test in "Get Dexter"
When I discovered CPC PLUS in June 1990, I logically numbered it 3.
By testing The Demo on several CPCs at Amstrad 100%, my test was wrong.
By opening the CPC, RUBI has discovered an asic emulating the CRTC, and we logically called it 4.

CRTC 2 is having problems with many demos that set R4 = R9 = 0 to make 1-line screens.
If R4 = R9 = 0, then the CRTC no longer generates a Vsync signal and the image is no longer synchronized with the monitor.

;
;
;        LOGON SYSTEM 1991
;
;        WARNING !!! CE TEST ENCLENCHE LA ROM BASSE !!!
;        DONC EN SORTANT,IL FAUT LA DECLENCHER ET IL
;        FAUT ABSOLUMENT QUE CE TEST CE TROUVE EN MEMOIRE
;        HAUTE > #8000 !!!! IMPERATIVEMENT (CPC+)
;        Poser EI RET en #0038 !!!
;
;        TEST CRTC V1.1 (13.04.1991) by LONGSHOT.
;        valeur en #BF00
;
;        0 > HD6845SP
;        1 > MOTOROLA 6845
;        2 > MOTOROLA 6845 S (REG2 49Max)
;        3 > ASIC (PLUS)
;        4 > GATE ARRAY (ERSATZ PLUS)
;
    ORG    #A000
SCREEN    EQU    #C000+12
;    ENT    $
;
    DI   
    LD    BC,#7F10
    OUT    (C),C
    LD    A,84
    OUT    (C),A
    LD    C,0
    OUT    (C),C
    OUT    (C),A
    LD    A,75
    INC    C
    OUT    (C),C
    OUT    (C),A
    LD    HL,(#0038)
    LD    HL,#C9FB
    LD    (#0038),HL
;
    CALL    TESTCRT
    LD    (#BF00),A    ; SAUVE RESULTAT
;
    LD    BC,#7F8E    ; DECONNECTE ROMS
    OUT    (C),C
    LD    BC,#BC0C
    OUT    (C),C
    LD    BC,#BD30
    OUT    (C),C
    LD    BC,#BC0D
    OUT    (C),C
    LD    BC,#BD00
    OUT    (C),C
    JP    CONTROL
;
TESTCRT
    DI   
    LD    E,17
    LD    HL,TABASIC
    LD    BC,#BC00
SASIC
    LD    A,(HL)
    OUT    (C),A
    INC    HL
    DEC    E
    JR    NZ,SASIC
    LD    BC,#7FC0
    OUT    (C),C
    LD    HL,#4000
    LD    DE,#B8A0
    LD    A,123
    LD    (HL),A
    OUT    (C),D
    XOR    A
    LD    (HL),A
    OUT    (C),E
    LD    A,(HL)
    OR    A
    LD    A,3    ; RETURN ASIC CRTC type 3
    RET    NZ
;
    LD    B,#F5    ; Wait Sync
VS
    IN    A,(C)
    RRA   
    JR    NC,VS
VS1
    IN    A,(C)    ; Pre-Synchronisation 23.02.92
    RRA   
    JR    C,VS1
VS2
    IN    A,(C)
    RRA   
    JR    NC,VS2
    EI        ; Wait 1/300eme sec
    HALT   
    LD    HL,75    ; + 527 usec
WAIT
    DEC    HL                    ; 2
    LD    A,H                    ; 1
    OR    L                        ; 1
    JR    NZ,WAIT            ; 3/2
    IN    A,(C)    ; Sync Valide ?
    RRA   
    JR    C,TYPES12    ; Non
;
;        Type 0 ou 4 ?
;
    LD    BC,#BC00+12
    OUT    (C),C
    LD    DE,#2829
    INC    B
    OUT    (C),E
    INC    B
    IN    A,(C)
    CP    E
    PUSH    AF
    DEC    B
    OUT    (C),D
    POP    AF
    JR    NZ,TYPE0
    LD    A,4    ; CRTC type 4
    RET   
TYPE0
    XOR    A    ; CRTC type 0
    RET   
   
TYPES12
    HALT   
    HALT   
    HALT   
    DI   
VS3
    IN    A,(C)
    RRA   
    JR    NC,VS3
    LD    BC,#BC00+2    ; Overflow Reg 2
    OUT    (C),C
    LD    BC,#BD00+50
    OUT    (C),C
    EI   
    HALT        ; Wait Next Sync 6x1/300eme
    HALT   
    HALT   
    HALT   
    HALT   
    HALT   
    HALT   
    LD    B,#F5
    IN    A,(C)    ; Sync Ok ?
    RRA   
    LD    BC,#BD00+46
    OUT    (C),C
    JR    NC,TYPE2
    LD    A,1    ; CRTC type 1
    RET   
TYPE2
    LD    A,2    ; CRTC type 2
    RET   
;
CONTROL
    DI   
    LD    HL,#C000
    LD    DE,#C001
    LD    BC,(#3FFF)
    LD    (HL),L
    LDIR   
;
;
    LD    A,(#BF00)
    LD    L,A
    LD    H,0
    ADD    HL,HL
    ADD    HL,HL
    ADD    HL,HL
;
    LD    DE,TB0
    ADD    HL,DE
    PUSH    HL
    POP    IX
;
    LD    HL,SCREEN
    LD    B,8
;
SPRIT0    PUSH    BC
    PUSH    HL
    LD    A,(IX+0)
;
    LD    B,8
SPRIT1
    RLA   
    CALL    C,AFFICH
    LD    DE,#0008
    ADD    HL,DE
    DJNZ    SPRIT1
;
SPRIT2    INC    IX
    POP    HL
    LD    DE,#00F0
    ADD    HL,DE
    POP    BC
    DJNZ    SPRIT0
ENDD    JR    ENDD
;
AFFICH
    PUSH    BC
    PUSH    HL
    PUSH    AF
    LD    A,#FF
    LD    B,24
AFFICH0
    LD    (HL),A
    INC    HL
    LD    (HL),A
    INC    HL
    LD    (HL),A
    INC    HL
    LD    (HL),A
    INC    HL
    LD    (HL),A
    INC    HL
    LD    (HL),A
    INC    hl
    LD    (HL),A
    INC    HL
    LD    (HL),A
    INC    HL
;
    LD    DE,#07F8
    ADD    HL,DE
    JP    NC,AFFICH1
    LD    DE,#C050
    ADD    HL,DE
AFFICH1
    DJNZ    AFFICH0
    POP    AF
    POP    HL
    POP    BC
    RET   
;
TB0
    DB    #7C,#C6,#CE,#D6
    DB    #E6,#C6,#7C,#00
TB1
    DB    #18,#38,#18,#18
    DB    #18,#18,#7E,#00
TB2
    DB    #3C,#66,#06,#3C
    DB    #60,#66,#7E,#00
TB3
    DB    #3C,#66,#06,#1C
    DB    #06,#66,#3C,#00
TB4
    DB    #1C,#3C,#6C,#CC
    DB    #FE,#0C,#1E,#00
TB5
    DB    #7E,#62,#60,#7C
    DB    #06,#66,#3C,#00
;
TABASIC
    DB    255,0,255,119,179
    DB    81,168,212,98,57,156
    DB    70,43,21,138,205
    DB    238
Rhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!

Longshot

QuoteI am sure there is a way to write effects that will work on all without needing to detect the crtc type, just get the programming of the registers in the right place and it'll work on all.

This is true using some restrictions (R2 + R3 <R0 for type 2, do not update R12 / R13 when C4 = 0 (for type 1), using R6/R8 for type 2, ect ...)
But for some techniques (1 line-offset-split for the most common) you need to avoid the "overflow" of C4 or C9 for example
This depends of when register are modified (current ligne or previous line)
And also to avoid display problems on horizontal split techniques...(for example when R0=7)

Rhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!

LambdaMikel

Quote from: GUNHED on 22:55, 07 March 18
Wasn't type 0 the original one? Don't know for 464, but for 6128 type 0 was the first one they used (at least in Gemany).

Yes, I was surprise to read that CRTC 2 was "the original one". Cause with all my CPCs (I guess I owned about 10 CPC 464 over the years), I never had one.

LambdaMikel

#11
Quote from: roudoudou on 23:39, 07 March 18
CRTC numbers refers to discovering order but most of 464 & 664 are CRTC-2

That's interesting. I never had one, as I said. And I owned a lot of CPCs 464. Maybe it was indeed a different story in Germany. Are there any numbers? Maybe we can make a poll here to get an idea about CRTC type distribution!

Suggestion  - does somebody have a CRTC type identification program. People can run it on their CPCs and update a poll were are going to make.

gerald

Quote from: GUNHED on 22:55, 07 March 18
Wasn't type 0 the original one? Don't know for 464, but for 6128 type 0 was the first one they used (at least in Gemany).
From my stat
CTRC 0 is the first
CRTC2 around May 86
CRTC1 from 87

Bryce

We (the CPC community) gave them these numbers, they don't exist outside our scene.

Bryce.

00WReX

Here is a small BASIC program from 1992...by Elmar Krieger.

Cheers,
Shane
The CPC in Australia...
Awa - CPCWiki

Audronic

Procrastinators Unite,
If it Ain't Broke PLEASE Don't Fix it.
I keep telling you I am Not Pedantic.
As I Live " Down Under " I Take my Gravity Tablets and Wear my Magnetic Boots to Keep me from Falling off.

LambdaMikel

Quote from: 00WReX on 01:20, 09 March 18
Here is a small BASIC program from 1992...by Elmar Krieger.

Great, thanks! We can start a poll about CRTC distribution with that. Will do that soon (or somebody else).

Longshot

I had already given the program in my previous post ...  :-X

The test on the DSK is incomplete.
It lacks CRTC 3 and 4 (which is recognized as a 0)

I added on the disk the assembled version of the source I gave a bit before. (RUN"CRTCHK")

I think the release dates are more or less known. I bought my amstrad 6128 late 85 or early 86, and it was a crtc 0. When "Get Dexter" came out in 1986, the CRTC 2 was already known because a test was done to avoid the crash. I do not know if Amstrad has kept some of the documentation on supplies somewhere, probably based on the financial conditions.
Rhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!

blackdalek

I've always assumed my CPC's CRTC was type 0 since it seems to be able to run every demo I've ever thrown at it.
I will try this identification program tomorrow and report back what it says.
CPC6128 modded with ABBA switch. External 5.25" floppy drive with side switch and Multiface 2. Now also sporting a joystick splitter and M4 WiFi board.

Longshot

Note that the CRTC 4 is the hardest to find because the ASIC had to be used quite late in the CPC, when most people preferred to buy an amiga or atari.
With the other CPCs (except the PLUS) it is possible to replace the CRTC or to add another CRTC, but for the 4 it is necessary to have this CPC.
Also, I'm not sure there are 464 or 664 with CRTC type 4. I do not think so.
Rhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!

Bryce

#20
Quote from: Longshot on 13:14, 09 March 18
Note that the CRTC 4 is the hardest to find because the ASIC had to be used quite late in the CPC, when most people preferred to buy an amiga or atari.
With the other CPCs (except the PLUS) it is possible to replace the CRTC or to add another CRTC, but for the 4 it is necessary to have this CPC.
Also, I'm not sure there are 464 or 664 with CRTC type 4. I do not think so.

You seem to be confusing things a little. The Plus (and ASIC costdown) machines don't have any seperate CRTC. The ASIC is the CRTC, or at least the CRTC functionality is built into the ASIC.

Bryce.

arnoldemu

Quote from: Longshot on 13:14, 09 March 18
Note that the CRTC 4 is the hardest to find because the ASIC had to be used quite late in the CPC, when most people preferred to buy an amiga or atari.
With the other CPCs (except the PLUS) it is possible to replace the CRTC or to add another CRTC, but for the 4 it is necessary to have this CPC.
Also, I'm not sure there are 464 or 664 with CRTC type 4. I do not think so.
I have a 464 with a type 4.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Longshot

QuoteYou seem to be confusing things a little. The Plus (and ASIC costdown) machines don't have any seperate CRTC. The ASIC is the CRTC, or at least the CRTC functionality is built into the ASIC.
Are you seriously explaining that to me ? :o
Of course that CRTC 3 and 4 are emulated CRTC.
And so, btw, if you need to have a CPC with CRTC (emulated) type 4, you need to have the cpc with this Asic. (what i said previously)
But with Cpc with a real CRTC (0.1.2), you can modify the CPC and change the CRTC chip easily.
Rhaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!!

LambdaMikel

Quote from: Longshot on 16:21, 09 March 18
But with Cpc with a real CRTC (0.1.2), you can modify the CPC and change the CRTC chip easily.

Right, I only wish they had put them in sockets. That way, you have to desolder them to exchange

LambdaMikel

Hmm added a Poll. Now I am wondering - I guess we can only have one poll per thread, right?
Should we be adding one poll per CPC version, or even more fine grained, one poll per CPC MAINBOARD revision?
What do you think?

Powered by SMFPacks Menu Editor Mod