253 Commits

Author SHA1 Message Date
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
d73b41a6ab regs: add missing ods files 2024-05-19 15:08:38 -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
5c192ffd2e text_editor: initial gap buffer implementation 2024-05-19 14:20:27 -05:00
a0d516803b example: remove frame_ix double semicolon 2024-05-19 08:42:07 -05:00
39e97a3f1b font_outline*: fix examples
Fix frame_ix increment.

Remove unncessary differences between the two examples.
2024-05-19 08:40:44 -05:00
0510598233 generic_sparse_struct: constexpr constructors
ta_polygon_converter_transfer: const buf
2024-05-19 08:23:13 -05:00
b874ec56b5 common: remove subalign from data/rodata
SUBALIGN in the linker script overrides __attribute__((aligned(...)))
2024-05-19 08:22:05 -05:00
a4ae84124a example: add texture_filtering and texture_filtering_maple 2024-05-12 17:39:52 +08: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
c8e84be5d2 common.lds: define vbr alignment
This also creates an example of a VBR+0x100 function in interrupt.cpp
2024-04-15 18:22:28 +08:00
c1e3e9d074 start.s: rename p1ram_end_ptr to stack_end_ptr 2024-04-15 18:20:25 +08:00
5e54666822 runtime_init: call cache::init before copying
It is unclear why this reordering is useful--it should be the case
that the previous content of the cache is invalidated on write
regardless of when cache::init is called.
2024-04-15 18:17:32 +08:00
bd33fbf2e4 example/font_bitmap: remove unintentional padding between characters
At 4bpp, each 8×8px character only requires (8 * 8 / 2) bytes of
texture ram.
2024-04-15 18:16:13 +08:00
1a7a8c4484 serial_transfer: add 'rate' command
This makes it possible to change the serial baud rate without
uploading a new serial transfer program. I'm not sure how useful this
will be, but it is simple enough to add.

The client program is also substantially improved. Sincerely I do not
understand how/why this works. Experimentally, I found that feeding
the ft232h data in chunks of up to roughly 384 bytes works reliably,
both for reads and writes. Larger chunk sizes are (as expected)
faster, but the tranfers do not appear to be consistently correct in
this case.

I have no logical explanation for this. The size of the ft232h FIFO is
1K each for the transmit and receive buffer respectively.

This also enables RTS/CTS hardware flow control. Surprisingly, this
doesn't appear to affect reliability significantly.
2024-03-15 18:33:15 +08:00
328e9e18bd client: chunked writes
This client-side code alone improves the typical transfer speed of a
51572-byte file from 91.85 seconds to 25.89 seconds.

This appears to be heavily bottlenecked by the python side of the
transfer--increasing the serial line speed has nearly zero affect on
the total transfer time.
2024-03-13 21:29:12 +08:00
d912278afd serial_transfer: self-relocate to the end of system memory
The serial_transfer loader, as long as the target program voluntarily
terminates itself at some point, is able to load multiple programs
consecutively without requiring a physical power cycle to reload the
transfer program from CD.

The current example.mk juggles between two different "memory layouts",
one for "burn to a physical CD" and another for "load via serial
cable". Because the serial_transfer program now relocates itself to
the end of system memory, this means the 0x8c010000 area is now usable
by programs that are loaded by serial_transfer.
2024-03-13 20:56:37 +08:00
0806ed9ac7 example: verify everything compiles successfully 2024-03-09 19:05:41 +08:00
57a8862ac3 modifier_volume: fix example 2024-03-09 18:42:44 +08:00
3a92dd070c macaw_multipass: fix example
The prior issue with this example was almost certainly related to OPB
overflow, due to an incorrect tile area calculation.
2024-03-09 18:39:46 +08:00
ae7f35191d example/sprite: update 2024-03-09 18:16:44 +08:00
f8dc9f1250 example: add video_output example
The intent of this example is to change video output modes in response
to swapping the cable type.
2024-03-09 17:15:36 +08:00
2a121625c8 suzanne_profile: correct periperipheral comment 2024-03-09 09:19:48 +08: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
eafd4e6f23 holly: add video output data 2024-03-08 16:17:59 +08:00
0deedb9858 serial_transfer: increase serial line speed to 312500 bps
Interestingly, this did not cause a perceptible improvement in the
overall data transfer rate.
2024-03-04 16:44:03 +08:00
0ff0aa5346 example/aica_gdrom: play audio read from gdrom
This still has issues, notably:

Despite the first 16kbytes of audio being loaded prior to starting the
AICA ARM7 CPU, the GDROM drive returns "busy" for the following
~48kbytes. This in turn causes the AICA to play audio from
uninitialized memory.

There is also a separate issue where the timing of changing the start
address of the audio channel causes a faint popping sound throughout
the audio playback.

I should do more timing experiments with the GDROM drive, and improve
this example to play the audio with fewer artifacts.
2024-03-04 16:40:25 +08:00
0aea1d0db2 example/aica_gdrom: initial
aica_gdrom currently copies from system ram to AICA ram, 128 bytes at
a time, synchronized with the AICA sample timer.
2024-03-01 19:38:47 +08:00
73a685face aica: use SCIPD to detect TIMA overflow
Real hardware does not support TIMA reads--SCIPD is the correct way to
achieve this.
2024-03-01 15:26:47 +08:00
57721c485f example/arm: rename to channel 2024-02-29 17:32:54 +08:00
150a415433 example/arm/Makefile: remove implicit "circular dependency" 2024-02-29 17:27:06 +08:00
3338b611c1 aica: initial working example
This plays 10 seconds of PCM audio via the AICA ARM CPU.
2024-02-29 16:51:25 +08:00
5b696f7c0d aica: initial register definitions 2024-02-28 21:37:26 +08:00
8feda3b29a regs: add aica common and aica rtc 2024-02-28 15:34:32 +08:00
ec4dbee01b regs: add aica_channel_data spreadsheet 2024-02-27 21:38:39 +08:00
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
c45cb293f0 gdrom/command_packet_format: improve initializer; add _data() method 2024-02-26 20:32:33 +08:00
41b707e75d gdrom: add gdrom_bits 2024-02-26 18:04:23 +08:00
c95182081a gdrom: add gdrom_command_packet_format.hpp
This re-uses most of the code from the ta_parameter_format
generator--this was factored out to "generic_sparse_struct.py".
2024-02-26 15:31:40 +08:00
1a75b90efc iso9660: basic directory traversal 2024-02-26 14:19:31 +08:00
d622ee04a7 regs/gen: factor out read_input to a new module, csv_input 2024-02-26 14:19:05 +08:00
7e27e40b4e iso9660: new spreadsheets 2024-02-25 19:52:36 +08:00
5a32d6816b common.mk: fully parameterize scramble rule 2024-02-25 14:00:40 +08:00