CPCWiki forum

General Category => Programming => Topic started by: litwr on 07:49, 27 August 22

Title: Maximum picture size
Post by: litwr on 07:49, 27 August 22
I am curious how big may be picture in mode 0 (16 colors).  I have been able to get 224x256 using the next CRTC settings
1 - 112
2 - 114
6 - 32
7 - 35
12 - 12
13 - 32
But I am not sure that all 224 horizontal pixels can be shown on a real monitor.  I am also unsure about the best value for CRTC registers 2 and 3.  Any help?
Title: Re: Maximum picture size
Post by: McArti0 on 19:35, 27 August 22
real monitor GT65 green show 88 bytes (H 176 pixels in mode 0) R1=44

Typical Emulator shows 96bytes (H 192 pixels i n mode) R1=48

LCD by SCART show max 104 bytes (H 208 pixels in mode 0) R1=52

LCD by VGA-IN (RGB) show max 128 bytes (H 256 pixels in mode 0) R1=64 (R0=70)

Look in this my topic 
https://www.cpcwiki.eu/forum/programming/256x256-in-mode-0-1024x51225hz-overscan-and-65kb-vram-for-basic-it-s-coming!/
Title: Re: Maximum picture size
Post by: McArti0 on 19:47, 27 August 22
Quote from: litwr on 07:49, 27 August 221 - 112
2 - 114
one char has two bytes. You must put to R1=56, R3=48+5, where 5 is 5 sync-H pulse in us (micro sec)

R0=63 (63+1=64us)

64-5-56 =3us for border

R2=56+1 or 2 =57 or 58
Title: Re: Maximum picture size
Post by: litwr on 20:45, 27 August 22
Quote from: McArti0 on 19:35, 27 August 22real monitor GT65 green show 88 bytes (H 176 pixels in mode 0) R1=44

Typical Emulator shows 96bytes (H 192 pixels i n mode) R1=48

LCD by SCART show max 104 bytes (H 208 pixels in mode 0) R1=52

LCD by VGA-IN (RGB) show max 128 bytes (H 256 pixels in mode 0) R1=64 (R0=70)

Look in this my topic 
https://www.cpcwiki.eu/forum/programming/256x256-in-mode-0-1024x51225hz-overscan-and-65kb-vram-for-basic-it-s-coming!/
Thank you very much for your valuable information.  So 176 is the safe value for any monitor.
Quote from: McArti0 on 19:47, 27 August 22
Quote from: litwr on 07:49, 27 August 221 - 112
2 - 114
one char has two bytes. You must put to R1=56, R3=48+5, where 5 is 5 sync-H pulse in us (micro sec)

R0=63 (63+1=64us)

64-5-56 =3us for border

R2=56+1 or 2 =57 or 58
Sorry, of course, I made a typo
R1 112 -> 56
R2 114 -> 57
Thank you.  However https://www.cpcwiki.eu/index.php/CRTC claims do not use values less than 9 for Sync-H pulse...
Title: Re: Maximum picture size
Post by: McArti0 on 07:36, 28 August 22
Quote from: litwr on 20:45, 27 August 22claims do not use values less than 9 for Sync-H pulse
and whos cares? ;D :laugh: ;)

at 5 to 6 it still works...  8)
Title: Re: Maximum picture size
Post by: litwr on 14:10, 28 August 22
Quote from: McArti0 on 07:36, 28 August 22
Quote from: litwr on 20:45, 27 August 22claims do not use values less than 9 for Sync-H pulse
and whos cares? ;D :laugh: ;)
at 5 to 6 it still works...  8)
Thank you.  But do these values (5 and 6) work on a standard monitor?
I am also curious why don't 192 or even 208 pixels work on a standard monitor?  If we set
R1 = 48
R2 = 51
R3 = &8a
we get 3 chars border and 192 pixels.  It gives us the same border as for
R1 = 44
R2 = 47
R3 = &8e (standard)
that shows 176 horizontal pixels.  So if 10=&a works on a standard monitor then 192 pixels are theoretically possible too.  Did you try these CRTC values? The old info (https://www.cpcwiki.eu/index.php/Programming:Overscan) claims that R1=48 is ok...
I also provide values for 208 pixel screen.
R1 = 52
R2 = 3
R3 = &86
This is also 3 char border...
Title: Re: Maximum picture size
Post by: McArti0 on 16:30, 28 August 22
CRT has horizontal width induction coil where the current must break and then accelerate. It doesn't happen fast.

GT65 work with R3=3. 
The screen is not rectangular so R1 = 45,46 cuts out the corners and all rows without the middle one.



Title: Re: Maximum picture size
Post by: GUNHED on 17:08, 28 August 22
For some of my games I use (MODE 0) 208 pixel in X and 288 in Y.
This way I have some 'unseen' pixels, which can be filled before to be shown.
Title: Re: Maximum picture size
Post by: litwr on 19:35, 28 August 22
Quote from: McArti0 on 16:30, 28 August 22CRT has horizontal width induction coil where the current must break and then accelerate. It doesn't happen fast.

GT65 work with R3=3.
The screen is not rectangular so R1 = 45,46 cuts out the corners and all rows without the middle one.
Thank you very much for your information.  It is very difficult for me to imagine how the coil affects the image. :) A special thank for the screenshots.
BTW would you like to run the next code  ;)
1 out&bc00,3:out&bd00,&8a
2 out&bc00,2:out&bd00,51
3 out&bc00,1:out&bd00,48
My emulator shows only 46 chars after GOTO 1 instead of 48. :( Your code shows 45 chars but crops several bottom corner chars.  Of course, I am almost sure that my code can't show 48 chars but it is very interesting to observe the picture on real hardware.  Excuse me but it seems I have an obsession...
Title: Re: Maximum picture size
Post by: McArti0 on 21:37, 28 August 22
Quote from: litwr on 19:35, 28 August 22Excuse me but it seems I have an obsession...
Remember don't do anything about it.  :P

2 out&bc00,2:out&bd00,50  and work.
Title: Re: Maximum picture size
Post by: litwr on 14:42, 29 August 22
Quote from: McArti0 on 21:37, 28 August 22Remember don't do anything about it.  :P

2 out&bc00,2:out&bd00,50  and work.

Thanks a lot!  It has helped me much. :) My emu (ep128emu) shows the next image with R2=50, it is 48 char now.
48x25.png

