Thanks ARTRAG!
Do you do a full refresh of the screen with VDP copy? I think I can remember this used to take too long.
And... I need to find a way to get the files to my MSX
Thanks ARTRAG!
Do you do a full refresh of the screen with VDP copy? I think I can remember this used to take too long.
And... I need to find a way to get the files to my MSX
Basically the tecnique is this:
1) you do a 1 px scroll at every step with r18. (screen adjust register) just after you send to vdp a copy operation of 1/16 of screen width to build 1/16 of a page in a non visible page
2) After 16 steps, you have scrolled at maximum (16px) the visible page, but you have also finished to build the hidden page. this page is phisically scrolled of 16 pixels!
3) You swap the hidden/visible page, resetting r18 to non scrolled position so the screen is shifted right of 16 pixel but because you now have the hidden page as visible, nothing change to eye.
4) You are ready to do the same trick @ point 1.
this works because at every 1 px scroll, (frame) you have to move only a stripe of 256px/16steps = 16pixel wide x 212 px tall area. This is about 1700bytes @ every frame. The vdp can move about 3K per frame so you are below the max load
(screen 5)
ARTRAG goes a bit farther, with some other things, but the process is basically this.
Thanks a lot for the explanation!
If I had the time, I would try again because I am pretty sure I tried this before and I couldn't make the VDP copies fast enough... or not being able to swap the page...
If it was that easy, many other companies would have done it so I think there is something special going on
The special trick is to use the vdp to build the borders on the visible page
Where the image go out of the screen the border is done by removing line with a black line on the visible page
On the other side the new line is "composed" on fly by coping a line from the set of 16x16 blocks entering in the screen
So definitely each frame I do 3 things (assume scrolling right):
- trace one black line to remove one column of pixels on the left on the visible area (one vdp fill command on a 1x160 area)
- copy 10 times a column of pixels from the 10 blocks entering in the screen (10 vdp copy commands on 1x16 areas)
- copy a column from the visible page to the hidden page to move a column of screen (one vdp copy command on a 16x160 area)
do this 15 times and than you can swap hidden and visible page and start again
It sounds very simple and logical... I am trying to remember why I did not do it... It has been so long... 23 years ago!
Maybe I missed the page flipping thing... Does it work with any amount of VRAM?
Well, in screen 5 you can store the tiles under the border and the scorebar spending only the first two pages (i.e. 64KB)
Actually it is what I do in screen 8 where I use two pages (i.e. 128KB)
I have ordered a USB floppy drive
I hope I can find time to look at your demos because I look at the code and I don't understand what I have missed 23 years ago
In the meanwhile you can use openmsx
If you want to resurrect your real msx I suggest you to buy a cf disk chart and a scc+flash chart
Turning Sprites off accelerates the VDP? Is that true?
By the way, Starush was Screen 4 I think, tile based. Borders are made of 4 sprites total, 2 on each sides, alternating their Y position with line interrupts. Like multiplexing sprites.