90 Commits

Author SHA1 Message Date
10d17d3c98 example: add gdrom_iso9660
This combines my iso9660 parsing code, with all of the prior gdrom packet
interface / command code.

The example, on real Dreamcast hardware, displays the first 2048 bytes [1] of every
file in the root directory on the serial console.

[1] or the size of the file, whichever is smaller
2024-02-27 00:28:39 +08:00
e4c2a047fa example: add gdrom_test
This successfully reads the first 17 sectors of the first data track
of a CD.
2024-02-25 13:27:39 +08:00
38b4dda6ab software_ta: gouraud shading experiment 2024-02-24 09:31:21 +08:00
59708cc3cf examples: add software_ta 2024-02-23 23:47:43 +08:00
4e71e002bf examples: add dump_object_list 2024-02-23 18:14:24 +08:00
511d99563d maple_bus_commands: zero-sized structs should be zero sized
From the GCC manual.

> GCC permits a C structure to have no members:

struct empty {
};

> The structure has size zero. In C++, empty structures are part of the
> language. G++ treats empty structures as if they had a single member of type
> char.

I was not aware of the different behavior in C++.

This fixes every maple example--most were broken for multiple reasons, including
this one.

This also enables SH4 caching. This includes linking code/data into the P1
area (previously this was not the case).

The maple examples (which indeed involve much use of DMA) require much work to
successfully work with the operand and copyback caches. The vibration example
currently is the most complete, though I should consider more on how I want to
structure maple response operand cache invalidation more generally.
2024-02-02 22:05:10 +08:00
b17e075138 add verite font
There are still texture sampling issues that I don't understand. Until
I properly understand this, using (bitmap) fonts that have
power-of-two dimensions seem to produce "acceptable but incorrect"
results.
2024-02-02 09:19:09 +08:00
f400fe6412 example: suzanne_profile: incomplete
This has turned in to an experiment related to texture sampling behavior on the
Dreamcast.
2024-02-02 08:18:18 +08:00
0381d356bb example: add clipping_textured 2024-01-27 12:20:15 +08:00
4842ab0e4f example: add clipping2
Unlike the previous clipping example, this clipping example preserves
surface normals.
2024-01-27 10:20:46 +08:00
6836790205 add viewing_system
This is inspirted by the book "3D Computer Graphics" by Alan Watt.
2024-01-06 18:43:57 +08:00
c9b57abf81 example: add clipping 2024-01-06 11:32:41 +08:00
1f6a29f379 example: update several examples 2024-01-03 23:32:37 +08:00
0b6c650ebd common.mk: add headless csv build rule 2024-01-01 00:58:10 +08:00
e8aea009c6 example: add heart
I originally planned to make this a render-to-texture demo, but this
is fairly interesting by itself.
2023-12-31 20:19:41 +08:00
b6457bf687 modifier_volume_with_two_volumes: add simple controller input
The plane can be moved around with the analog stick and analog
triggers of the controller connected to port 1.
2023-12-30 23:08:13 +08:00
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
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
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
ffbfcd9fd5 incomplete 1bpp font experiment 2023-12-23 18:30:21 +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
7e03eee3ed font_bitmap: use 4bpp palette 2023-12-20 22:39:47 +08:00
e2a6406a05 example: add macaw_cube_render_to_texture 2023-12-18 02:10:52 +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
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
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
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
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
25e299feba new "example" directory
This is a reshuffling of filenames, extensions, paths, make rules,
just because I felt like it.
2023-12-12 21:50:39 +08:00