10 Commits

Author SHA1 Message Date
be8f06e486 example: add maple_storage example 2024-05-21 19:09:48 -05:00
9801557535 maple: slightly refactor maple command initialization
This adopts a "writer" concept, vaguely inspired by the ta parameter
writer. This might turn out to be not a great idea if the
response/offsets for heterogenous commands are too inconvenient to
keep track of.

This breaks every example that uses maple--only
example/maple_controller is updated to use the new interface.
2024-05-21 15:05:25 -05:00
a0d516803b example: remove frame_ix double semicolon 2024-05-19 08:42:07 -05:00
bcaa9789cf texture_memory_alloc: rework texture memory allocation
The previous texture_memory_alloc.hpp was written based on an
incorrect understanding of the "32-bit" and "64-bit" texture memory
address mapping.

The primary motivation is to rearrange the texture memory address map
so that "textures" (64-bit access) do not overlap with 32-bit
accesses, such as REGION_BASE or PARAM_BASE.
2024-05-12 17:06:00 +08:00
c0e10fe8f1 vga: delete
This is replaced with the (slightly cleaner) holly/video_output.
2024-03-08 20:46:55 +08:00
31eb0df508 maple: remove all remaining uses of the two-argument "dma_start"
After thinking about this more, I realized it is probably never useful, and
certainly completely incorrect in all of the cases it was still being used in
the examples.
2024-02-03 10:15:39 +08:00
dfc14d8658 maple: move ocbp inline assembly to dma_start
Necessarily, this means that dma_start must now know what the size of the
response is, so that it can issue the appropriate number of ocbp instructions.

This also cleans up the inconsistent _command_buf and _recieve_buf declarations.
2024-02-03 09:52:21 +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
62f47f8f0b example/clipping: face_vtn 2024-02-02 08:36:51 +08:00
c9b57abf81 example: add clipping 2024-01-06 11:32:41 +08:00