However, i think each fourth line, it moves one step to the right.
Feels like this puts data on places in the memory buffer where it should not be, so test on your own risk
Code: Select all
Structure Lung
l.l
EndStructure
Procedure DMAPoint32(x.w, y.w, addr.l, bpl.w)
*memaddr.Lung = (addr.l + (y.w * bpl.w) + (x.w * 4))
ProcedureReturn *memaddr\l
EndProcedure
Procedure DMADraw32(x.w, y.w, addr.l, bpl.w, color.l)
*memaddr.Lung = (addr.l + (y.w * bpl.w) + (x.w * 4))
*memaddr\l = color.l
EndProcedure
InitSprite()
OpenScreen(640, 480, 32, "TesttheDMA")
StartDrawing(ScreenOutput())
addr.l = DrawingBuffer()
bpl.w = DrawingBufferPitch()
bpp.b = 4
FillArea(0,0,1, RGB(0,0,255))
Start.l = GetTickCount_()
For x = 0 To #ScreenX - 1
For y = 0 To #ScreenY - 1
DMADraw32(x, y, addr.l, bpl.w, RGB(0,0,255))
Next y
Next x
Debug GetTickCount_() - Start.l
FlipBuffers()
Delay(3000)

