RAD-X8 / Breaker style scrolling

Página 2/2
1 |

Por Edwin

Paragon (1182)

imagem de Edwin

12-07-2008, 10:49

Apparently I should not answer questions past midnight. Tongue Although $8000 is still not a standard value for the sprite patterns, so it much have been changed already. Normally they start at $7800 in screen 5.

Por Geniclé

Supporter (14)

imagem de Geniclé

12-07-2008, 22:11

Hello Multi, thanks. Maybe this was my error back than, but yes: I started counting at bit A1.
Armed with this knowledge, Guillian's example places the patterns at $8000 and the attributes at $f400.
Not beeing armed with a cool assembler (plus tacit knowledge of low-level VDP instructions - I can read it, but it's harder to write) I have done the following (save "a:....",a helped a lot to make my life easier to cut 'n paste Big smile)
I used RuMSX (F1-F5 wouldn't work for me!)

-- a real die-hard would even out(99) this...
10 SCREEN 5

-- clear video memory to where I want to set the sprite patterns & attributes.
50 FOR I=&H8000 TO &H8800:VPOKE I,0:NEXT
60 FOR I=&HF400 TO &HF800: VPOKE I,0:NEXT

-- notify me
70 PLAY "cdef"

-- fill the non visible area with some recognizeable data
80 REM empty 32Kb - poke lines
90 FOR Y=210 TO 255
100 PLAY"c"
110 C=C+1
120 IF C>15 THEN C = 0
130 FOR X=0 TO 127
140 VPOKE X+(Y*128),C*16+(16-C)
150 NEXT
160 NEXT

-- except for the current sprite attributes. Sprites will randomly appear
162 FOR I=&H7400 TO &H7800:VPOKE I,RND(1)*255:NEXT

165 REM random sprites scroll along
170 FOR Y = 255 TO 0 STEP -1:VDP(24)=Y:NEXT
180 IF STRIG(0)=0 GOTO 170

-- notify me that I am relocating the sprites patterns & attributes
181 PLAY "cdc"
183 VDP(6)=&H10
184 VDP(12)=&H1
185 VDP(5)=&HEF

-- see?
188 FOR Y = 255 TO 0 STEP -1:VDP(24)=Y:NEXT
189 IF STRIG(0)=0 GOTO 188

-- Now create random sprite data in the new sprite definition area
200 FOR I=&H8000 TO &H8800:VPOKE I,RND(1)*255:NEXT
210 FOR I=&HF400 TO &HF800: VPOKE I,RND(1)*210:NEXT

-- and show
230 FOR Y = 255 TO 0 STEP -1:VDP(24)=Y:NEXT
240 IF STRIG(0)=0 GOTO 230

Now I recall beeing one of the early few having this Yamaha V9938 book. I'm was/am confused with the "sprite color data".
(for the interested: http://www.msxarchive.nl/pub/msx/docs/datasheets/v9938.pdf - page 95).
I assume the sprite color data is automagically relocated aswell?

Can someone confirm this is basically the magic to vertical scrollers? What about positioning sprite within 212-255 line area? No problem?
Unfortunaly it is costing me to much time to make a scroller+stick controlled sprite, but I would love to see some cool simple demonstration sourcecode.

Thank you for your help! Respect to emu makers.

Por Guillian

Prophet (3507)

imagem de Guillian

12-07-2008, 23:32

The sprite color data is calculated by subtracting #200 from the base address of the sprite attribute table.
About Y coordinate. "If the value for the sprite's Y coordinate is set to 216, all sprites with lower priority will not be displayed". Tongue

Por Geniclé

Supporter (14)

imagem de Geniclé

13-07-2008, 22:31

Ouch! This sounds as a big challenge since every sprite will come through the 216-255 Y coordinate area? Question
btw Guillian, thank you for your time spent on my question.

Por ARTRAG

Enlighted (6866)

imagem de ARTRAG

13-07-2008, 23:31

Geniclé
IMHO all you need is to move the sprite attribute table (SAT, ruled by R#5 and R#11) and the sprite generating table (ruled by R#6) outside the first 32K (that in screen 5 is the size of page 0).
try something like this

10 color 15,0,0
20 SCREEN 5,2
30 set page 1,1:cls
40 set page 2,2:cls
50 set page 3,3:cls
60 set page 0,0:cls
70 vdp(5)=255:vdp(6)=255:vdp(12)=3
80 for i=128*212 to &H7FFF  : vpoke i,0 : next
90 for i=0 to &H7FFF step 31: vpoke i, i and 255 : next
100 for Y = 255 to 0 step -1 :vdp(24)=Y:next
110 IF STRIG(0)=0 GOTO 100

Por ARTRAG

Enlighted (6866)

imagem de ARTRAG

13-07-2008, 23:47

PS
The colors of the sprites move with the SAT, so relocate this and colors will follow

Por Oscar

Guardian (582)

imagem de Oscar

14-01-2012, 11:39

Hi ARTRAG,

I have typed your code in my Basic program (a vertical scroll) and the sprites still get corrupted. If I understand right, the program move the whole sprite bank (definition and color) to another address? 
Now I am using NestorBasic and I am capable to do a full screen vertical scroll but I have this issue and I need to use sprites. 
What I am doing wrong? Smile

Thank you!

Página 2/2
1 |