aboutsummaryrefslogtreecommitdiff
path: root/stm32/ppu
diff options
context:
space:
mode:
Diffstat (limited to 'stm32/ppu')
-rw-r--r--stm32/ppu/consts.h26
-rw-r--r--stm32/ppu/internals.h22
-rw-r--r--stm32/ppu/ppu.h11
-rw-r--r--stm32/ppu/types.h40
4 files changed, 0 insertions, 99 deletions
diff --git a/stm32/ppu/consts.h b/stm32/ppu/consts.h
deleted file mode 100644
index ee94a69..0000000
--- a/stm32/ppu/consts.h
+++ /dev/null
@@ -1,26 +0,0 @@
-#pragma once
-
-#define HH_PPU_PALETTE_COUNT 8
-#define HH_PPU_PALETTE_COLOR_COUNT 8
-#define HH_PPU_RAM_BUS_ADDR_WIDTH 16
-#define HH_PPU_RAM_BUS_DATA_WIDTH 16
-#define HH_PPU_FG_SPRITE_COUNT 128
-#define HH_PPU_SPRITE_WIDTH 16
-#define HH_PPU_SPRITE_HEIGHT 16
-#define HH_PPU_SCREEN_WIDTH 320
-#define HH_PPU_SCREEN_HEIGHT 240
-#define HH_PPU_BG_CANVAS_TILES_H 40
-#define HH_PPU_BG_CANVAS_TILES_V 30
-
-#include "types.h"
-
-#define HH_PPU_VRAM_TMM_OFFSET ((hh_ppu_addr_t) 0x0000)
-#define HH_PPU_VRAM_TMM_SIZE ((hh_ppu_addr_t) 0xd000)
-#define HH_PPU_VRAM_BAM_OFFSET ((hh_ppu_addr_t) 0xd000)
-#define HH_PPU_VRAM_BAM_SIZE ((hh_ppu_addr_t) 0x04b0)
-#define HH_PPU_VRAM_FAM_OFFSET ((hh_ppu_addr_t) 0xd800)
-#define HH_PPU_VRAM_FAM_SIZE ((hh_ppu_addr_t) 0x0100)
-#define HH_PPU_VRAM_PAL_OFFSET ((hh_ppu_addr_t) 0xdc00)
-#define HH_PPU_VRAM_PAL_SIZE ((hh_ppu_addr_t) 0x0040)
-#define HH_PPU_VRAM_AUX_OFFSET ((hh_ppu_addr_t) 0xde00)
-#define HH_PPU_VRAM_AUX_SIZE ((hh_ppu_addr_t) 0x0002)
diff --git a/stm32/ppu/internals.h b/stm32/ppu/internals.h
deleted file mode 100644
index ddb2196..0000000
--- a/stm32/ppu/internals.h
+++ /dev/null
@@ -1,22 +0,0 @@
-#pragma once
-
-#include <stdbool.h>
-
-#include "types.h"
-
-typedef struct {
- hh_ppu_addr_t offset;
- hh_ppu_addr_t size;
- hh_ppu_data_t* data;
-} hh_s_ppu_vram_data;
-
-bool hh_ppu_vram_valid_address(hh_ppu_addr_t addr);
-void hh_ppu_vram_write(hh_ppu_addr_t addr, hh_ppu_data_t data);
-void hh_ppu_vram_memcpy(void* a, hh_s_ppu_vram_data b);
-
-hh_s_ppu_vram_data* hh_ppu_2nat_bam(hh_s_ppu_loc_bam_entry);
-hh_s_ppu_vram_data* hh_ppu_2nat_fam(hh_s_ppu_loc_fam_entry);
-hh_s_ppu_vram_data* hh_ppu_2nat_aux(hh_s_ppu_loc_aux);
-hh_s_ppu_vram_data* hh_ppu_2nat_sprite(hh_ppu_loc_sprite_data_t);
-hh_s_ppu_vram_data* hh_ppu_2nat_pal(hh_ppu_loc_palette_data_t);
-
diff --git a/stm32/ppu/ppu.h b/stm32/ppu/ppu.h
deleted file mode 100644
index ac01ef7..0000000
--- a/stm32/ppu/ppu.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#pragma once
-
-#include "types.h"
-
-void hh_ppu_vblank_interrupt();
-void hh_ppu_init();
-
-void hh_ppu_update_foreground(unsigned index, hh_s_ppu_loc_fam_entry e);
-void hh_ppu_update_background(unsigned index, hh_s_ppu_loc_bam_entry e);
-void hh_ppu_update_sprite(unsigned tilemap_index, hh_s_ppu_loc_sprite sprite);
-void hh_ppu_update_aux(hh_s_ppu_loc_aux aux);
diff --git a/stm32/ppu/types.h b/stm32/ppu/types.h
deleted file mode 100644
index d7605a5..0000000
--- a/stm32/ppu/types.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#pragma once
-
-#include <stdint.h>
-#include <stdbool.h>
-
-#include "consts.h"
-
-typedef uint16_t hh_ppu_addr_t;
-typedef uint16_t hh_ppu_data_t;
-
-typedef uint8_t hh_ppu_loc_sprite_data_t[HH_PPU_SPRITE_WIDTH * HH_PPU_SPRITE_HEIGHT];
-typedef uint8_t hh_ppu_loc_palette_data_t[HH_PPU_PALETTE_COLOR_COUNT];
-
-typedef hh_ppu_loc_sprite_data_t hh_s_ppu_loc_sprite;
-typedef hh_ppu_loc_palette_data_t hh_s_ppu_loc_palette;
-
-typedef struct {
- bool horizontal_flip;
- bool vertical_flip;
- uint8_t palette_index;
- uint8_t tilemap_index;
-} hh_s_ppu_loc_bam_entry;
-
-typedef struct {
- bool horizontal_flip;
- bool vertical_flip;
- uint16_t position_x;
- uint16_t position_y;
- uint8_t palette_index;
- uint8_t tilemap_index;
-} hh_s_ppu_loc_fam_entry;
-
-typedef struct {
- bool sysreset;
- bool fg_fetch;
- uint16_t bg_shift_x;
- uint16_t bg_shift_y;
-} hh_s_ppu_loc_aux;
-
-typedef uint16_t hh_ppu_native_color_t;