starting part_dna
[mdlife] / src / hwregs.h
index 6dd8a74..2838026 100644 (file)
@@ -9,8 +9,12 @@
 #define VDP_CRAM       0xc0000000
 #define VDP_VSRAM      0x40000010
 
+#define VDP_VRAM_DMA   0x40000080
+#define VDP_CRAM_DMA   0xc0000080
+#define VDP_VSRAM_DMA  0x40000090
+
 #ifndef ASM
-#include <inttypes.h>
+#include <stdint.h>
 
 #define REG16PTR(addr) (*(volatile uint16_t*)(addr))
 #define REG32PTR(addr) (*(volatile uint32_t*)(addr))
 #define VDP_M2_VINTR   0x20
 #define VDP_M2_DISP            0x40
 
-#define VDP_NA_ADDR(x) (((x) >> 14) & 0x38)
-#define VDP_NW_ADDR(x) (((x) >> 14) & 0x3e)
-#define VDP_NB_ADDR(x) ((x) >> 17)
+#define VDP_NA_ADDR(x) (((x) >> 10) & 0x38)
+#define VDP_NW_ADDR(x) (((x) >> 10) & 0x3e)
+#define VDP_NB_ADDR(x) ((x) >> 13)
 #define VDP_SPRTAB_ADDR(x)     ((x) >> 9)
 #define VDP_HSTAB_ADDR(x)      ((x) >> 10)
 
+#define VDP_ADDR_INVAL 0x10000
+
 #define VDP_BGCOL(pal, col)    (((pal) << 4) | (col))
 
 #define VDP_M3_HFULL   0