News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

CRTC Type 2 - it's not that bad!

Started by arnoldemu, 08:15, 27 June 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

arnoldemu

I have tested type 2 CRTC a lot.

Really, it's not as bad as people say. Yes it has a couple of problems, but I have learnt the following:

- for R1 it acts like all other CRTCs
- for R6 it acts like type 0
- for R4 and R7 it's similar to type 0.
- R3 is like type 1.
- Set R12/R13 before the HDISP (R1) on the last scan-line for it to be used in the next frame
- Do not set R2+R3>R0
- When R4=0 and R9=0, there are two possibilities.
a) You will get a display as if you set R4 to 128. 1 scanline per char. Oh and it doesn't matter what R7 you use, it will trigger because 127 is the max for R7!
b) No display, possibly border.

I almost got R4=0, R9=0 to work. I tried to force it so that R4 would generate 128 lines. Then set R1>R0 to repeat the line. Then change R12/R13 before HDISP to change screen address. A few lines later I would then set R4 back to the value I wanted.

It *almost* worked.


I also found type 1 was the easiest to program.

Type 0, type3 and type 4 were joint next.

Type 2 was the hardest but if you think cleverly a lot of effects can be done on all.

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

robcfg

That's pretty useful info, thank you!

Overflow

Nice reading, thank you.

Note that I can't help! I mean: I rely on emulators to get fx compatible with all CRTCs. :picard:

Quote from: arnoldemu on 08:15, 27 June 16Type 2 (...) the hardest but if you think cleverly a lot of effects can be done on all.
I agree. YAP! runs on all CRTCs with exactly same code.

Then, I have mixed feelings. Whoever can choose whatever platform for a demo: calculator, enhanced ZX, own cpu built on a FPGA... So, it is very acceptable to forget CRTC2, or even use CRTC1-specific tricks for an unbelievable screen. That said, well, I feel bad when I read "Amstrad CPC" as platform. I believe one could write something similar starting with "Hey! this does not run on my Amstrad CPC... 464 cos' it requires 1) a disk drive 2) 128Kb".

Conclusion? none! but thank you for pointing out that a lot of fx can be done on all CRTCs.
Unregistered from CPCwiki forum.

AMSDOS

Still, I think my mind is too primitive for that style of programming.  :-[
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

TFM

Remember days when CRTC0 ruled the world and 1 was called "Bad" (while 2 was unknown).  ;D
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Overflow

@Amsdos: thanks! this is a nice touch of humour.  :)


@TFM: remember... when we were young!? ouch! this is a sucker punch.
Indeed: in the early years I got a crtc0 qwerty cpc6128 imported from England.
I did not understand why my very first "overflow tome 1" did not run fine... on some monitors I thought!
Note that at that time, some guys did know what was going on: see Crafton&Xunk scrolling-in-the-border screen;
it had been inhibited on crtc2 which couldn't handle it (R2+R3>R0 removes VSYNC, thanks ArnoldEmu).
Unregistered from CPCwiki forum.

eliot

#6
Quote from: arnoldemu on 08:15, 27 June 16
I have tested type 2 CRTC a lot.

Really, it's not as bad as people say.


The Benediction's part in the 30YMD (Q4P) works on CRTC2. There is NO adaptation for any CRTC... Funny exercise!

MaV

Yay for Benediction! Supporting all CRTC chips. ^_^
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

TFM

Quote from: Overflow on 17:35, 27 June 16
@TFM: remember... when we were young!? ouch! this is a sucker punch.
Indeed: in the early years I got a crtc0 qwerty cpc6128 imported from England.
I did not understand why my very first "overflow tome 1" did not run fine... on some monitors I thought!
Note that at that time, some guys did know what was going on: see Crafton&Xunk scrolling-in-the-border screen;
it had been inhibited on crtc2 which couldn't handle it (R2+R3>R0 removes VSYNC, thanks ArnoldEmu).

At least we're not female, so we can feel young for quite a while more.  ;D

My first CPC had a CRTC0 too, then it broke (stupid my touched the monitor and the joystick port at the same time by accident). Got a replacement from the store, had no CRTC0 any longer.  :-X
(But still having Tome 1 on one of my discs  :) )
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Overflow

Quote from: MaV on 18:13, 27 June 16
Yay for Benediction! Supporting all CRTC chips. ^_^
+1
Unregistered from CPCwiki forum.

fgbrain

 Ι  agree !  According to my tests I remember these: (for crtc 2 motorola type)

Set reg3 to 9 and you can set reg2 to leftmost screen.

When reg1>reg0 , line per line splitting is possible too!

What we couldnt achieve  (back in the 90s) was vertical splitting on type2...
[not that I really master this technique anyway]
_____

6128 (UK keyboard, Crtc type 0/2), 6128+ (UK keyboard), 3.5" and 5.25" drives, Reset switch and Digiblaster (selfmade), Inicron Romram box, Bryce Megaflash, SVideo & PS/2 mouse, , Magnum Lightgun, X-MEM, X4 Board, C4CPC, Multiface2 X4, RTC X4 and Gotek USB Floppy emulator.

PulkoMandy

Quote from: eliot on 17:44, 27 June 16

The Benediction's part in the 30YMD (Q4P) works on CRTC2. There is NO adaptation for any CRTC... Funny exercise!


Same for Shinra's part in the 30YMD, and all other demos from Shinra :)

roudoudou

Quote from: eliot on 17:44, 27 June 16

The Benediction's part in the 30YMD (Q4P) works on CRTC2. There is NO adaptation for any CRTC... Funny exercise!


Must we disassemble your code or you may write an instructive article about the technic you used?  ;D
My pronouns are RASM and ACE

PulkoMandy

The source for Shinra part is available: GitHub - pulkomandy/30years


Nothing special about the techniques used, it just takes care to do never do screen splits in the first character line of a CRTC screen (so you can't do line-by-line splitting, but most effects are more interesting with 2-line by 2-line splits which allows for more patterns and dithering in the graphics anyway)


If you are only interested in the CRTC handling code, have a look at this file which implements the single effect in the part:
30years/colors.z80 at master · pulkomandy/30years · GitHub


Everything is built from this simple code with different textures, color palettes and addressing tables.

Powered by SMFPacks Menu Editor Mod