Commit Graph

16 Commits

Author SHA1 Message Date
joevt
503556196a dbdma: Add missing flags, fields, comments. 2024-03-24 13:00:33 -07:00
joevt
2d8f2422b3 dbmda: Fix dma output res_count update.
Use this->res_count to track amount of data transferred.
2024-03-09 06:47:48 -07:00
joevt
0166059d1b dbdma: Add set_stat method.
A hardware device may have status flags connected to 8 status bits of the DBDMA engine.
2024-03-09 06:45:06 -07:00
joevt
29d13aef09 dma: Add is_active method for input channels.
Since DBDMA contains an input and output channel, rename the existing is_active method to is_out_active.
2024-03-09 06:20:13 -07:00
joevt
fb0396923f Fix dma STORE_QUAD and LOAD_QUAD.
When fetching DMA command, make sure to convert little endian fields to host endianness (i.e. don't use memcpy).
When fetching DMA command, return the host address of the DMA command for LOAD_QUAD. Maybe this address should be cached whenever this->cmdptr changes?
When fetching DMA command, return whether the DMA command is writable.
For LOAD_QUAD, pass the address of the DMA command to xfer_quad.
Always log unexpected DMA command values.
Write full 32-bit value for LOAD_QUAD.
Write reqCount to resCount.
2024-03-04 20:38:07 -07:00
joevt
b0dc893a05 dma: Add name to dma classes.
For logging purposes, each DMA channel should have a name.
2024-02-19 15:30:20 +01:00
Maxim Poliakovski
478bd31dc7 dbdma.h: add missing include. 2024-02-11 22:59:43 +01:00
Mihai Parparita
35c86ad6bf Clean up #includes
Result of running IWYU (https://include-what-you-use.org/) and
applying most of the suggestions about unncessary includes and
forward declarations.

Was motivated by observing that <thread> was being included in
ppcopcodes.cpp even though it was unused (found while researching
the use of threads), but seems generally good to help with build
times and correctness.
2023-11-03 00:33:47 -07:00
Maxim Poliakovski
b408a02ef9 dbdma: implement LOAD_QUAD, STORE_QUAD and NOP. 2023-09-30 17:09:45 +02:00
Maxim Poliakovski
9db3076a48 dbdma: support INT_SELECT & WAIT_SELECT registers. 2023-09-20 00:45:39 +02:00
Maxim Poliakovski
04acf120d6 dbdma: support optinal CommandPtrHi register.
It's written with zero in OS X. This dummy implementation
is meant to reduce log warnings.
2023-09-19 14:16:13 +02:00
Maxim Poliakovski
57ea3c2e66 dbdma: implement interrupt processing. 2023-04-22 22:52:03 +02:00
Maxim Poliakovski
71b2e6c1fa dbdma: implement optional command branching.
This feature is used by New World BootROMs for producing
error beeps with different duration and count.
2023-02-15 02:36:40 +01:00
Maxim Poliakovski
9f4c248e4c Rework DBDMA logic for bidirectional channels. 2022-11-17 18:03:18 +01:00
Maxim Poliakovski
c0cd6eb38f Add missing licence headers, update license date. 2021-10-23 21:00:31 +02:00
Maxim Poliakovski
9329d56d83 Move devices into dedicated subdirectories. 2021-10-23 20:17:47 +02:00