mirror of
https://github.com/buhman/nds.git
synced 2025-06-18 14:35:38 -04:00
add oam, more bits
This commit is contained in:
parent
810c6975b1
commit
ec85edbc14
@ -1,5 +1,4 @@
|
||||
graphics_engine_a = 0x04000000;
|
||||
graphics_engine_b = 0x04001000;
|
||||
io_registers = 0x04000000;
|
||||
pram = 0x05000000;
|
||||
vram = 0x06000000;
|
||||
oam = 0x07000000;
|
||||
|
131
bits.h
Normal file
131
bits.h
Normal file
@ -0,0 +1,131 @@
|
||||
#define DISPCNT__obj_extended_palette (0x1 << 31)
|
||||
#define DISPCNT__bg_extended_palette (0x1 << 30)
|
||||
#define DISPCNT__bg_screen_base_offset(v) (((v) & 0x7) << 27)
|
||||
#define DISPCNT__bg_character_base_offset(v) (((v) & 0x7) << 24)
|
||||
#define DISPCNT__obj_processing_during_h_blank_period (0x1 << 23)
|
||||
#define DISPCNT__obj_vram_capacity__128kb (0x0 << 22)
|
||||
#define DISPCNT__obj_vram_capacity__256kb (0x1 << 22)
|
||||
#define DISPCNT__character_vram_capacity__32kb (0x0 << 20)
|
||||
#define DISPCNT__character_vram_capacity__64kb (0x1 << 20)
|
||||
#define DISPCNT__character_vram_capacity__128kb (0x2 << 20)
|
||||
#define DISPCNT__character_vram_capacity__256kb (0x3 << 20)
|
||||
#define DISPCNT__display_vram_block__vram_a (0x0 << 18)
|
||||
#define DISPCNT__display_vram_block__vram_b (0x1 << 18)
|
||||
#define DISPCNT__display_vram_block__vram_c (0x2 << 18)
|
||||
#define DISPCNT__display_vram_block__vram_d (0x3 << 18)
|
||||
#define DISPCNT__display_mode__display_off (0x0 << 16)
|
||||
#define DISPCNT__display_mode__graphics_display (0x1 << 16)
|
||||
#define DISPCNT__display_mode__vram_display (0x2 << 16)
|
||||
#define DISPCNT__display_mode__main_memory_display (0x3 << 16)
|
||||
#define DISPCNT__obj_window__disable (0x0 << 15)
|
||||
#define DISPCNT__obj_window__enable (0x1 << 15)
|
||||
#define DISPCNT__window_1__disable (0x0 << 14)
|
||||
#define DISPCNT__window_1__enable (0x1 << 14)
|
||||
#define DISPCNT__window_0__disable (0x0 << 13)
|
||||
#define DISPCNT__window_0__enable (0x1 << 13)
|
||||
#define DISPCNT__obj__disable (0x0 << 12)
|
||||
#define DISPCNT__obj__enable (0x1 << 12)
|
||||
#define DISPCNT__bg3__disable (0x0 << 11)
|
||||
#define DISPCNT__bg3__enable (0x1 << 11)
|
||||
#define DISPCNT__bg2__disable (0x0 << 10)
|
||||
#define DISPCNT__bg2__enable (0x1 << 10)
|
||||
#define DISPCNT__bg1__disable (0x0 << 9)
|
||||
#define DISPCNT__bg1__enable (0x1 << 9)
|
||||
#define DISPCNT__bg0__disable (0x0 << 8)
|
||||
#define DISPCNT__bg0__enable (0x1 << 8)
|
||||
#define DISPCNT__2d_display_forced_blank (0x1 << 7)
|
||||
#define DISPCNT__bitmap_obj_mapping_mode__2d_mapping_with_128_horizontal_dots (0x0 << 5)
|
||||
#define DISPCNT__bitmap_obj_mapping_mode__2d_mapping_with_256_horizontal_dots (0x1 << 5)
|
||||
#define DISPCNT__bitmap_obj_mapping_mode__1d_mapping (0x2 << 5)
|
||||
#define DISPCNT__character_obj_mapping_mode__2d_mapping (0x0 << 4)
|
||||
#define DISPCNT__character_obj_mapping_mode__1d_mapping (0x1 << 4)
|
||||
#define DISPCNT__2d_3d_display_selection_for_bg0__display_2d_graphics (0x0 << 3)
|
||||
#define DISPCNT__2d_3d_display_selection_for_bg0__display_3d_graphics (0x1 << 3)
|
||||
#define DISPCNT__bg_mode__text0_text1_text2_text3 (0x0 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_text2_affine3 (0x1 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_affine2_affine3 (0x2 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_text2_extended3 (0x3 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_affine2_extended3 (0x4 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_extended2_extended3 (0x5 << 0)
|
||||
#define DISPCNT__bg_mode__3d_large_screen_256_color_bitmap (0x6 << 0)
|
||||
#define DISPSTAT__v_counter_match_interrupt_request__disable (0x0 << 5)
|
||||
#define DISPSTAT__v_counter_match_interrupt_request__enable (0x1 << 5)
|
||||
#define DISPSTAT__h_blank_interrupt_request__disable (0x0 << 4)
|
||||
#define DISPSTAT__h_blank_interrupt_request__enable (0x1 << 4)
|
||||
#define DISPSTAT__v_blank_interrupt_request__disable (0x0 << 3)
|
||||
#define DISPSTAT__v_blank_interrupt_request__enable (0x1 << 3)
|
||||
#define DISPSTAT__v_counter_match_detection__outside_a_matching_interval (0x0 << 2)
|
||||
#define DISPSTAT__v_counter_match_detection__during_a_matching_interval (0x1 << 2)
|
||||
#define DISPSTAT__h_blank_detection__outside_h_blank_interval (0x0 << 1)
|
||||
#define DISPSTAT__h_blank_detection__during_h_blank_interval (0x1 << 1)
|
||||
#define DISPSTAT__v_blank_detection__outside_v_blank_interval (0x0 << 0)
|
||||
#define DISPSTAT__v_blank_detection__during_v_blank_interval (0x1 << 0)
|
||||
#define VCOUNT__v_counter_value(v) (((v) >> 0) & 0x1ff)
|
||||
#define BG0CNT__screen_size__256x256 (0x0 << 14)
|
||||
#define BG0CNT__screen_size__512x256 (0x1 << 14)
|
||||
#define BG0CNT__screen_size__256x512 (0x2 << 14)
|
||||
#define BG0CNT__screen_size__512x512 (0x3 << 14)
|
||||
#define BG0CNT__bg_extended_palette_slot__slot_0 (0x0 << 13)
|
||||
#define BG0CNT__bg_extended_palette_slot__slot_2 (0x1 << 13)
|
||||
#define BG0CNT__screen_base_block(v) (((v) & 0x1f) << 8)
|
||||
#define BG0CNT__color_mode__16_color_mode (0x0 << 7)
|
||||
#define BG0CNT__color_mode__256_color_mode (0x1 << 7)
|
||||
#define BG0CNT__mosaic__disable (0x0 << 6)
|
||||
#define BG0CNT__mosaic__enable (0x1 << 6)
|
||||
#define BG0CNT__character_base_block(v) (((v) & 0xf) << 2)
|
||||
#define BG0CNT__priority(v) (((v) & 0x3) << 0)
|
||||
#define BG1CNT__screen_size__256x256 (0x0 << 14)
|
||||
#define BG1CNT__screen_size__512x256 (0x1 << 14)
|
||||
#define BG1CNT__screen_size__256x512 (0x2 << 14)
|
||||
#define BG1CNT__screen_size__512x512 (0x3 << 14)
|
||||
#define BG1CNT__bg_extended_palette_slot__slot_1 (0x0 << 13)
|
||||
#define BG1CNT__bg_extended_palette_slot__slot_3 (0x1 << 13)
|
||||
#define BG1CNT__screen_base_block(v) (((v) & 0x1f) << 8)
|
||||
#define BG1CNT__color_mode__16_color_mode (0x0 << 7)
|
||||
#define BG1CNT__color_mode__256_color_mode (0x1 << 7)
|
||||
#define BG1CNT__mosaic__disable (0x0 << 6)
|
||||
#define BG1CNT__mosaic__enable (0x1 << 6)
|
||||
#define BG1CNT__character_base_block(v) (((v) & 0xf) << 2)
|
||||
#define BG1CNT__priority(v) (((v) & 0x3) << 0)
|
||||
#define BG2CNT__screen_size__256x256 (0x0 << 14)
|
||||
#define BG2CNT__screen_size__512x256 (0x1 << 14)
|
||||
#define BG2CNT__screen_size__256x512 (0x2 << 14)
|
||||
#define BG2CNT__screen_size__512x512 (0x3 << 14)
|
||||
#define BG2CNT__out_of_area_processing__transparent_display (0x0 << 13)
|
||||
#define BG2CNT__out_of_area_processing__wraparound_display (0x1 << 13)
|
||||
#define BG2CNT__screen_base_block(v) (((v) & 0x1f) << 8)
|
||||
#define BG2CNT__color_mode__16_color_mode (0x0 << 7)
|
||||
#define BG2CNT__color_mode__256_color_mode (0x1 << 7)
|
||||
#define BG2CNT__mosaic__disable (0x0 << 6)
|
||||
#define BG2CNT__mosaic__enable (0x1 << 6)
|
||||
#define BG2CNT__character_base_block(v) (((v) & 0xf) << 2)
|
||||
#define BG2CNT__priority(v) (((v) & 0x3) << 0)
|
||||
#define BG3CNT__screen_size__256x256 (0x0 << 14)
|
||||
#define BG3CNT__screen_size__512x256 (0x1 << 14)
|
||||
#define BG3CNT__screen_size__256x512 (0x2 << 14)
|
||||
#define BG3CNT__screen_size__512x512 (0x3 << 14)
|
||||
#define BG3CNT__out_of_area_processing__transparent_display (0x0 << 13)
|
||||
#define BG3CNT__out_of_area_processing__wraparound_display (0x1 << 13)
|
||||
#define BG3CNT__screen_base_block(v) (((v) & 0x1f) << 8)
|
||||
#define BG3CNT__color_mode__16_color_mode (0x0 << 7)
|
||||
#define BG3CNT__color_mode__256_color_mode (0x1 << 7)
|
||||
#define BG3CNT__mosaic__disable (0x0 << 6)
|
||||
#define BG3CNT__mosaic__enable (0x1 << 6)
|
||||
#define BG3CNT__character_base_block(v) (((v) & 0xf) << 2)
|
||||
#define BG3CNT__priority(v) (((v) & 0x3) << 0)
|
||||
#define OBJ_ATTRIBUTE_0__obj_shape__square (0x0 << 14)
|
||||
#define OBJ_ATTRIBUTE_0__obj_shape__long_rectangle (0x1 << 14)
|
||||
#define OBJ_ATTRIBUTE_0__obj_shape__tall_rectangle (0x2 << 14)
|
||||
#define OBJ_ATTRIBUTE_0__color_mode__16_color_mode (0x0 << 13)
|
||||
#define OBJ_ATTRIBUTE_0__color_mode__256_color_mode (0x1 << 13)
|
||||
#define OBJ_ATTRIBUTE_0__mosaic__off (0x0 << 12)
|
||||
#define OBJ_ATTRIBUTE_0__mosaic__on (0x1 << 12)
|
||||
#define OBJ_ATTRIBUTE_0__obj_mode__normal (0x0 << 10)
|
||||
#define OBJ_ATTRIBUTE_0__obj_mode__translucent (0x1 << 10)
|
||||
#define OBJ_ATTRIBUTE_0__obj_mode__obj_window (0x2 << 10)
|
||||
#define OBJ_ATTRIBUTE_0__obj_mode__bitmap_obj (0x3 << 10)
|
||||
#define OBJ_ATTRIBUTE_0__double_size__disable (0x0 << 9)
|
||||
#define OBJ_ATTRIBUTE_0__double_size__enable (0x1 << 9)
|
||||
#define OBJ_ATTRIBUTE_0__affine_transformation__disable (0x0 << 8)
|
||||
#define OBJ_ATTRIBUTE_0__affine_transformation__enable (0x1 << 8)
|
||||
#define OBJ_ATTRIBUTE_0__y_coordinate(v) (((v) & 0xff) << 0)
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#define static_assert _Static_assert
|
||||
@ -249,6 +251,7 @@ struct graphics_engine_a {
|
||||
volatile uint32_t VECMTX_RESULT_6;
|
||||
volatile uint32_t VECMTX_RESULT_7;
|
||||
volatile uint32_t VECMTX_RESULT_8;
|
||||
volatile uint8_t _pad30[2396];
|
||||
};
|
||||
static_assert((offsetof (struct graphics_engine_a, DISPCNT)) == 0x000);
|
||||
static_assert((offsetof (struct graphics_engine_a, DISPSTAT)) == 0x004);
|
||||
@ -466,5 +469,4 @@ static_assert((offsetof (struct graphics_engine_a, VECMTX_RESULT_5)) == 0x694);
|
||||
static_assert((offsetof (struct graphics_engine_a, VECMTX_RESULT_6)) == 0x698);
|
||||
static_assert((offsetof (struct graphics_engine_a, VECMTX_RESULT_7)) == 0x69c);
|
||||
static_assert((offsetof (struct graphics_engine_a, VECMTX_RESULT_8)) == 0x6a0);
|
||||
|
||||
extern struct graphics_engine_a graphics_engine_a __asm("graphics_engine_a");
|
||||
static_assert((sizeof (struct graphics_engine_a)) == 0x1000);
|
@ -1,3 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#define static_assert _Static_assert
|
||||
@ -42,6 +44,7 @@ struct graphics_engine_b {
|
||||
volatile uint16_t BLDY;
|
||||
volatile uint8_t _pad2[22];
|
||||
volatile uint16_t MASTER_BRIGHT;
|
||||
volatile uint8_t _pad3[2];
|
||||
};
|
||||
static_assert((offsetof (struct graphics_engine_b, DISPCNT)) == 0x000);
|
||||
static_assert((offsetof (struct graphics_engine_b, BG0CNT)) == 0x008);
|
||||
@ -79,5 +82,4 @@ static_assert((offsetof (struct graphics_engine_b, BLDCNT)) == 0x050);
|
||||
static_assert((offsetof (struct graphics_engine_b, BLDALPHA)) == 0x052);
|
||||
static_assert((offsetof (struct graphics_engine_b, BLDY)) == 0x054);
|
||||
static_assert((offsetof (struct graphics_engine_b, MASTER_BRIGHT)) == 0x06c);
|
||||
|
||||
extern struct graphics_engine_b graphics_engine_b __asm("graphics_engine_b");
|
||||
static_assert((sizeof (struct graphics_engine_b)) == 0x70);
|
11
io_registers.h
Normal file
11
io_registers.h
Normal file
@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "graphics_engine_a.h"
|
||||
#include "graphics_engine_b.h"
|
||||
|
||||
struct io_registers {
|
||||
struct graphics_engine_a a;
|
||||
struct graphics_engine_b b;
|
||||
};
|
||||
|
||||
extern struct io_registers io_registers __asm("io_registers");
|
4
main.c
4
main.c
@ -1,8 +1,8 @@
|
||||
#include "registers/graphics_engine_a.h"
|
||||
#include "io_registers.h"
|
||||
|
||||
void main()
|
||||
{
|
||||
graphics_engine_a.DISPCNT = (1 << 16); // DISPLAY_ON
|
||||
io_registers.a.DISPCNT = (1 << 16); // DISPLAY_ON
|
||||
|
||||
// palette ram
|
||||
*((volatile uint16_t *)(0x05000000)) = (7 << 10) | (31 << 5) | (19 << 0);
|
||||
|
37
oam.h
Normal file
37
oam.h
Normal file
@ -0,0 +1,37 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define static_assert _Static_assert
|
||||
|
||||
struct obj {
|
||||
volatile uint16_t attr[3];
|
||||
volatile uint16_t _0;
|
||||
};
|
||||
static_assert((sizeof (struct obj)) == 8);
|
||||
|
||||
struct param {
|
||||
volatile uint16_t _0[3];
|
||||
volatile uint16_t pa;
|
||||
volatile uint16_t _1[3];
|
||||
volatile uint16_t pb;
|
||||
volatile uint16_t _2[3];
|
||||
volatile uint16_t pc;
|
||||
volatile uint16_t _3[3];
|
||||
volatile uint16_t pd;
|
||||
};
|
||||
static_assert((sizeof (struct param)) == 32);
|
||||
|
||||
union oam {
|
||||
struct obj obj[128];
|
||||
struct param param[32];
|
||||
};
|
||||
static_assert((sizeof (union oam)) == 0x400);
|
||||
|
||||
struct oam_a_b {
|
||||
union oam a;
|
||||
union oam b;
|
||||
};
|
||||
static_assert((offsetof (struct oam_a_b, a)) == 0x000);
|
||||
static_assert((offsetof (struct oam_a_b, b)) == 0x400);
|
||||
|
||||
extern struct oam_a_b oam __asm("oam");
|
@ -2,6 +2,7 @@ import sys
|
||||
from parse import register_descriptions
|
||||
|
||||
struct_name = sys.argv[2]
|
||||
struct_size = eval(sys.argv[3])
|
||||
|
||||
with open(sys.argv[1]) as f:
|
||||
buf = f.read()
|
||||
@ -36,10 +37,19 @@ def c_source(registers):
|
||||
|
||||
struct_offset += register.size
|
||||
|
||||
global struct_size
|
||||
if struct_size == 0:
|
||||
struct_size = (struct_offset + 3) // 4 * 4
|
||||
if struct_offset != struct_size:
|
||||
assert struct_size > struct_offset, (hex(struct_offset), hex(struct_size))
|
||||
yield f"volatile uint8_t _pad{pad_ix}[{struct_size - struct_offset}];"
|
||||
|
||||
def c_asserts(registers):
|
||||
for register in registers:
|
||||
yield f"static_assert((offsetof (struct {struct_name}, {register.name})) == 0x{register.offset:03x});"
|
||||
|
||||
print("#pragma once")
|
||||
print()
|
||||
print('#include <stdint.h>')
|
||||
print('#include <stddef.h>')
|
||||
print('#define static_assert _Static_assert')
|
||||
@ -50,5 +60,4 @@ for line in c_source(registers):
|
||||
print('};')
|
||||
for line in c_asserts(registers):
|
||||
print(line)
|
||||
print()
|
||||
print(f'extern struct {struct_name} {struct_name} __asm("{struct_name}");')
|
||||
print(f"static_assert((sizeof (struct {struct_name})) == {hex(struct_size)});")
|
||||
|
@ -1,5 +1,7 @@
|
||||
python format.py 0x04000000.txt graphics_engine_a > graphics_engine_a.h
|
||||
python format.py 0x04001000.txt graphics_engine_b > graphics_engine_b.h
|
||||
set -eux
|
||||
|
||||
python format.py 0x04000000.txt graphics_engine_a 0x1000 > ../graphics_engine_a.h
|
||||
python format.py 0x04001000.txt graphics_engine_b 0 > ../graphics_engine_b.h
|
||||
|
||||
make graphics_engine_bits.csv
|
||||
python format_bits.py graphics_engine_bits.csv > graphics_engine_bits.h
|
||||
python format_bits.py graphics_engine_bits.csv > ../bits.h
|
||||
|
139
registers/graphics_engine_bits.csv
Normal file
139
registers/graphics_engine_bits.csv
Normal file
@ -0,0 +1,139 @@
|
||||
"register_name","enum_name","bits","bit_name","value","mask","description"
|
||||
"DISPCNT",,31,"obj_extended_palette",1,,
|
||||
"DISPCNT",,30,"bg_extended_palette",1,,
|
||||
"DISPCNT",,"29-27","bg_screen_base_offset",,"0b111",
|
||||
"DISPCNT",,"26-24","bg_character_base_offset",,"0b111",
|
||||
"DISPCNT",,23,"obj_processing_during_h_blank_period",1,,
|
||||
"DISPCNT","obj_vram_capacity",22,"128kb",0,,
|
||||
"DISPCNT","obj_vram_capacity",22,"256kb",1,,
|
||||
"DISPCNT","character_vram_capacity","21-20","32kb","0b00",,
|
||||
"DISPCNT","character_vram_capacity","21-20","64kb","0b01",,
|
||||
"DISPCNT","character_vram_capacity","21-20","128kb","0b10",,
|
||||
"DISPCNT","character_vram_capacity","21-20","256kb","0b11",,
|
||||
"DISPCNT","display_vram_block","19-18","vram_a","0b00",,
|
||||
"DISPCNT","display_vram_block","19-18","vram_b","0b01",,
|
||||
"DISPCNT","display_vram_block","19-18","vram_c","0b10",,
|
||||
"DISPCNT","display_vram_block","19-18","vram_d","0b11",,
|
||||
"DISPCNT","display_mode","17-16","display_off",0,,
|
||||
"DISPCNT","display_mode","17-16","graphics_display",1,,
|
||||
"DISPCNT","display_mode","17-16","vram_display",2,,
|
||||
"DISPCNT","display_mode","17-16","main_memory_display",3,,
|
||||
"DISPCNT","obj_window",15,"disable",0,,
|
||||
"DISPCNT","obj_window",15,"enable",1,,
|
||||
"DISPCNT","window_1",14,"disable",0,,
|
||||
"DISPCNT","window_1",14,"enable",1,,
|
||||
"DISPCNT","window_0",13,"disable",0,,
|
||||
"DISPCNT","window_0",13,"enable",1,,
|
||||
"DISPCNT","obj",12,"disable",0,,
|
||||
"DISPCNT","obj",12,"enable",1,,
|
||||
"DISPCNT","bg3",11,"disable",0,,
|
||||
"DISPCNT","bg3",11,"enable",1,,
|
||||
"DISPCNT","bg2",10,"disable",0,,
|
||||
"DISPCNT","bg2",10,"enable",1,,
|
||||
"DISPCNT","bg1",9,"disable",0,,
|
||||
"DISPCNT","bg1",9,"enable",1,,
|
||||
"DISPCNT","bg0",8,"disable",0,,
|
||||
"DISPCNT","bg0",8,"enable",1,,
|
||||
"DISPCNT",,7,"2d_display_forced_blank",1,,
|
||||
"DISPCNT","bitmap_obj_mapping_mode","6-5","2d_mapping_with_128_horizontal_dots","0b00",,
|
||||
"DISPCNT","bitmap_obj_mapping_mode","6-5","2d_mapping_with_256_horizontal_dots","0b01",,
|
||||
"DISPCNT","bitmap_obj_mapping_mode","6-5","1d_mapping","0b10",,
|
||||
"DISPCNT","character_obj_mapping_mode",4,"2d_mapping",0,,
|
||||
"DISPCNT","character_obj_mapping_mode",4,"1d_mapping",1,,
|
||||
"DISPCNT","2d_3d_display_selection_for_bg0",3,"display_2d_graphics",0,,
|
||||
"DISPCNT","2d_3d_display_selection_for_bg0",3,"display_3d_graphics",1,,
|
||||
"DISPCNT","bg_mode","2-0","text0_text1_text2_text3",0,,
|
||||
"DISPCNT","bg_mode","2-0","text0_text1_text2_affine3",1,,
|
||||
"DISPCNT","bg_mode","2-0","text0_text1_affine2_affine3",2,,
|
||||
"DISPCNT","bg_mode","2-0","text0_text1_text2_extended3",3,,
|
||||
"DISPCNT","bg_mode","2-0","text0_text1_affine2_extended3",4,,
|
||||
"DISPCNT","bg_mode","2-0","text0_text1_extended2_extended3",5,,
|
||||
"DISPCNT","bg_mode","2-0","3d_large_screen_256_color_bitmap",6,,
|
||||
,,,,,,
|
||||
"DISPSTAT","v_counter_match_interrupt_request",5,"disable",0,,
|
||||
"DISPSTAT","v_counter_match_interrupt_request",5,"enable",1,,
|
||||
"DISPSTAT","h_blank_interrupt_request",4,"disable",0,,
|
||||
"DISPSTAT","h_blank_interrupt_request",4,"enable",1,,
|
||||
"DISPSTAT","v_blank_interrupt_request",3,"disable",0,,
|
||||
"DISPSTAT","v_blank_interrupt_request",3,"enable",1,,
|
||||
"DISPSTAT","v_counter_match_detection",2,"outside_a_matching_interval",0,,
|
||||
"DISPSTAT","v_counter_match_detection",2,"during_a_matching_interval",1,,
|
||||
"DISPSTAT","h_blank_detection",1,"outside_h_blank_interval",0,,
|
||||
"DISPSTAT","h_blank_detection",1,"during_h_blank_interval",1,,
|
||||
"DISPSTAT","v_blank_detection",0,"outside_v_blank_interval",0,,
|
||||
"DISPSTAT","v_blank_detection",0,"during_v_blank_interval",1,,
|
||||
,,,,,,
|
||||
"VCOUNT",,"8-0","v_counter_value",,,
|
||||
,,,,,,
|
||||
"BG0CNT","screen_size","15-14","256x256","0b00",,
|
||||
"BG0CNT","screen_size","15-14","512x256","0b01",,
|
||||
"BG0CNT","screen_size","15-14","256x512","0b10",,
|
||||
"BG0CNT","screen_size","15-14","512x512","0b11",,
|
||||
"BG0CNT","bg_extended_palette_slot",13,"slot_0",0,,
|
||||
"BG0CNT","bg_extended_palette_slot",13,"slot_2",1,,
|
||||
"BG0CNT",,"12-8","screen_base_block",,"0b11111",
|
||||
"BG0CNT","color_mode",7,"16_color_mode",0,,
|
||||
"BG0CNT","color_mode",7,"256_color_mode",1,,
|
||||
"BG0CNT","mosaic",6,"disable",0,,
|
||||
"BG0CNT","mosaic",6,"enable",1,,
|
||||
"BG0CNT",,"5-2","character_base_block",,"0b1111",
|
||||
"BG0CNT",,"1-0","priority",,"0b11",
|
||||
,,,,,,
|
||||
"BG1CNT","screen_size","15-14","256x256","0b00",,
|
||||
"BG1CNT","screen_size","15-14","512x256","0b01",,
|
||||
"BG1CNT","screen_size","15-14","256x512","0b10",,
|
||||
"BG1CNT","screen_size","15-14","512x512","0b11",,
|
||||
"BG1CNT","bg_extended_palette_slot",13,"slot_1",0,,
|
||||
"BG1CNT","bg_extended_palette_slot",13,"slot_3",1,,
|
||||
"BG1CNT",,"12-8","screen_base_block",,"0b11111",
|
||||
"BG1CNT","color_mode",7,"16_color_mode",0,,
|
||||
"BG1CNT","color_mode",7,"256_color_mode",1,,
|
||||
"BG1CNT","mosaic",6,"disable",0,,
|
||||
"BG1CNT","mosaic",6,"enable",1,,
|
||||
"BG1CNT",,"5-2","character_base_block",,"0b1111",
|
||||
"BG1CNT",,"1-0","priority",,"0b11",
|
||||
,,,,,,
|
||||
"BG2CNT","screen_size","15-14","256x256","0b00",,
|
||||
"BG2CNT","screen_size","15-14","512x256","0b01",,
|
||||
"BG2CNT","screen_size","15-14","256x512","0b10",,
|
||||
"BG2CNT","screen_size","15-14","512x512","0b11",,
|
||||
"BG2CNT","out_of_area_processing",13,"transparent_display",0,,
|
||||
"BG2CNT","out_of_area_processing",13,"wraparound_display",1,,
|
||||
"BG2CNT",,"12-8","screen_base_block",,"0b11111",
|
||||
"BG2CNT","color_mode",7,"16_color_mode",0,,
|
||||
"BG2CNT","color_mode",7,"256_color_mode",1,,
|
||||
"BG2CNT","mosaic",6,"disable",0,,
|
||||
"BG2CNT","mosaic",6,"enable",1,,
|
||||
"BG2CNT",,"5-2","character_base_block",,"0b1111",
|
||||
"BG2CNT",,"1-0","priority",,"0b11",
|
||||
,,,,,,
|
||||
"BG3CNT","screen_size","15-14","256x256","0b00",,
|
||||
"BG3CNT","screen_size","15-14","512x256","0b01",,
|
||||
"BG3CNT","screen_size","15-14","256x512","0b10",,
|
||||
"BG3CNT","screen_size","15-14","512x512","0b11",,
|
||||
"BG3CNT","out_of_area_processing",13,"transparent_display",0,,
|
||||
"BG3CNT","out_of_area_processing",13,"wraparound_display",1,,
|
||||
"BG3CNT",,"12-8","screen_base_block",,"0b11111",
|
||||
"BG3CNT","color_mode",7,"16_color_mode",0,,
|
||||
"BG3CNT","color_mode",7,"256_color_mode",1,,
|
||||
"BG3CNT","mosaic",6,"disable",0,,
|
||||
"BG3CNT","mosaic",6,"enable",1,,
|
||||
"BG3CNT",,"5-2","character_base_block",,"0b1111",
|
||||
"BG3CNT",,"1-0","priority",,"0b11",
|
||||
,,,,,,
|
||||
"OBJ_ATTRIBUTE_0","obj_shape","15-14","square","0b00",,
|
||||
"OBJ_ATTRIBUTE_0","obj_shape","15-14","long_rectangle","0b01",,
|
||||
"OBJ_ATTRIBUTE_0","obj_shape","15-14","tall_rectangle","0b10",,
|
||||
"OBJ_ATTRIBUTE_0","color_mode",13,"16_color_mode",0,,
|
||||
"OBJ_ATTRIBUTE_0","color_mode",13,"256_color_mode",1,,
|
||||
"OBJ_ATTRIBUTE_0","mosaic",12,"off",0,,
|
||||
"OBJ_ATTRIBUTE_0","mosaic",12,"on",1,,
|
||||
"OBJ_ATTRIBUTE_0","obj_mode","11-10","normal","0b00",,
|
||||
"OBJ_ATTRIBUTE_0","obj_mode","11-10","translucent","0b01",,
|
||||
"OBJ_ATTRIBUTE_0","obj_mode","11-10","obj_window","0b10",,
|
||||
"OBJ_ATTRIBUTE_0","obj_mode","11-10","bitmap_obj","0b11",,
|
||||
"OBJ_ATTRIBUTE_0","double_size",9,"disable",0,,
|
||||
"OBJ_ATTRIBUTE_0","double_size",9,"enable",1,,
|
||||
"OBJ_ATTRIBUTE_0","affine_transformation",8,"disable",0,,
|
||||
"OBJ_ATTRIBUTE_0","affine_transformation",8,"enable",1,,
|
||||
"OBJ_ATTRIBUTE_0",,"7-0","y_coordinate",,"0xff",
|
|
@ -1,50 +0,0 @@
|
||||
#define DISPCNT__obj_extended_palette (0x1 << 31)
|
||||
#define DISPCNT__bg_extended_palette (0x1 << 30)
|
||||
#define DISPCNT__bg_screen_base_offset(v) (((v) & 0x7) << 27)
|
||||
#define DISPCNT__bg_character_base_offset(v) (((v) & 0x7) << 24)
|
||||
#define DISPCNT__obj_processing_during_h_blank_period (0x1 << 23)
|
||||
#define DISPCNT__obj_vram_capacity___128kb (0x0 << 22)
|
||||
#define DISPCNT__obj_vram_capacity___256kb (0x1 << 22)
|
||||
#define DISPCNT__character_vram_capacity___32kb (0x0 << 20)
|
||||
#define DISPCNT__character_vram_capacity___64kb (0x1 << 20)
|
||||
#define DISPCNT__character_vram_capacity___128kb (0x2 << 20)
|
||||
#define DISPCNT__character_vram_capacity___256kb (0x3 << 20)
|
||||
#define DISPCNT__display_vram_block__vram_a (0x0 << 18)
|
||||
#define DISPCNT__display_vram_block__vram_b (0x1 << 18)
|
||||
#define DISPCNT__display_vram_block__vram_c (0x2 << 18)
|
||||
#define DISPCNT__display_vram_block__vram_d (0x3 << 18)
|
||||
#define DISPCNT__display_mode__display_off (0x0 << 16)
|
||||
#define DISPCNT__display_mode__graphics_display (0x1 << 16)
|
||||
#define DISPCNT__display_mode__vram_display (0x2 << 16)
|
||||
#define DISPCNT__display_mode__main_memory_display (0x3 << 16)
|
||||
#define DISPCNT__obj_window__disable (0x0 << 15)
|
||||
#define DISPCNT__obj_window__enable (0x1 << 15)
|
||||
#define DISPCNT__window_1__disable (0x0 << 14)
|
||||
#define DISPCNT__window_1__enable (0x1 << 14)
|
||||
#define DISPCNT__window_0__disable (0x0 << 13)
|
||||
#define DISPCNT__window_0__enable (0x1 << 13)
|
||||
#define DISPCNT__obj__disable (0x0 << 12)
|
||||
#define DISPCNT__obj__enable (0x1 << 12)
|
||||
#define DISPCNT__bg3__disable (0x0 << 11)
|
||||
#define DISPCNT__bg3__enable (0x1 << 11)
|
||||
#define DISPCNT__bg2__disable (0x0 << 10)
|
||||
#define DISPCNT__bg2__enable (0x1 << 10)
|
||||
#define DISPCNT__bg1__disable (0x0 << 9)
|
||||
#define DISPCNT__bg1__enable (0x1 << 9)
|
||||
#define DISPCNT__bg0__disable (0x0 << 8)
|
||||
#define DISPCNT__bg0__enable (0x1 << 8)
|
||||
#define DISPCNT__2d_display_forced_blank (0x1 << 7)
|
||||
#define DISPCNT__bitmap_obj_mapping_mode__2d_mapping_with_128_horizontal_dots (0x0 << 5)
|
||||
#define DISPCNT__bitmap_obj_mapping_mode__2d_mapping_with_256_horizontal_dots (0x1 << 5)
|
||||
#define DISPCNT__bitmap_obj_mapping_mode__1d_mapping (0x2 << 5)
|
||||
#define DISPCNT__character_obj_mapping_mode__2d_mapping (0x0 << 4)
|
||||
#define DISPCNT__character_obj_mapping_mode__1d_mapping (0x1 << 4)
|
||||
#define DISPCNT__2d_3d_display_selection_for_bg0__display_2d_graphics (0x0 << 3)
|
||||
#define DISPCNT__2d_3d_display_selection_for_bg0__display_3d_graphics (0x1 << 3)
|
||||
#define DISPCNT__bg_mode__text0_text1_text2_text3 (0x0 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_text2_affine3 (0x1 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_affine2_affine3 (0x2 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_text2_extended3 (0x3 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_affine2_extended3 (0x4 << 0)
|
||||
#define DISPCNT__bg_mode__text0_text1_extended2_extended3 (0x5 << 0)
|
||||
#define DISPCNT__bg_mode__3d_large_screen_256_color_bitmap (0x6 << 0)
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user