I am hoping to collect as many different bits of code that detect CRTC type together into one zip package for the benefit of testing on emulators.
So far I have the publically available code from Offset, Madram and Longshot.
I am thinking of extracting the detection code from various demos.
To the demo programmers who post here, is it ok for me to do that?
For each piece of code I will put which demo it came from and the authors of the demo in the source code.
They are most likely all copies from the 3 you have (or earlier versions).
I'd say no problem for my productions, but I don't remember including a CRTC test in any of them, and if I did, I'd have used OffseT's one.
Code from Ramlaid in the demo called " DTC" is to be considered as well; however, I'm not sure that he posted any messages here :(
You can use the code in AE2010 demo which only detects Cpc Plus and Cpc Old. Note that this code don't run properly on emulators, include winape.
It's based on gate array in/out bug on asic series.
Quote from: arnoldemu on 13:59, 30 March 16
I am hoping to collect as many different bits of code that detect CRTC type together into one zip package for the benefit of testing on emulators.
this one looks cool
Test CRTC [Quasar Net] (http://quasar.cpcscene.net/doku.php?id=coding:test_crtc)
didnt you check the relevant wiki page??
http://www.cpcwiki.eu/imgs/9/99/Elmar_Krieger-SPECIAL_EFFECTS.dsk (http://www.cpcwiki.eu/imgs/9/99/Elmar_Krieger-SPECIAL_EFFECTS.dsk)
there's a CRTC check by ELMSOFT in Basic! (LISTING2.BAS)
Quote from: fgbrain on 12:43, 08 April 16
didnt you check the relevant wiki page??
http://www.cpcwiki.eu/imgs/9/99/Elmar_Krieger-SPECIAL_EFFECTS.dsk (http://www.cpcwiki.eu/imgs/9/99/Elmar_Krieger-SPECIAL_EFFECTS.dsk)
there's a CRTC check by ELMSOFT in Basic! (LISTING2.BAS)
:-[ No.
I'll add that to the collection.
This is the code I used for Batman Forever:
; Detect CRTC type
; Output
; a = CRTC type (0,1,2,3,4)
getCRTCType
ld bc,#bc0c ; select reg 12 (R/W)
out (c),c
ld bc,#bd00+%0110100 ; write a value
out (c),c
; call wVb
ld b,#f5 ; wait Vbl
@vbLoop1
in a,(c)
rra
jr c,@vbLoop1
@vbLoop2
in a,(c)
rra
jr nc,@vbLoop2
ld b,#be ; read from status register
in a,(c)
ld d,a
inc b ; read from #bf (read register)
in a,(c)
cp d ; #be == #bf?
jr z,@CRTC_3_4
; CRTC 0 1 or 2
cp c;%0110100 ; same value?
jr nz,@CRTC_1_2
; CRTC 0
xor a
ret
@CRTC_1_2
ld a,d
and a,%011111
jr nz,@CRTC_2
; CRTC 1
ld a,1
ret
; CRTC 2
@CRTC_2
ld a,2
ret
; CRTC 3 or 4
@CRTC_3_4
ld bc,&f782
out (c),c
dec b
ld a,&F
out (c),a
inc b
out (c),c
dec b
in c,(c)
cp c
jr nz,@CRTC_4
; CRTC 3
@CRTC_3
ld a,3
ret
; CRTC 4
@CRTC_4
ld a,4
ret
@arnoldemu (http://www.cpcwiki.eu/forum/index.php?action=profile;u=122)
Are you interrested about testing CRTC compatible IC that are not used on CPC? (like KC Compact)
If yes, I can send you that.
Quote from: TotO on 13:47, 08 April 16
@arnoldemu (http://www.cpcwiki.eu/forum/index.php?action=profile;u=122)
Are you interrested about testing CRTC compatible IC that are not used on CPC? (like KC Compact)
If yes, I can send you that.
Yes.
I have types 0-4 (4 is in a 464) and a KC Compact with a HD6845R (I call this type 5).
I would happily test other types if it was easy to plug them into a CPC.