It is interesting why value R2=51 gives us only 47 chars.  BTW I've made a variant of my Mandelbrot with the 176x256  and 192x256 resolution.
mandel-cpc-16os-176.gifmandel-cpc-16os-192.gif
It would be fantastic to get screenshots from a real machine for these images...  I have attached a disk image that contains two programs which generate the images.
cpc-os.zip
Title: Re: Maximum picture size
Post by: ComSoft6128 on 15:06, 29 August 22
Quote from: litwr on 14:42, 29 August 22
Quote from: McArti0 on 21:37, 28 August 22Remember don't do anything about it.  :P

2 out&bc00,2:out&bd00,50  and work.

Thanks a lot!  It has helped me much. :) My emu (ep128emu) shows the next image with R2=50, it is 48 char now.
48x25.png

It is interesting why value R2=51 gives us only 47 chars.  BTW I've made a variant of my Mandelbrot with the 176x256  and 192x256 resolution.
mandel-cpc-16os-176.gifmandel-cpc-16os-192.gif
It would be fantastic to get screenshots from a real machine for these images...  I have attached a disk image that contains two programs which generate the images.
cpc-os.zip
Hi @litwr ,

If it helps I can make a short video for you of both in operation on a 6128 Plus.
But....(always a but).....the video will show the screen from the Plus displayed using the OSSC so is likely to vary a little from what you would see on a CRT.
Title: Re: Maximum picture size
Post by: McArti0 on 17:05, 29 August 22
Quote from: litwr on 14:42, 29 August 22It is interesting why value R2=51 gives us only 47 chars.
Screen is not center. First left character is tucked behind the left edge.
Title: Re: Maximum picture size
Post by: ComSoft6128 on 18:00, 29 August 22
Title: Re: Maximum picture size
Post by: litwr on 19:24, 29 August 22
Quote from: ComSoft6128 on 18:00, 29 August 22
Thank you very much but now, firstly, I need to get information about the correct settings for a standard monitor.  IMHO the OSSC can show 256 horizontal pixels in mode 0.  Maybe I should make a special variant for modern displays.
Title: Re: Maximum picture size
Post by: McArti0 on 21:16, 29 August 22
Look how this problem was solved in the Batman Forever demo.  

:picard:



Title: Re: Maximum picture size
Post by: litwr on 14:14, 30 August 22
Quote from: McArti0 on 21:16, 29 August 22Look how this problem was solved in the Batman Forever demo. 

:picard:
Thank you. However, it seems it will be too difficult for me to do similar code. :(
Would you like to help me a bit more with the next questions?
Does Batman Forever show an image with R1=48?  Can you confirm that OS-192 generates a distorted image on a real CRT?  IMHO if only corners are cropped it will be acceptable.
Title: Re: Maximum picture size
Post by: McArti0 on 15:50, 30 August 22
pay attention to the text on demo screen.

"Use the cursor to move the screen to right/left."
Title: Re: Maximum picture size
Post by: litwr on 18:51, 31 August 22
Quote from: McArti0 on 15:50, 30 August 22pay attention to the text on demo screen.
"Use the cursor to move the screen to right/left."
Thank you for this nice screenshot, it confirms that 192 pixels are not possible for a standard monitor.  So I have only published (http://litwr2.atspace.eu/cpc/mandelbrot.html) the 176x256 version.
Sources are published, so everybody may build the 192x256 slide show.
Title: Re: Maximum picture size
Post by: TotO on 19:04, 31 August 22
Quote from: litwr on 18:51, 31 August 22it confirms that 192 pixels are not possible for a standard monitor.
The GT65 display less pixels than CTM644 and far less than a broadcast monitor or a flat TV. 192/384/768 is the standard full screen resolution (can be overscan) for a "PAL D1" display and 288/576 lines for the vertical resolution.
Title: Re: Maximum picture size
Post by: litwr on 11:19, 25 December 22
Now my overscan Mandelbrot (https://litwr2.github.io/cpc/mandelbrot.html) can occupy up to 192x280 raster.  I have generated such a maximum picture and rotated it by 90 degrees clockwise.  I have got an Xmas fir!  :D
xmas-fir.gif
I am still curious what is the maximum picture size for a standard color monitor?  Any help?
Good Holidays for everybody!
Title: Re: Maximum picture size
Post by: TotO on 23:26, 25 December 22
A 50Hz CRT flat TV can display 768x576i. 768/384/192x288p for mode 2, 1 and 0 respectively.
Powered by SMFPacks Menu Editor Mod