VDPX: The Quest for High-Performance Retro Graphics

Página 3/21
1 | 2 | | 4 | 5 | 6 | 7 | 8

Por MagicBox

Master (198)

Imagen del MagicBox

03-10-2008, 21:33

No problem Smile No, there won't be a mask table. Instead, there's the transparancy color #0. Layers have a fixed order, from 0 (front) to 7 (back) and there will be a background color register for the case no layer sits under a screen X/Y.

I would love to recode YsIII for VDPX Tongue

Por flyguille

Prophet (3028)

Imagen del flyguille

03-10-2008, 21:36

I AM wondering, if VDPX will be able to hide automatically the sprites that exceds the borders of SQUARE-GAME_PLAY_SCENE.

if the sprites is the layer most on top, how will be possible to limit the view of sprites to a reduced square scene?... and thinking that we have TWO squares...

Por MagicBox

Master (198)

Imagen del MagicBox

03-10-2008, 21:39

For sprites you can set on which layer they sit, sprites have a layer attribute. If you for example would use 2 layers, layer 0 and 1. On layer 1 you'd create the game play field. Layer 0 you'd draw borders around playfield and scoreboard (think SD snatcher) and if you then set the layer attribute of sprites to layer 1, sprites will vanish under the borders of layer 0. Just make sure that the area of layer 0 that covers the playfield is set to all transparent patterns, otherwise you won't see layer 1.

As for which sprite is shown on top, that's still determined by the sprite number, sprite 0 on top, sprite 127 on back.

Edit: I see what you mean. I may add one more bit to the SAT that tells whether sprites should be clipped by the layer they are assigned to. That way, sprites start disappearing if they go past the layer borders.

Por MagicBox

Master (198)

Imagen del MagicBox

03-10-2008, 21:42

For reference, here's the SAT layout again, which is now definitive:

        7  6  5  4  3  2  1  0  |
   0 : x7 x6 x5 x4 x3 x2 x1 x0  |  x8 - x0 : X Coordinate (0 - 511)
   1 : -  -  -  -  -  -  -  x8  |  y7 - y0 : Y Coordinate (0 - 255)
   2 : y7 y6 y5 y4 y3 y2 y1 y0  |  p9 - p0 : Pattern Index (0 - 1023)
   3 : -  -  -  -  -  -  -  -   |  l2 - l0 : Layer Priority (0 - 7)
   4 : p7 p6 p5 p4 p3 p2 p1 p0  |  c2 - c0 : Collision Category (0 - 7)
   5 : -  -  -  -  -  -  p9 x8  |  en      : Enable (1 = visible, 0 = off)
   6 : -  -  -  -  -  l2 l1 l0  |  fx      : X-axis Flip (1 = flip, 0 = normal)
   7 : en c2 c1 c0 -  -  fx fy  |  fy      : Y-axis Flip (1 = flip, 0 = normal)

Por flyguille

Prophet (3028)

Imagen del flyguille

03-10-2008, 21:48

PERFECT!

it is possible. to start rendering on each hor line of the screen with its own scroll register, like having in a scroll register table... thinks in the ghostbuster (REAL ARCADE MACHINE) that effect when starts the game scene. and when you finishs the stage...

Por sjoerd

Hero (602)

Imagen del sjoerd

04-10-2008, 06:10

7 : en fx fy -  -  fy c2 c1 c0 |     : Y-axis Flip (1 = flip, 0 = normal)

Would be even better.

Por ARTRAG

Enlighted (6844)

Imagen del ARTRAG

04-10-2008, 08:39

well i think you mean

7 : en fx fy - - c2 c1 c0 | : Y-axis Flip (1 = flip, 0 = normal)

Por MagicBox

Master (198)

Imagen del MagicBox

04-10-2008, 09:50

I was thinking that you wouldn't be changing the sprite category all the time for a sprite. I mean, an enemy bullet remains an enemy bullet throughout its sprite life. The flip- and enable bits are single bits and can be turned on/off by a simple xor:

LD A, (IX+7) ; IX pointing to yer sprite
XOR #2 ;Toggle Flip X
LD (IX+7), A ; Put back

If you want to mask out the category and change it - ofcourse I can rearrange the 7th byte..

LD A, (IX+7)
AND #F0
OR <new category>
LD (IX+7), A

Ofcourse this assumes the VRAM is mapped into Z80 address space.

--- The 7th byte layout's been updated:

   7 | en -  fx fy -  c2 c1 c0 | fy      : Y-axis Flip (1 = flip, 0 = normal) 

Smile

Por MagicBox

Master (198)

Imagen del MagicBox

04-10-2008, 09:57

PERFECT!

it is possible. to start rendering on each hor line of the screen with its own scroll register, like having in a scroll register table... thinks in the ghostbuster (REAL ARCADE MACHINE) that effect when starts the game scene. and when you finishs the stage...


No, I won't be adding offset registers for individual scanlines for now.

Por PingPong

Prophet (3889)

Imagen del PingPong

04-10-2008, 12:33

@MagicBox:
VDPX may issue a number of different interrupts. Do you think to take advantage of hw interrupt ack from z80 or IM2 mode or you will stay to the old rst38h?

Página 3/21
1 | 2 | | 4 | 5 | 6 | 7 | 8