Scrolling Wrap Around MSX1

Por Richard Shankard

Supporter (5)

imagem de Richard Shankard

08-08-2019, 10:34

Can anyone share a bit of code.

I am attempting to have a bitmap of characters scroll in either direction left or right and wrap around on the other side of the screen on the same column.

When it leaves the right side of the screen it shows up on the left side and vice versa.

The idea is to fill the screen from top to bottom and scroll it with the joystick.

If anything point me in the right direction because I have been racking my brain on this for 2 months and nothing but failure.

BTW...This is all in Z80 and using the TMS 9918
Not so much worried about scroll speed as much as a formula and pointers.

Many thanks...

Entrar ou registrar-se para comentar

Por ro

Guardian (4116)

imagem de ro

08-08-2019, 12:15

Hai Richard, and welcome to MRC!
Have you done prior Z80 coding on MSX? Perhaps you might have found out already, but MSX1 does not have hardware scrolling build in the VDP *(that is the Video Chip). MSX1 screen 1, for example, is tile based. So you gotta do the shifting yourself and replot the tiles each time you scroll. It is char based, so 8x8 pixels. You can make it more advanced, but that's gonna ask a lot more skills, and tiles Smile

my advice is to get more familair with MSX hardware. There's plenty of sources on the net, the wiki here on MRC is just one of them.

cheers!

Por Richard Shankard

Supporter (5)

imagem de Richard Shankard

08-08-2019, 12:49

Thanks but then I found this and it is exactly what I need to do.
I am hoping that this nice guy will share his code.

https://www.msx.org/forum/msx-talk/development/algorithm-for...

Even if it is slow on actual hardware or for MSX2 he still has the formula that I need to keep the pointers in line.

Por PingPong

Prophet (3447)

imagem de PingPong

08-08-2019, 12:51

In screen 1 you can easily scroll at 8x8 step by changing the contents of the name table but you loose the ability of having a full bitmap mode
Screen 2 you gain a full bitmap mode but you cannot easily scroll with name table. That is because there are three different charset for each third of the screen (I am assunibg you scroll vertically noproblem horizontally)

Por Richard Shankard

Supporter (5)

imagem de Richard Shankard

08-08-2019, 13:04

I have already accomplished everything you mention and smoothly but Rogerup has perfected exactly what I need to do.
I am also doing this in mode 2.

Rogerup has the formula that I need to align my bitmap.

Por Richard Shankard

Supporter (5)

imagem de Richard Shankard

08-08-2019, 13:09

ro wrote:

Hai Richard, and welcome to MRC!
Have you done prior Z80 coding on MSX? Perhaps you might have found out already, but MSX1 does not have hardware scrolling build in the VDP *(that is the Video Chip). MSX1 screen 1, for example, is tile based. So you gotta do the shifting yourself and replot the tiles each time you scroll. It is char based, so 8x8 pixels. You can make it more advanced, but that's gonna ask a lot more skills, and tiles Smile

my advice is to get more familair with MSX hardware. There's plenty of sources on the net, the wiki here on MRC is just one of them.

cheers!

Thanks for the great greet...
I have extensive Z80 background but just started a couple months back on actual hardware programing.
If you wouldn't mind passing on a few links where the other resources are because at this point I am a sponge looking up source code for examples.

I am working on a scrolling tank game and it's a struggle because I am not familiar with the MSX.
My real work has been on the Colecovision.

Por PingPong

Prophet (3447)

imagem de PingPong

08-08-2019, 13:35

Msx 1 and colecovision share the same vdp
Only difference is that on coleco vdp triggers nmi int on msx a maskable one
On msx the non nmi int is an advantage because you can do a z80 out pair without worrying about being interrupted by vdp. Just put a Di instruction before the double out then ei instruction