Hi,
I would like to ask for some help/assistance with a little programming question: I want to use the CRTC hardware scrolling in mode 2 for scrolling horizontally a complete (or maybe 50 lines of a) screen with some (BASIC drawn) graphics on it 255 pixels to the left.
The problem is: I am only a starter in programming Z80 assembly and don't know the technical specs of the CPC and its CRTC good enough to solve this problem within the next days. (I have got a little presentation in which I want to show the visible difference between "pure" Z80 assembly shifting Bits on the screen and the much softer scrolling with the CRTC).
So, can anybody give me a working assembly script?
Thaks!
µP
P.S. I promise I will learn to write this kind of hardware orientated programs by myself as soon as possilbe!
You ask for something which is not easy
Pixel by Pixel scrolling in horizontal is a task I will try to solve so others can learn from it. I will publish all my code soon.
On Amstrad Plus it is easy (we have extra hardware for this) (all directions shown here):
http://www.cpctech.org.uk/source/vscroll1p.asmOn CPC it is much harder.
Normal CPC scroll is 16 pixels (in mode 2) horizontal rate. Vertical it is 8 lines.
This code shows this:
http://www.cpctech.org.uk/source/vscroll1.asm Now it becomes more complex.
For only horizontal (use R3 trick to scroll 8 pixels horizontal rate in mode 2):
http://www.cpctech.org.uk/source/scrlhrz.asmTo move at 8 pixels (in mode 2) horizontal rate and 1 pixel at a time vertical rate:
More complex now to include vertical:
http://www.cpctech.org.uk/source/mess2.asmThis example needs a cpc monitor to work 100%.
The other way needs 8 screens, each is moved by 1 pixel and you cycle through these and use vscroll1.asm example too.