News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

crtc type 4 interrupts?

Started by arnoldemu, 09:25, 01 April 11

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

With all the recent crtc interest, I had another look at the crtc type 4 in one of my cpc464.
It was a bit awkward with some of the keys not working, but I did find something strange.

I was doing some outs to the crtc registers and then the cpc seemed to do something weird.
I did a bit more investigation and it seems I found some kind of programmable raster interrupt.

It seems if I set R18 to the crtc row and R19 to the scanline, it will cause a scanline interrupt at that line.
Normal interrupts don't work, and if I write 0 to both, normal interrupts continue.

It's a bit like a half way to the crtc type 3 we know.

here is my testing code:


;; CRTC type 4 scanline interrupt test

org &4000
nolist

di
ld hl,&c9fb
ld (&0038),hl
ei

ld bc,&7f10
out (c),c

mainloop:
ld b,&f5
ml1:
in a,(c)
rra
jr nc,ml1
ld bc,&7f54
out (c),c

ld a,80
call set_scan_line
halt
ld bc,&7f4b
out (c),c

ld a,145
call set_scan_line
halt
ld bc,&7f40
out (c),c

ld a,200
call set_scan_line
halt

ld bc,&7f43
out (c),c

xor a
call set_scan_line
jp mainloop

set_scan_line:
ld a,e

ld bc,&bc00+18                ;; R18
out (c),c
inc b
srl a
srl a
srl a                        ;; line/8
out (c),a

;; interrupt scan line
dec b
inc c
out (c),c                    ;; R19
inc b
ld a,e
and &7
out (c),a
ret


We've seen crtc type only demos, is it now the turn of crtc type 4 only demos?
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Devilmarkus

I tested it on my low-cost 6128.
As we discussed it in mails, it really does, what you tell us here.

How's that possible?  ???

The effect is really impressive!
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Phi2x

#2
.

Devilmarkus

Tested with WinAPE now and CRTC 4 setup.
Don't work here. :(
Perhaps these registers aren't emulated (yet) ?

It also shows raster stripes, but not how CRTC 4 does on real cpc!
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

arnoldemu

Quote from: phi2x on 12:39, 01 April 11
:D
ok... it was a bad(?) april fool joke.

I'll try harder next year ;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Devilmarkus

Quote from: arnoldemu on 14:48, 01 April 11
ok... it was a bad(?) april fool joke.

I'll try harder next year ;)

Hmmm on my CRTC 4 cpc it works awesome ;)



My Hardware: Several CPC 464 (crtc 0 and 1) 1 CPC 664 (crtc 2)  2 CPC 6128 (crtc 1) 1 CPC 6128+ (crtc 3)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Powered by SMFPacks Menu Editor Mod