38 Commits

Author SHA1 Message Date
05e0a36ca7 wiffle_screen_space: use DMA for transfers to/from texture memory 2025-01-25 20:51:30 -06:00
8f95b5a2b2 append_command_all_ports: add optional set_end_flag argument 2024-12-08 17:31:00 -06:00
d32bd87baa example: add UBC experiment 2024-11-12 20:37:40 -06:00
cfe9c07dfe ftdi_transfer: implement maple storage dumps 2024-11-11 19:32:17 -06:00
c713a084d8 serial_transfer: implement "maple_raw" command 2024-11-10 20:18:23 -06:00
8027c591e8 ftdi_transfer: add command line parsing 2024-11-01 13:09:27 -05:00
fc536bd93a example: restore several examples
The dump_* examples were removed because the serial_transfer example now handles
that use-case more generically.
2024-10-27 01:17:59 -05:00
b133879f7e serial_transfer: fully asynchronous maple display write 2024-10-22 04:19:37 -05:00
ebb1955500 chess: cursor axis inversion, initial "animator" concept 2024-06-02 10:13:47 -05:00
5e80d9ecfc chess: add annotations, multiple pointers, translucency 2024-06-01 19:24:43 -05:00
40b7c9d800 example: add maple_mouse
This also updates maple_analog.
2024-05-24 18:18:29 -05:00
ea51bca518 example/maple_storage: initial example 2024-05-23 11:47:19 -05:00
be8f06e486 example: add maple_storage example 2024-05-21 19:09:48 -05:00
643ad0e9fb text_editor/keyboard: use new maple interface 2024-05-21 15:36:04 -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
b5ac43c109 text_editor: refactor render/transform 2024-05-20 11:26:19 -05:00
11b858533e gap_buffer: the cursor can jump vertically to adjacent lines 2024-05-20 04:46:40 -05:00
ad5b98b5ea maple: add maple_bus_ft6_key_scan_codes 2024-05-19 21:55:36 -05:00
dd55208f39 maple: add maple_bus_ft6 2024-05-19 15:08:22 -05:00
d2ee2c9fe5 maple: regenerate ft0/ft8 2024-05-19 14:59:33 -05:00
c0e10fe8f1 vga: delete
This is replaced with the (slightly cleaner) holly/video_output.
2024-03-08 20:46:55 +08:00
db323c85c5 dve: initial description of DVE bits
This also implements primitive cable-detection and video output.
2024-03-08 18:27:12 +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
1f6a29f379 example: update several examples 2024-01-03 23:32:37 +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
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
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
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
855cbba403 maple: write data to a VMU display
This draws a smiley-face bitmap to a VMU display on port 1.
2023-12-11 18:07:05 +08:00
25fef821b0 maple: read controller input on real hardware
There were two notable bugs:

- the maple transfer/data sizes were not being set correctly

- align_32byte always realigned the address of `_scene`, and not the
  `mem` parameter as expected. This had the effect of the maple-DMA
  send and receive buffers being the same buffer. On real hardware,
  this causes unpredicable behavior.
2023-12-10 00:44:33 +08:00
ca77db1734 maple: add maple_host_bits 2023-12-09 17:05:34 +08:00
481a0cb0dc move maple definitions to a new maple/ directory
maple.cpp now uses the new maple_bus_commands.h
2023-12-09 16:38:57 +08:00