-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
smooth scroll code #3
Comments
Hello aguaviva,
Yes, I'm very interested in scrolling systems... I'm actually adding
this in MSXgl.
At first, I'm focusing on tile by tile scrolling.
On MSX2, I will use the VDP registers to make a smooth scrolling.
On MSX1, I will have to find more complicated solutions.
I really like your generic approach, but I'm afraid that even in
assembler, it will be too slow.
However, if we limit it to a part of the screen, it might be viable.
Anyway, I'm interested to see how far you will get with this method.
For my part, I'm thinking of exploring pre-computed solutions.
|
Hi aoineko, I can provide you the best algorithms for horizontal scrolling both for msx 1 and msx2, but their integration in a general purpose framework isn't a easy task. In plain asm I can propose you this in screen 5 (with two-laiers and 8 directions) On msx1, screen 2, I can point to you this (8 directions) |
Thanks Artrag, |
I've seen the demo, are you using sprites to mask borders? How many do you leave for the game? |
Yes. The In the sample program (32x20 tiles), scrolling take about 60% of a 50 Hz frame (only every 8 frames with a 1 pixel speed) according to border color method. For bitmap mode scrolling do you use special method or just VDP commands based one? |
Mine is a tricky algorithm involving the parallel work of z80 and vdp without recurring to sprites for masking the borders. In a nutshell, this is the general idea: the tile data are stored in ROM/RAM (in pages of a ROM mapper) and plotted by the z80 column by column in the border where the new pixels appear; the z80 is also in charge of blanking the corresponding column of pixels in the opposite border. In the meanwhile, the vdp is in charge of moving a whole slice of 16*176 pixels (or 16x196 according to the mode/time you have). |
If you slice the update of the tiles in the PNT in 8 steps (having a double buffer), you can spread the CPU load an all frames, having a max cpu usage of about the 7-8% |
- [Build tool] Added .MAP file analyzer tool to get statistics on areas, segments, modules and code & variable symbols. - [Clock] Corrected comments to clarify the function of bit #3 in register 0xD. - [GM3] Fixed sample lines count for non-mirrored screen mode.
Your lib inspired me to write a smooth scroll code, it is not as fast as I'd like but I thought about sharing it with you in case you are interested
https://pastebin.com/hiFKPSE7
The text was updated successfully, but these errors were encountered: