.include "snes.inc" .include "snes_zvars.inc" .export DMAtoVRAM, DMAtoRAM .segment "XCODE" .a8 .i16 ;****************************************************************************** ; copy data to vram with DMA ; ; a,y = ROM address ; x = VRAM address (words!) ; m0 = size (bytes) ;****************************************************************************** DMAtoVRAM: ;------------------------------------------------------------------------------ sta REG_A1B7 ; set transfer source sty REG_A1T7L ;-------------------------------------- stx REG_VMADDL ; set vram address ;------------------------------------------------------------------------------ lda #80h ; increment when writing higher byte sta REG_VMAIN ;-------------------------------------- ldx m0 ; set transfer size stx REG_DAS7L ;-------------------------------------- lda #