VRAM: Difference between revisions

From NeoGeo Development Wiki
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 23: Line 23:
|-
|-
|$0000
|$0000
|$6FFE
|$6FFF
|[[Sprites#SCB1|SCB1]]
|[[Sprites#SCB1|SCB1]]
|-
|-
|$7000
|$7000
|$7FFE
|$7FFF
|[[Fix layer|Fix map]]
|[[Fix layer|Fix map]]
|-
|-
|$8000
|$8000
|$81FE
|$81FF
|[[Sprites#SCB2|SCB2]]
|[[Sprites#SCB2|SCB2]]
|-
|-
|$8200
|$8200
|$83FE
|$83FF
|[[Sprites#SCB3|SCB3]]
|[[Sprites#SCB3|SCB3]]
|-
|-
|$8400
|$8400
|$85FE
|$85FF
|[[Sprites#SCB4|SCB4]]
|[[Sprites#SCB4|SCB4]]
|-
|-
|$8600
|$8600
|$867E
|$867F
|Sprite list for even scanlines
|Sprite list for even scanlines
|-
|-
|$8680
|$8680
|$86FE
|$86FF
|Sprite list for odd scanlines
|Sprite list for odd scanlines
|}
|}

Revision as of 02:04, 19 November 2012

VRAM stand for Video RAM.

File:Aes cxk5814.jpg
One of two CXK5814 2KiB RAM chips used for the upper zone of the VRAM ($8000~$87FF) on a AES system

The NeoGeo has 68KiB (physically 64KiB + 4KiB) of VRAM organised as 16 bits words, which is used to store sprite attributes and the map for the fix layer. Contrary to other systems, the VRAM here does not contain actual graphics.

It isn't mapped in the 68k's address space. The only way to read and write to it is by using 3 Memory mapped registers as i/o ports. Every address points to a word in VRAM, not a byte.

  • VRAM_ADDR ($3C0000) sets the VRAM address for the next read/write operation
  • VRAM_RW ($3C0002) is the data read or to write
  • VRAM_MOD ($3C0004) is the signed value added to the VRAM address after a write

SNK specifies that the address register should be set directly instead of using auto-incrementation when changing between VRAM zones ($0000~$7FFF and $8000~$FFFF).

Memory map

Start End Description
$0000 $6FFF SCB1
$7000 $7FFF Fix map
$8000 $81FF SCB2
$8200 $83FF SCB3
$8400 $85FF SCB4
$8600 $867F Sprite list for even scanlines
$8680 $86FF Sprite list for odd scanlines

VRAM can be modified at any time, even during active display.

Timing considerations

After a write:

  • Another write should be made after at least 12 cycles.
  • An address change should be made after at least 16 cycles.

After an address change, reads should be made after at least 16 cycles.

Note that these timings only affect the VRAM accesses, and not the LSPC registers.