Author Topic: CRTC Type 2 - it's not that bad!  (Read 2480 times)

0 Members and 1 Guest are viewing this topic.

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.336
  • Country: gb
    • Unofficial Amstrad WWW Resource
    • Awards
CRTC Type 2 - it's not that bad!
« on: 10:15, 27 June 16 »
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.

like
0
No reactions
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.441
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #1 on: 10:28, 27 June 16 »
That's pretty useful info, thank you!
like
0
No reactions

Offline Overflow

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: fr
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #2 on: 11:40, 27 June 16 »
Nice reading, thank you.
 
Note that I can't help! I mean: I rely on emulators to get fx compatible with all CRTCs. :picard:
 
Type 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.
like
0
No reactions
Unregistered from CPCwiki forum.

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.939
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #3 on: 12:40, 27 June 16 »
Still, I think my mind is too primitive for that style of programming.  :-[
like
0
No reactions
* 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

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #4 on: 19:16, 27 June 16 »
Remember days when CRTC0 ruled the world and 1 was called "Bad" (while 2 was unknown).  ;D
like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Overflow

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: fr
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #5 on: 19:35, 27 June 16 »
@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).
like
0
No reactions
Unregistered from CPCwiki forum.

Offline eliot

  • CPC664
  • ***
  • Posts: 87
  • Country: fr
    • Benediction - demogroup since 1995
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #6 on: 19:44, 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!
« Last Edit: 19:46, 27 June 16 by eliot »
like
0
No reactions

Offline MaV

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.137
  • Country: at
  • Ius summum saepe summa est malitia.
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #7 on: 20:13, 27 June 16 »
Yay for Benediction! Supporting all CRTC chips. ^_^
like
0
No reactions
Black Mesa Transit Announcement System:
"Work safe, work smart. Your future depends on it."

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #8 on: 20:21, 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  :) )
like
0
No reactions
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Overflow

  • Supporter
  • CPC664
  • *
  • Posts: 60
  • Country: fr
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #9 on: 21:05, 27 June 16 »
Yay for Benediction! Supporting all CRTC chips. ^_^
+1
like
0
No reactions
Unregistered from CPCwiki forum.

Offline fgbrain

  • CPC6128
  • ****
  • Posts: 249
  • Country: gr
    • index.php?action=treasury
    • Chaos CPC Homepage
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #10 on: 21:14, 27 June 16 »
 Ι  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]
like
0
No reactions
_____

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.

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 459
  • Country: fr
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #11 on: 10:40, 28 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 :)
like
0
No reactions

Online roudoudou

  • 6128 Plus
  • ******
  • Posts: 1.158
  • Country: fr
    • urban exploration
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #12 on: 10:46, 28 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
like
0
No reactions
use RASM, the best assembler ever made :p

I will survive

Offline PulkoMandy

  • 464 Plus
  • *****
  • Posts: 459
  • Country: fr
    • Awards
Re: CRTC Type 2 - it's not that bad!
« Reply #13 on: 11:30, 28 June 16 »
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.
like
0
No reactions