20kdm2: use twiddled textures
This commit is contained in:
parent
036544e444
commit
92428711e4
@ -17,7 +17,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7steptop2_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7steptop2_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7steptop2_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7steptop2_data_size,
|
||||||
.offset = 163840,
|
.offset = 327680,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 32,
|
.height = 32,
|
||||||
.v_mul = 1.0, // 32
|
.v_mul = 1.0, // 32
|
||||||
@ -25,7 +25,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)0,
|
.start = (void *)0,
|
||||||
.size = (uint32_t)0,
|
.size = (uint32_t)0,
|
||||||
.offset = 172032,
|
.offset = 344064,
|
||||||
.width = 0,
|
.width = 0,
|
||||||
.height = 0,
|
.height = 0,
|
||||||
.v_mul = 0, // 0
|
.v_mul = 0, // 0
|
||||||
@ -33,7 +33,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7dimfloor_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7dimfloor_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7dimfloor_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7dimfloor_data_size,
|
||||||
.offset = 172032,
|
.offset = 344064,
|
||||||
.width = 128,
|
.width = 128,
|
||||||
.height = 128,
|
.height = 128,
|
||||||
.v_mul = 1.0, // 128
|
.v_mul = 1.0, // 128
|
||||||
@ -41,7 +41,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7brickfloor01_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7brickfloor01_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7brickfloor01_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7brickfloor01_data_size,
|
||||||
.offset = 188416,
|
.offset = 376832,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -49,7 +49,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7bmtrim_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7bmtrim_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7bmtrim_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7bmtrim_data_size,
|
||||||
.offset = 253952,
|
.offset = 507904,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 64,
|
.height = 64,
|
||||||
.v_mul = 1.0, // 64
|
.v_mul = 1.0, // 64
|
||||||
@ -57,7 +57,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7sbrickfloor_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7sbrickfloor_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7sbrickfloor_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7sbrickfloor_data_size,
|
||||||
.offset = 270336,
|
.offset = 540672,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -65,7 +65,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7brnmetal_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7brnmetal_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7brnmetal_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7brnmetal_data_size,
|
||||||
.offset = 335872,
|
.offset = 671744,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -73,7 +73,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)0,
|
.start = (void *)0,
|
||||||
.size = (uint32_t)0,
|
.size = (uint32_t)0,
|
||||||
.offset = 401408,
|
.offset = 802816,
|
||||||
.width = 0,
|
.width = 0,
|
||||||
.height = 0,
|
.height = 0,
|
||||||
.v_mul = 0, // 0
|
.v_mul = 0, // 0
|
||||||
@ -81,7 +81,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7beam02_red_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7beam02_red_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7beam02_red_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7beam02_red_data_size,
|
||||||
.offset = 401408,
|
.offset = 802816,
|
||||||
.width = 64,
|
.width = 64,
|
||||||
.height = 128,
|
.height = 128,
|
||||||
.v_mul = 1.0, // 128
|
.v_mul = 1.0, // 128
|
||||||
@ -89,7 +89,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7swindow_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7swindow_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7swindow_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7swindow_data_size,
|
||||||
.offset = 409600,
|
.offset = 819200,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -97,7 +97,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7bigwall_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7bigwall_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7bigwall_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7bigwall_data_size,
|
||||||
.offset = 475136,
|
.offset = 950272,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 1024,
|
.height = 1024,
|
||||||
.v_mul = 0.75, // 768
|
.v_mul = 0.75, // 768
|
||||||
@ -105,7 +105,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7panelwood_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7panelwood_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7panelwood_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7panelwood_data_size,
|
||||||
.offset = 671744,
|
.offset = 1343488,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -113,7 +113,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7beam01_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7beam01_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7beam01_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7beam01_data_size,
|
||||||
.offset = 737280,
|
.offset = 1474560,
|
||||||
.width = 64,
|
.width = 64,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -121,7 +121,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_gothic_floor_xstepborder5_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_gothic_floor_xstepborder5_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_gothic_floor_xstepborder5_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_gothic_floor_xstepborder5_data_size,
|
||||||
.offset = 753664,
|
.offset = 1507328,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 64,
|
.height = 64,
|
||||||
.v_mul = 0.78125, // 50
|
.v_mul = 0.78125, // 50
|
||||||
@ -129,7 +129,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_liquids_lavahell_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_liquids_lavahell_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_liquids_lavahell_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_liquids_lavahell_data_size,
|
||||||
.offset = 766464,
|
.offset = 1532928,
|
||||||
.width = 128,
|
.width = 128,
|
||||||
.height = 128,
|
.height = 128,
|
||||||
.v_mul = 1.0, // 128
|
.v_mul = 1.0, // 128
|
||||||
@ -137,7 +137,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7steptop_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_e7_e7steptop_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7steptop_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_e7_e7steptop_data_size,
|
||||||
.offset = 782848,
|
.offset = 1565696,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 32,
|
.height = 32,
|
||||||
.v_mul = 1.0, // 32
|
.v_mul = 1.0, // 32
|
||||||
@ -145,7 +145,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_gothic_trim_metalblackwave01_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_gothic_trim_metalblackwave01_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_gothic_trim_metalblackwave01_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_gothic_trim_metalblackwave01_data_size,
|
||||||
.offset = 791040,
|
.offset = 1582080,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -153,7 +153,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_stone_pjrock1_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_stone_pjrock1_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_stone_pjrock1_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_stone_pjrock1_data_size,
|
||||||
.offset = 856576,
|
.offset = 1713152,
|
||||||
.width = 256,
|
.width = 256,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -161,7 +161,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)0,
|
.start = (void *)0,
|
||||||
.size = (uint32_t)0,
|
.size = (uint32_t)0,
|
||||||
.offset = 922112,
|
.offset = 1844224,
|
||||||
.width = 0,
|
.width = 0,
|
||||||
.height = 0,
|
.height = 0,
|
||||||
.v_mul = 0, // 0
|
.v_mul = 0, // 0
|
||||||
@ -169,7 +169,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)0,
|
.start = (void *)0,
|
||||||
.size = (uint32_t)0,
|
.size = (uint32_t)0,
|
||||||
.offset = 922112,
|
.offset = 1844224,
|
||||||
.width = 0,
|
.width = 0,
|
||||||
.height = 0,
|
.height = 0,
|
||||||
.v_mul = 0, // 0
|
.v_mul = 0, // 0
|
||||||
@ -177,7 +177,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_models_mapobjects_timlamp_timlamp_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_models_mapobjects_timlamp_timlamp_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_models_mapobjects_timlamp_timlamp_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_models_mapobjects_timlamp_timlamp_data_size,
|
||||||
.offset = 922112,
|
.offset = 1844224,
|
||||||
.width = 128,
|
.width = 128,
|
||||||
.height = 128,
|
.height = 128,
|
||||||
.v_mul = 1.0, // 128
|
.v_mul = 1.0, // 128
|
||||||
@ -185,7 +185,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)0,
|
.start = (void *)0,
|
||||||
.size = (uint32_t)0,
|
.size = (uint32_t)0,
|
||||||
.offset = 938496,
|
.offset = 1876992,
|
||||||
.width = 0,
|
.width = 0,
|
||||||
.height = 0,
|
.height = 0,
|
||||||
.v_mul = 0, // 0
|
.v_mul = 0, // 0
|
||||||
@ -193,7 +193,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_textures_sfx_flame2_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_textures_sfx_flame2_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_textures_sfx_flame2_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_textures_sfx_flame2_data_size,
|
||||||
.offset = 938496,
|
.offset = 1876992,
|
||||||
.width = 128,
|
.width = 128,
|
||||||
.height = 256,
|
.height = 256,
|
||||||
.v_mul = 1.0, // 256
|
.v_mul = 1.0, // 256
|
||||||
@ -201,7 +201,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2_data_size,
|
||||||
.offset = 971264,
|
.offset = 1942528,
|
||||||
.width = 32,
|
.width = 32,
|
||||||
.height = 64,
|
.height = 64,
|
||||||
.v_mul = 1.0, // 64
|
.v_mul = 1.0, // 64
|
||||||
@ -209,7 +209,7 @@
|
|||||||
{
|
{
|
||||||
.start = (void *)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2b_data_start,
|
.start = (void *)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2b_data_start,
|
||||||
.size = (uint32_t)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2b_data_size,
|
.size = (uint32_t)&_binary_bsp_20kdm2_models_mapobjects_gratelamp_gratetorch2b_data_size,
|
||||||
.offset = 973312,
|
.offset = 1946624,
|
||||||
.width = 32,
|
.width = 32,
|
||||||
.height = 64,
|
.height = 64,
|
||||||
.v_mul = 1.0, // 64
|
.v_mul = 1.0, // 64
|
||||||
|
BIN
bsp/20kdm2/textures/sfx/flame1.jpg
Normal file
BIN
bsp/20kdm2/textures/sfx/flame1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.5 KiB |
@ -6,6 +6,6 @@ while read line; do
|
|||||||
name="${filename%.*}"
|
name="${filename%.*}"
|
||||||
data_name="${name}.data"
|
data_name="${name}.data"
|
||||||
echo $data_name
|
echo $data_name
|
||||||
python ~/model_generator/color_convert.py $filename rgb565 twiddled mipmapped $data_name
|
python ~/model_generator/color_convert.py $filename rgb565 twiddled non_mipmapped $data_name
|
||||||
(cd .. ; make bsp/${data_name}.h)
|
(cd .. ; make bsp/${data_name}.h)
|
||||||
done
|
done
|
@ -1 +0,0 @@
|
|||||||
../regs/gen/generate.py
|
|
BIN
bsp/mipmapped
Normal file
BIN
bsp/mipmapped
Normal file
Binary file not shown.
1
bsp/texture_gen.sh
Normal file
1
bsp/texture_gen.sh
Normal file
@ -0,0 +1 @@
|
|||||||
|
PYTHONPATH="../regs/gen" python texture_gen.py 20kdm2/texture.inc non_mipmapped < 20kdm2/textures.txt
|
@ -230,9 +230,9 @@ void global_texture(ta_parameter_writer& writer, int ix)
|
|||||||
| tsp_instruction_word::texture_v_size::from_int(texture->height)
|
| tsp_instruction_word::texture_v_size::from_int(texture->height)
|
||||||
;
|
;
|
||||||
|
|
||||||
uint32_t texture_address = texture_memory_alloc.texture.start + font_offset + texture->offset * 2;
|
uint32_t texture_address = texture_memory_alloc.texture.start + font_offset + texture->offset;
|
||||||
uint32_t texture_control_word = texture_control_word::pixel_format::_565
|
uint32_t texture_control_word = texture_control_word::pixel_format::_565
|
||||||
| texture_control_word::scan_order::non_twiddled
|
| texture_control_word::scan_order::twiddled
|
||||||
| texture_control_word::texture_address(texture_address / 8)
|
| texture_control_word::texture_address(texture_address / 8)
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -1152,7 +1152,7 @@ void transfer_textures()
|
|||||||
|
|
||||||
int textures_length = (sizeof (textures)) / (sizeof (textures[0]));
|
int textures_length = (sizeof (textures)) / (sizeof (textures[0]));
|
||||||
for (int i = 0; i < textures_length; i++) {
|
for (int i = 0; i < textures_length; i++) {
|
||||||
uint32_t offset = texture_memory_alloc.texture.start + font_offset + textures[i].offset * 2;
|
uint32_t offset = texture_memory_alloc.texture.start + font_offset + textures[i].offset;
|
||||||
void * dst = reinterpret_cast<void *>(&ta_fifo_texture_memory[offset / 4]);
|
void * dst = reinterpret_cast<void *>(&ta_fifo_texture_memory[offset / 4]);
|
||||||
void * src = textures[i].start;
|
void * src = textures[i].start;
|
||||||
uint32_t size = textures[i].size;
|
uint32_t size = textures[i].size;
|
||||||
@ -1325,7 +1325,7 @@ int main()
|
|||||||
0xff202040);
|
0xff202040);
|
||||||
}
|
}
|
||||||
|
|
||||||
ta_parameter_writer writer = ta_parameter_writer(ta_parameter_buf);
|
ta_parameter_writer writer = ta_parameter_writer(ta_parameter_buf, (sizeof (ta_parameter_buf)));
|
||||||
|
|
||||||
video_output::set_mode_vga();
|
video_output::set_mode_vga();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user