Vertical scrolling routine (MSX1)

Page 1/12
| 2 | 3 | 4 | 5 | 6

Par thegeps

Paragon (1258)

Portrait de thegeps

24-12-2018, 23:33

Par Grauw

Ascended (10821)

Portrait de Grauw

25-12-2018, 02:34

Nice!

How much CPU time does the scrolling take?

Par thegeps

Paragon (1258)

Portrait de thegeps

25-12-2018, 03:22

A lot, I think... It costantly redefine a group of 30 tiles in RAM and then copy them in their 3 blocks in VRAM. Pratically I have in RAM 30 group of 2 tiles (a start tile and anche end One) and their color definitions too. I did a scroll with a lddr in Every group and then copy data in VRAM. I swap start and end tiles every 8 Frames and do a scroll od names table

Par santiontanon

Paragon (1832)

Portrait de santiontanon

25-12-2018, 09:06

Nice indeed!!! is it fast enough for 50/60fps? or is it running at 25/30?

Par Louthrax

Prophet (2496)

Portrait de Louthrax

25-12-2018, 09:10

Reminds me of River Raid, with more colored tiles Smile

Par hit9918

Prophet (2932)

Portrait de hit9918

25-12-2018, 20:26

some things are flashing, it could need doublebuffering
copy into another part of the charset. then show it with a different nametable.

in the video for a short time I see the charset. so I can guess what is going on.
and the keyword "lddr" lets me think that you do this:
you copy 16 bytes in RAM. then copy 16 bytes to vram. to achieve something that could have been done in just copy 8 bytes to vram!

and the graphics could be more packed
for example there are 4 tiles:
green - rock
rock - green
the whole thing could be done in 3 tiles
green - rock - green
it is 3 tiles in RAM and 2 tiles onscreen. copying 16 bytes out of those 24 bytes, with an offset 0..7 .

Par thegeps

Paragon (1258)

Portrait de thegeps

25-12-2018, 23:29

Things aren't as you think Sorry. The charset is composed by 62 tiles. These 62 tiles are coupled, 0-1, 2-3, 4-5 and so on. I have in RAM a copy of all the tiles shapes and all color information. for all couples (and colors) I do a LDDR to have One pixel scroll.
Last line of end tile is copied at the top of start tile. When all 32 couples are shifted in RAM I copy their definitions and colors in VRAM, in all 3 attribute blocks and in all 3 colors blocks

Par thegeps

Paragon (1258)

Portrait de thegeps

26-12-2018, 15:09

How can I measure CPU time?

Par hit9918

Prophet (2932)

Portrait de hit9918

26-12-2018, 16:03

the easiest is to change the border colors
set it to red where the thing begins and black at the end
but interpreting the picture over 3 frames is not so easy

well and the scroll normaly goes without rotating in RAM, can save the whole lddr time
it goes with simply the copy to vram with the source address offsetted by 0..7
and it has no groups and can make graphics of different height

Par thegeps

Paragon (1258)

Portrait de thegeps

26-12-2018, 17:09

Thx for hints. I will try Wink

Par TomH

Champion (375)

Portrait de TomH

27-12-2018, 18:00

Cool demo! For me it had more of a Xevious than a River Raid vibe, but I can't necessarily qualify why. Maybe the dirt sections?

I guess if memory were no object, you could have all 8 scroll positions of tiles already generated? Or have I misunderstood the approach taken? If not then I make that 62*8 (* 16 bytes/tile) = 7,936 bytes.

I also think openMSX's debugger could help you with CPU usage above and beyond manual logging via border manipulation. There certainly seem to be examples of people using it for that purpose.

EDIT: no, I possibly misread that. If it's 62 tiles, which are then coupled to produce a whole bunch more pairs, rather than 62 total tiles once the relevant pairs have been matched, then obviously that arithmetic isn't correct.

Page 1/12
| 2 | 3 | 4 | 5 | 6