diff --git a/compiler/res/prog8lib/cx16/gfx2.p8 b/compiler/res/prog8lib/cx16/gfx2.p8 index 02d88add8..ae8e4f665 100644 --- a/compiler/res/prog8lib/cx16/gfx2.p8 +++ b/compiler/res/prog8lib/cx16/gfx2.p8 @@ -272,10 +272,10 @@ gfx2 { sub set_both_strides(ubyte stride) { stride <<= 4 - cx16.VERA_CTRL = 0 - cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | stride cx16.VERA_CTRL = 1 cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | stride + cx16.VERA_CTRL = 0 + cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | stride } } diff --git a/compiler/res/prog8lib/cx16/monogfx.p8 b/compiler/res/prog8lib/cx16/monogfx.p8 index c21c691d9..61167294b 100644 --- a/compiler/res/prog8lib/cx16/monogfx.p8 +++ b/compiler/res/prog8lib/cx16/monogfx.p8 @@ -358,10 +358,10 @@ drawmode: ora cx16.r15L sub set_both_strides(ubyte stride) { stride <<= 4 - cx16.VERA_CTRL = 0 - cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | stride cx16.VERA_CTRL = 1 cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | stride + cx16.VERA_CTRL = 0 + cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & %00000111 | stride } } @@ -957,15 +957,15 @@ cdraw_mod2 ora cx16.VERA_DATA1 sub set_autoincrs() { ; set autoincrements to go to next pixel row (40 or 80 increment) if width==320 { - cx16.VERA_CTRL = 0 - cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & $0f | (11<<4) cx16.VERA_CTRL = 1 cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & $0f | (11<<4) + cx16.VERA_CTRL = 0 + cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & $0f | (11<<4) } else { - cx16.VERA_CTRL = 0 - cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & $0f | (12<<4) cx16.VERA_CTRL = 1 cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & $0f | (12<<4) + cx16.VERA_CTRL = 0 + cx16.VERA_ADDR_H = cx16.VERA_ADDR_H & $0f | (12<<4) } } }