78 Commits

Author SHA1 Message Date
8e534e9e25 example: modifier_volume_with_two_volumes: textured 2023-12-30 22:22:50 +08:00
549254615e example: modifier_volume_with_two_volumes 2023-12-30 21:50:54 +08:00
de76c0bed2 ta_parameter_format: generate TA parameter formats from csv
This replaces all handwritten TA parameter format structures with
automatically generated structures.

All valid TA parameter formats are now declared.
2023-12-30 18:55:09 +08:00
7f9469c9a7 regs/gen/ta_parameter_format: incomplete 2023-12-30 17:38:15 +08:00
5db6272ceb example: add modifier volume
This creates a modifier volume with a cube that intersects a plane.
2023-12-30 15:11:22 +08:00
4bb04a0362 example: add maple_analog
Also adds the incomplete modifier_volume example.

This also adds vec2 for UV coordinates, and obj_to_cpp has been
modified to parse vertex texture coordinates from obj files.
2023-12-30 10:53:39 +08:00
6a17031c6f example: add wiffle_attenuation
This example is an experiment with light attenuation.
2023-12-26 22:46:52 +08:00
b43b18492a alt.lds: use memory ORIGIN 2023-12-25 23:42:17 +08:00
2a721d8c01 core: enable span/offset sort 2023-12-25 23:41:11 +08:00
6f010c20f5 core: remove flycast hack
I think this was only relevant when END_OF_RENDER_VIDEO was in use;
this doesn't seem to affect flycast's END_OF_RENDER_TSP
generation. The former is definitely a flycast bug.
2023-12-25 22:17:07 +08:00
1078037226 icosphere: adjust lighting 2023-12-25 22:11:53 +08:00
8c5cd36078 icosphere: increase the size of ta_parameter_buf
This might accidentally work, but the number of ta parameters far
exceeded the previous value.
2023-12-25 22:04:25 +08:00
54f09bad01 ta_fifo_polygon_converter: properly calculate ta_next_opb_offset
The main issue with the previous code:

  constexpr uint32_t tiles = (640 / 32) * (320 / 32);

Should have been:

  constexpr uint32_t tiles = (640 / 32) * (480 / 32);

The consequence of this is some OPBs were being overwritten by
TA_NEXT_OPB, causing corruption (missing triangles, incomplete
drawings) in some tiles.
2023-12-25 21:59:26 +08:00
03aa9b27f0 core: set correct pointer_burst_size
0x15 is 21, which is larger than the OPB size (16).

The 0x15 value directly causes CORE to hang given a sufficiently
"large" object list (more than ~2 triangles per tile).

After changing pointer burst size to the intended value, 15, CORE no
longer hangs while drawing "large" object lists.
2023-12-25 00:54:54 +08:00
4842b489d1 vga: remove V_SYNC defines 2023-12-24 20:32:52 +08:00
e340c3ca02 example: add icosphere 2023-12-24 17:48:20 +08:00
befedb9d38 example: add lighted cube
This also copy-pastes all of the math headers I originally wrote in
saturn-examples.
2023-12-24 16:24:27 +08:00
59f2819df3 main.lds: typo
palette.hpp: typo
2023-12-24 10:52:30 +08:00
3373ea4c0c font_outline_punch_through: implement punch through
This enables alpha blending for both font_outline and
font_outline_punch_through.

I have also experimented more with 16-gray vs 256-gray--I have not
decided which between monochrome, 16-gray, or 256-gray I like the
most.

Perhaps a better test might be to test hanzi.
2023-12-24 01:12:08 +08:00
dc85cad8b0 twiddle: use both src and dst value masks 2023-12-23 22:58:21 +08:00
15839ae6ca ttf_outline: rectangular textures must include all bytes
Previously, the texture was truncated, which caused spurious pixels to
appear in the last row(s) of the texture.
2023-12-23 22:24:59 +08:00
3a48e2bfd7 improve linker scripts
Previously, due to the ordering of .text.p2ram and .bss, the linker
was forced to allocate .bss in the output file, increasing the size
of the final binary unnecessarily.

