diff options
author | lonkaars <loek@pipeframe.xyz> | 2023-02-25 16:48:01 +0100 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2023-02-25 16:48:01 +0100 |
commit | 779ad2408cf97687878f816ddff2b04f22f5172d (patch) | |
tree | e9adbec3e7082e22a272e9fac250b00393a06746 /src/ppu/internals.h | |
parent | f7da5b7dde8b9c342c805edd65e66febf705ed48 (diff) |
add developer documentation to ppusim/ppu interface
Diffstat (limited to 'src/ppu/internals.h')
-rw-r--r-- | src/ppu/internals.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ppu/internals.h b/src/ppu/internals.h index 8f50c52..4a1726e 100644 --- a/src/ppu/internals.h +++ b/src/ppu/internals.h @@ -9,6 +9,7 @@ /** @brief resize `in` to `upper downto lower` like in vhdl */ #define HH_RESIZE(in, upper, lower) ((((hh_ppu_data_t)(in)) & (HH_MASK(upper+1-lower) << lower)) >> lower) +/** @brief memory word(s) that can be placed into vram */ typedef struct { hh_ppu_addr_t offset; hh_ppu_addr_t size; @@ -22,9 +23,14 @@ void hh_ppu_vram_dwrite(hh_ppu_addr_t addr, hh_ppu_data_t data); /** @brief write data block into vram */ void hh_ppu_vram_write(hh_s_ppu_vram_data data); +/** @brief convert local background attribute memory entry to PPU format */ hh_s_ppu_vram_data hh_ppu_2nat_bam(hh_s_ppu_loc_bam_entry); +/** @brief convert local foreground attribute memory entry to PPU format */ hh_s_ppu_vram_data hh_ppu_2nat_fam(hh_s_ppu_loc_fam_entry); +/** @brief convert local AUX memory copy to PPU format */ hh_s_ppu_vram_data hh_ppu_2nat_aux(hh_s_ppu_loc_aux); +/** @brief convert local sprite to PPU format */ hh_s_ppu_vram_data hh_ppu_2nat_sprite(const hh_ppu_loc_sprite_data_t); +/** @brief convert local RGB color to PPU format */ hh_s_ppu_vram_data hh_ppu_2nat_color(hh_ppu_rgb_color_t); |