Commodore 64 Manual de usuario Pagina 39

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 83
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 38
To unexpand a sprite in the horizontal direction, the corresponding bit
in the VIC-II control register at location 53277 ($DOID in HEX) must be
turned OFF (set to a 0). The following POKE "unexpands" a sprite in the
X direction:
POKE 53277,PEEK(53277)AND (255-2tSN)
where SN is the sprite number from 0 to 7.
To expand a sprite in the vertical direction, the corresponding bit in
the VIC-II control register at location 53271 ($DOI7 in HEX) must be
turned ON (set to a 1). The following POKE expands a sprite in the Y
direction:
POKE 53271, PEEK{53271)OR (2tSN)
where SN is the sprite number from 0 to 7.
To unexpand a sprite in the vertical direction, the corresponding bit in
the VIC-II control register at location 53271 ($DOI7 in HEX) must be
turned OFF (set to a 0). The following POKE "unexpands" a sprite in the
Y direction:
POKE 53271,PEEK(53271)AND (255-2tSN)
where SN is the sprite number from 0 to 7.
SPRITE
POSITIONING
Once you've made a sprite you want to be able to move it around the
screen. To do this, your Commodore 64 uses three positioning registers:
1) SPRITE X POSITION REGISTER
2) SPRITE Y POSITION REGISTER
3) MOST SIGNIFICANT BIT X POSITION REGISTER
Each sprite has an X position register, a Y position register, and a bit
in the X most significant bit register. This lets you position your sprites
very accurately. You can place your sprite in 512 possible X positions
and 256 possible Y positions.
The X and Y position registers work together, in pairs, as a team. The
locatkms of the X and Y registers appear in the memory map as follows:
First is the X register for sprite 0, then the Y register for sprite O. Next
PROGRAMMINGGRAPHICS 137
Vista de pagina 38
1 2 ... 34 35 36 37 38 39 40 41 42 43 44 ... 82 83

Comentarios a estos manuales

Sin comentarios