The linker scripts now preserve debugging symbols during linking.
2023-12-23 22:03:15 +08:00
b484b5d4fe font_*: fully parameterize source/destination bit depth
After implementing this, I realized I don't like the appearance of the
monochrome font as much as the antialiased font.
2023-12-23 21:55:03 +08:00
ffbfcd9fd5 incomplete 1bpp font experiment 2023-12-23 18:30:21 +08:00
8f0afc2868 font_outline: remove all 1024/256/128 magic numbers
This fully threads both the real minimum size of the texture and the
dimensions of the texture through to the TA parameters.

This also removes spurious zero-area drawing commands (space
characters).
2023-12-22 23:54:39 +08:00
3b7e1eaef8 example: implement font_outline
This still needs to be cleaned up, particularly to properly pass the
texture size around--there are a few unnecessary '128x256' magic
numbers scattered in the code.
2023-12-22 00:03:52 +08:00
a8cceee46e twiddle: fully parameterize texture twiddling function
I think the original version is more readable, but the newer version
is better overall because it doesn't require reading from dst, and is
able to directly write to a 32-bit dst.
2023-12-21 11:18:56 +08:00
7e03eee3ed font_bitmap: use 4bpp palette 2023-12-20 22:39:47 +08:00
7330ccc8e0 font: update background_parameter and ta_polygon_converter_init calls 2023-12-18 20:46:38 +08:00
e2a6406a05 example: add macaw_cube_render_to_texture 2023-12-18 02:10:52 +08:00
88b6fa9aae memorymap: add texture_memory64 2023-12-17 23:04:19 +08:00
5c2b45b70d example: refresh
All examples work again, except macaw_multipass--this never worked
entirely, so I'm not worried about fixing it at the moment.
2023-12-17 22:45:52 +08:00
e4303dbcf1 cube: rename to macaw_cube 2023-12-17 22:20:56 +08:00
e1f205dfa9 test.c: delete
No longer relevant.
2023-12-17 22:14:59 +08:00
e5cf145b3d main: delete
All of this code moved to example/
2023-12-17 22:13:36 +08:00
aa805468d9 holly/core: use End of TSP interrupt
Core bug #20 is real:

  The "End_Of_Video" interrupt is sometimes not output.

  Replace with "End_Of_TSP
2023-12-17 22:09:03 +08:00
59f8c1b3ff cube: a perspective cube 2023-12-17 17:04:34 +08:00
2f7f0a6bdf example: add maple vibrator example 2023-12-17 12:57:06 +08:00
dec0f7c7a4 maple: add ft8 data transfer 2023-12-17 11:06:38 +08:00
5a9790daf1 examples: add font example 2023-12-17 02:03:42 +08:00
7daff7e3ca example: add macaw_twiddle 2023-12-16 23:28:28 +08:00
39aa6b75a6 example: new maple "get_condition" demo
This is very barebones, and uses the serial interface to communicate
the status of the "a" controller button being pressed.

I'd like to make this a more interactive/graphical demo.
2023-12-15 22:08:23 +08:00
9bd79c6664 maple: remove cruft from maple_wink
This also adds a new overload for align_32byte for integers.
2023-12-15 19:06:59 +08:00
5d1e2f7225 maple: init_block_write depends on 32-bit accesses
The <uint8_t> template instantiation was causing 8-bit writes to the
command buffer, when they were intended to be 32-bit writes. This
garbled and truncated the data ultimately sent to the VMU LCD.
2023-12-15 18:26:30 +08:00
2689ad4011 example: add maple_controller
This broke maple_wink. I have not yet found why this happened.
2023-12-15 17:13:53 +08:00
af07742575 add container.jpg and awesomeface.png 2023-12-15 13:31:00 +08:00
c5078cb030 example: add translucency example
The macaw_multipass example does not work on real hardware.
2023-12-14 20:57:44 +08:00
95a30b5164 example: add macaw_multipass
I don't like this example very much, but it was an interesting
experiment regardless.
2023-12-14 13:07:26 +08:00
9fc40136af example: add sprite example
This also adds ta_parameter_writer; I am not certain if I like this,
but it felt necessary to deal with ta_parameters being either 32 or 64
bytes long--for this reason, a reinterpret_cast to a union is less
attractive (the union members are not a fixed size).
2023-12-13 22:17:02 +08:00
3e9572673c example: add standalone "macaw" example 2023-12-12 22:54:04 +08:00