diff options
Diffstat (limited to 'basys3/basys3.srcs/ppu_consts.vhd')
-rw-r--r-- | basys3/basys3.srcs/ppu_consts.vhd | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/basys3/basys3.srcs/ppu_consts.vhd b/basys3/basys3.srcs/ppu_consts.vhd index 89b7a7a..722954d 100644 --- a/basys3/basys3.srcs/ppu_consts.vhd +++ b/basys3/basys3.srcs/ppu_consts.vhd @@ -2,7 +2,7 @@ package ppu_consts is constant PPU_RAM_BUS_ADDR_WIDTH : natural := 16; -- RAM bus address width constant PPU_RAM_BUS_DATA_WIDTH : natural := 16; -- RAM bus data width - constant PPU_FG_SPRITE_COUNT : natural := 128; -- amount of foreground sprites + constant PPU_FG_SPRITE_COUNT : natural := 128; -- foreground sprites constant PPU_COLOR_OUTPUT_DEPTH : natural := 4; -- VGA output channel depth constant PPU_PALETTE_COLOR_WIDTH : natural := 3; -- palette index width (within sprite) constant PPU_PALETTE_INDEX_WIDTH : natural := 3; -- palette index width (palette table) @@ -17,18 +17,22 @@ package ppu_consts is constant PPU_PAL_DATA_WIDTH : natural := 12; -- palette memory ram bus data width constant PPU_AUX_ADDR_WIDTH : natural := 1; -- auxiliary memory ram bus address width constant PPU_AUX_DATA_WIDTH : natural := 16; -- auxiliary memory ram bus data width - constant PPU_POS_H_WIDTH : natural := 9; -- amount of bits for horizontal screen offset - constant PPU_POS_V_WIDTH : natural := 8; -- amount of bits for vertical screen offset + constant PPU_POS_H_WIDTH : natural := 9; -- bits for horizontal screen offset + constant PPU_POS_V_WIDTH : natural := 8; -- bits for vertical screen offset constant PPU_SPRITE_WIDTH : natural := 16; -- sprite width (pixels) constant PPU_SPRITE_HEIGHT : natural := 16; -- sprite height (pixels) + constant PPU_SPRITE_PIDX_WIDTH : natural := 8; -- bits needed to identify horizontal and vertical pixel within sprite constant PPU_SPRITE_POS_H_WIDTH: natural := 4; -- bits needed to identify horizontal pixel within sprite constant PPU_SPRITE_POS_V_WIDTH: natural := 4; -- bits needed to identify vertical pixel within sprite constant PPU_SCREEN_WIDTH : natural := 320; -- absolute screen width (pixels) constant PPU_SCREEN_HEIGHT : natural := 240; -- absolute screen height (pixels) - constant PPU_BG_CANVAS_TILES_H : natural := 40; -- amount of tiles (horizontally) on background canvas - constant PPU_BG_CANVAS_TILES_V : natural := 30; -- amount of tiles (vertically) on background canvas - constant PPU_TILE_INDEX_WIDTH : natural := 10; -- amount of bits needed to index a tile from TMM memory - constant PPU_PIXELS_PER_TILE_WORD : natural := 5; -- amount of pixels defined in one word in TMM memory - constant PPU_SPRITE_PIXELS_PER_WORD : natural := 52; -- amount of words needed for a single sprite + constant PPU_BG_CANVAS_TILES_H : natural := 40; -- tiles (horizontally) on background canvas + constant PPU_BG_CANVAS_TILES_V : natural := 30; -- tiles (vertically) on background canvas + constant PPU_BG_CANVAS_TILE_H_WIDTH : natural := 6; -- bits needed to describe horizontal bg tile index (grid coordinates) + constant PPU_BG_CANVAS_TILE_V_WIDTH : natural := 5; -- bits needed to describe vertical bg tile index (grid coordinates) + constant PPU_TILE_INDEX_WIDTH : natural := 10; -- bits needed to index a tile from TMM memory + constant PPU_PIXELS_PER_TILE_WORD : natural := 5; -- pixels defined in one word in TMM memory + constant PPU_SPRITE_PIXELS_PER_WORD : natural := 52; -- words needed for a single sprite + constant PPU_PIXEL_BIT_WIDTH : natural := 3; -- bits needed to identify pixel in TMM word end package ppu_consts; |