open_agb_firm/libn3ds/source/arm11/drivers/lgyfb_240x160.dma330

36 lines
831 B
Plaintext

# 8 bytes burst with 16 transfers. Total 128 bytes per burst.
# Source fixed address and destination incrementing.
# Source and destination unprivileged, non-secure data access.
MOV CCR, SB16 SS64 SAF SP2 DB16 DS64 DAI DP2
MOV SAR, 0x10311000
MOV DAR, 0x18200000
FLUSHP 14
# Loop until the entire frame has been transferred.
LP 20 # For height 160.
# Wait for a burst request.
WFP 14, burst
# Transfer 8 scanlines.
# For width 240:
#LP 29 # RGB5551 & RGB565, 128 bytes burst
LP 44 # RGB8, 128 bytes burst
#LP 59 # RGBA8, 128 bytes burst
LD
ST
LPEND
LDPB 14 # This must always be conditional on bursts. No idea why. Assembler bug?
ST
# Skip gaps swizzle edition™.
# For width 240 with 256x256 texture:
#ADDH DAR, 0x100 # RGB5551 & RGB565
ADDH DAR, 0x180 # RGB8
#ADDH DAR, 0x200 # RGBA8
LPEND
WMB
SEV 0
END