Files
TeslaRel410/sda4/DPL3/VRENDER/PXPL5SUP/DMAENGN.H
T
CydandClaude Fable 5 db7745fcd0 sda4: commit the Glaze developer hard-drive dump
Un-ignored: the dev drive is the ground truth the restoration and
emulator work constantly reference (DPL3/LIBDPL + VRENDER i860 renderer
source, BT/RP live+dev game trees, VGL_LABS pod boot, scene/audio
content). Kept in-repo for the pod-owner community.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-04 19:41:15 -05:00

47 lines
1.3 KiB
C++

#ifndef DMAengn_h
#define DMAengn_h
#define DMA_GOTO_VAL 0x00000000
#define DMA_SEND_VAL 0x10000000
#define DMA_SENDE_VAL 0x90000000
#define DMA_TILE_VAL 0x20000000
#define DMA_TXDN_VAL 0x30000000
#define DMA_RETE_VAL 0x70000000
#define DMA_STOP_VAL 0xf0000000
#define DMA_FLUSH_VAL 0x60000000
#define DMA_WAIT_VAL 0x80000000
#define DMA_CMD_MASK 0xf0000000
#define DMA_SIZE_MASK 0x7f
#define DMA_GOTO (DMA_GOTO_VAL)
#define DMA_SEND(size) (DMA_SEND_VAL|(size))
#define DMA_SENDE(size) (DMA_SENDE_VAL|(size))
#define DMA_TILE (DMA_TILE_VAL)
#define DMA_TXDN (DMA_TXDN_VAL)
#define DMA_RETE(cpu) (DMA_RETE_VAL|((cpu)<<28))
#define DMA_STOP(cpu) (DMA_STOP_VAL|((cpu)<<28))
#define DMA_FLUSH (DMA_FLUSH_VAL)
#define DMA_WAIT (DMA_WAIT_VAL)
#define DMAop_0(reg,op) \
or (op())&0xffff, r0, reg; \
orh ((op())>>16)&0xffff, reg, reg
#define DMAop_1(reg,op,a) \
or (op(a))&0xffff, r0, reg; \
orh ((op(a))>>16)&0xffff, reg, reg
#define DMAsend_reg(destreg,countreg) \
shl r0, r0, destreg; \
orh (DMA_SEND_VAL >> 16), destreg, destreg; \
or countreg, destreg, destreg
#define DMAsend_poly(destreg,coeff0, coeffptr) \
adds 7, coeffptr, r31; \
subs r31, coeff0, r31; \
shl 3, r31, destreg; \
orh (DMA_SEND_VAL >> 16), destreg, destreg
#endif