diff --git a/abstract-machine/am/src/platform/nemu/ioe/gpu.c b/abstract-machine/am/src/platform/nemu/ioe/gpu.c index 18905c1..fb50ee0 100644 --- a/abstract-machine/am/src/platform/nemu/ioe/gpu.c +++ b/abstract-machine/am/src/platform/nemu/ioe/gpu.c @@ -33,7 +33,7 @@ void __am_gpu_fbdraw(AM_GPU_FBDRAW_T *ctl) { GET_W(w); for (int i = 0; i < ctl->h; i++) { for (int j = 0; j < ctl->w; j++) { - outl((uint32_t)FB_ADDR + ((ctl->y + j) * w + (ctl->x + i)), ((uint32_t)ctl->pixels + (w * j + i))); + outl((uint32_t)FB_ADDR + ((ctl->y + i) * w + (ctl->x + j)), (uint32_t)ctl->pixels + (w * i + j)); } } if (ctl->sync) {