Created
January 17, 2011 00:46
-
-
Save robotarmy/782320 to your computer and use it in GitHub Desktop.
strange animation - what is happening to the machine?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.arm | |
.align | |
.global initSystem | |
.global main | |
initSystem: | |
bx lr | |
main: | |
mov r0,#0x04000000 @ I/O space offset | |
mov r1,#0x3 @ Both screens on | |
mov r2,#0x00020000 @ Framebuffer mode | |
mov r3,#0x80 @ VRAM bank A enabled, LCD - bit 8 on | |
str r1,[r0, #0x304] @ Set POWERCNT # couldn't find reference to this in gbatek | |
str r2,[r0] @ DISPCNT # | |
str r3,[r0, #0x240] @ VRAMCNT_A # | |
mov r0, #0x06800000 @ VRAM offset | |
mov r1, #0x00 @ Writing pixel value | |
mov r2, #0xffffff @ number of pxels | |
mov r3, #0x200 | |
lp: strh r1, [r0], #128 @ Write a pixel in - increment r0 by #128 | |
subs r3, r3, #1 @ decrement r2 - update flags | |
beq next_color | |
subs r2, r2, #1 @ decrement r2 - update flags | |
bne lp @ branch if not equal (is it checking the flags??) | |
next_color: | |
mov r1, r2 | |
mov r3, #0x204 | |
subs r2, r2, #1 @ decrement r2 - update flags | |
bne lp @ branch if not equal (is it checking the flags??) | |
nf: b nf @ Sit in an infinite loop to finish |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment