Refactored DMA code.

This commit is contained in:
SarahW 2018-03-11 09:43:54 +00:00
commit 4182b10e10
2 changed files with 423 additions and 345 deletions

779
src/dma.c

File diff suppressed because it is too large Load diff

View file

@ -328,27 +328,24 @@ float pit_timer0_freq();
/*DMA*/ /*DMA*/
typedef struct DMA typedef struct dma_t
{ {
uint32_t ab[4],ac[4]; uint32_t ab, ac;
uint16_t cb[4]; uint16_t cb;
int cc[4]; int cc;
int wp; int wp;
uint8_t m,mode[4]; uint8_t m, mode;
uint8_t page[4]; uint8_t page;
uint8_t stat, stat_rq; uint8_t stat, stat_rq;
uint8_t command; uint8_t command;
int size;
int xfr_command, xfr_channel; uint8_t ps2_mode;
int byte_ptr; uint8_t arb_level;
uint16_t io_addr;
int is_ps2; } dma_t;
uint8_t arb_level[4];
uint8_t ps2_mode[4];
} DMA;
DMA dma,dma16;
dma_t dma[8];
/*PPI*/ /*PPI*/
typedef struct PPI typedef struct PPI