News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

R3 smooth scrolling (it doesn't work on televisions myth - some truth).

Started by arnoldemu, 14:48, 07 December 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

keith56

Quote from: arnoldemu on 11:51, 11 December 16
I will make some test programs that use r3 for scrolling but do different things to compensate for the problem you see. Would you mind testing them?

Yes by all means please send me some test code! I'm fascinated to know what scrolling tricks are / are usable.
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

arnoldemu

Quote from: keith56 on 12:21, 11 December 16
Yes by all means please send me some test code! I'm fascinated to know what scrolling tricks are / are usable.
http://www.cpctech.org.uk/hscrl.zip

There is a dsk in the zip file with multiple programs to run.

Please run each and report what you see.
Each test uses r3 scrolling, sets mode 1 and fills the screen with chars. The chars will repeat as it scrolls.

Press O,P to scroll left/right.

Hold them down to scroll.

I am interested in:
- if the screen is stable or not
- if the colours are good (normal basic colours of blue and yellow with black border)
- if the display goes black/white or rolls or distorts or anything
- if the scroll is smooth or nearly smooth (firmware timings may cause it to be bit worse) when the keys are held. Or maybe some values are much worse and are really hard to watch?

hrz1.bin - classic f5/f6 (should do the same as ghosts'n'goblins on your setup)

hrz2.bin - set fe during vsync, f5/f6 at other times (this may fix your problem, I make sure hsync is a good value only at vsync time, during the display the screen uses f5/f6)

hrz3.bin - switch f4/f5 (the idea here is that switching f5/f6 is a problem, so try a different switch - same distance between switch values)

hrz4.bin - switch fe/f5 (switch from LONG to SHORT. e is the default.)

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

keith56

Ok, I tried all 4

I'm afraid none of them work on my converter box,

All 4 cause a roll of the screen every 2nd time I press the right button.

No 2 is the worst, if I hold down right it completely blacks out the screen (Probably this that G&G is using?)

on 1,3 and 4 holding right causes the screen to judder violenty in all directions (picture moves about an inch!) but the screen never blacks out.

Colours appear normal at all times (except when the screen blacks out)

If you want more testing I will do so tonight, or record video if you want to see the effect.
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

arnoldemu

Quote from: keith56 on 00:02, 12 December 16
Ok, I tried all 4

I'm afraid none of them work on my converter box,

All 4 cause a roll of the screen every 2nd time I press the right button.

No 2 is the worst, if I hold down right it completely blacks out the screen (Probably this that G&G is using?)

on 1,3 and 4 holding right causes the screen to judder violenty in all directions (picture moves about an inch!) but the screen never blacks out.

Colours appear normal at all times (except when the screen blacks out)

If you want more testing I will do so tonight, or record video if you want to see the effect.
Thanks.

No 2 was meant to fix it  :laugh: The idea behind No 2 was to send a "good" hsync when vsync is active to keep the converter happy but it didn't work.

No 1 is closest to G'n'G *except* the change is made at a different time in the frame compared to G'n'G.

I'll think of some other ideas to see if I can improve things.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

RichTW

Has there ever been any kind of consensus on why adjusting R3 moves the screen by half a CRTC character instead of a whole one? If the pulse width is measured in CRTC cycles, it still doesn't entirely make sense to me, although obviously it's more to do with how the monitor interprets the signal.

arnoldemu

Quote from: RichTW on 20:30, 12 December 16
Has there ever been any kind of consensus on why adjusting R3 moves the screen by half a CRTC character instead of a whole one? If the pulse width is measured in CRTC cycles, it still doesn't entirely make sense to me, although obviously it's more to do with how the monitor interprets the signal.
I was thinking about this yesterday. I'm guessing the monitor is synchronising on the centre of the hsync pulse.

What happens:
- CRTC outputs HSYNC which goes into GA
- GA starts blanking (forcing black)
- 2 us after the CRTC HSYNC starts, GA outputs SYNC to monitor
- GA cuts monitor SYNC at 4us max

Normal HSYNC length is above 6. So GA will output 4us of HSYNC to monitor.
Normally we see 2 chars blanking, 4 chars HSYNC to monitor and then 8 chars blanking.

If we set HSYNC length to 5, then GA will output 3us to monitor (mid point 1.5us).
We also get less blanking, the blanking is now cut at the same time as the HSYNC to the monitor.

Depending on R2 setting we can then get border AND/OR graphics to appear where HSYNC and/or blanking would normally be with normal settings.

Televisions are not happy about the graphics and change the colours.

So if R2 is not near HSYNC, you can set border to black and they are happy.
If R2 causes graphics to overlap HSYNC then you can't do much, except set a pen to black and blank the pixels yourself.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

arnoldemu

@keith56

Please download again http://www.cpctech.org.uk/hscrl.zip

Please test hrz5,hrz6,hrz7 and hrz8.

5 changes r2
6 changes r0
7 changes r3 (8/7) - I expect ok and chunky scroll
8 oops same as 7.

I am interested to know what the adaptor does with these.

I *think* the adaptor is syncing on the *end* of the hsync and not the middle.
This means R3 scrolling may never work. This would certainly explain the rolling and it jumping by ~4 chars.

If you type this in basic what happens:

out &bc00,3:out &bd00,&85
out &bc00,3:out &bd00,&86

and please try it with normal border and "border 0".

I have some more questions:

- The adaptor is converting amstrad to vga ? Is it scaling?
- Can you choose the output vga resolution (e.g. 800x600)?
- is the Amstrad screen centralised exactly so that left and right border are the same width?

If it's syncing on the end of the hsync or the start then the borders will not be equal in size I don't think, and the widths may explain what it is syncing on.

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

keith56

5 changes r2 - screen went black after character fill, pressing buttons doesn't bring it back
6 changes r0 - screen rolled all over the place then went black (no signal) after the character fill
7 changes r3 (8/7) - Chunky scroll - no problems!
8 oops same as 7. - Same as 7!

7 and 8 have worked fine, the others have not been usable
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

arnoldemu

Quote from: keith56 on 23:08, 13 December 16
5 changes r2 - screen went black after character fill, pressing buttons doesn't bring it back
6 changes r0 - screen rolled all over the place then went black (no signal) after the character fill
7 changes r3 (8/7) - Chunky scroll - no problems!
8 oops same as 7. - Same as 7!

7 and 8 have worked fine, the others have not been usable
Ok.

The results are that R3 smooth scrolling is not possible with your converter and there is no other way to try and do the same with other registers.


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

keith56

Yes - it certainly seems not!

Thanks for all the test files, it was interesting to see them work, and I know now not to spend any time trying to develop using half char H scroll! Unless I don't want to play it myself!
Chibi Akumas: Comedy-Horror 8-bit Bullet Hell shooter!
Learn ARM, 8086, Z80, 6502 or 68000 with my tutorials: www.assemblytutorial.com
My Assembly programming book is available now on amazon!

Powered by SMFPacks Menu Editor Mod