#11023 - jimmy-bucket - Tue Sep 23, 2003 6:32 pm
Hi all, ive been playing around with GBA asm for a while and I'm currently trying to plot pixels on the screen.
I did try using str, but it plotted one pixel, and set the ajacent one black, no good when overlayed over another line.
I'm using strb and it plots just the single pixel (or line of them) but turns the pixels a different colour. Here is the code:
How can i have a single pixel of the same colour?
Thanks, Kieren
I did try using str, but it plotted one pixel, and set the ajacent one black, no good when overlayed over another line.
I'm using strb and it plots just the single pixel (or line of them) but turns the pixels a different colour. Here is the code:
Code: |
@include screen.h ; Setup screen ldr r1,=REG_DISPCNT ldr r2,=(MODE_3|BG2_ENABLE) str r2,[r1] ; red pixel, screen cordinates and amount ldr r1,=0x00F ldr r0,=VRAM+2410 ldr r10,=230 ; draws a horizontal line label2: strh r1,[r0]+2! subs r10, r10, 1 bne label2 ldr r0,=VRAM+2410 ldr r10,=150 ; draws a vertical line but the colours are wrong label1: strb r1,[r0]+480! subs r10, r10, 1 bne label1 infiniteloop b infiniteloop |
How can i have a single pixel of the same colour?
Thanks, Kieren