Video display modes: Difference between revisions
Added ARM Assembly for Game Boy Advance
Puppydrum64 (talk | contribs) (Added ARM Assembly for Game Boy Advance) |
|||
Line 43:
190 IF A$ <> "Q" THEN 100
200 TEXT</lang>
=={{header|ARM Assembly}}==
=== Game Boy Advance===
#[[https://mgba-emu.github.io/gbatek/#lcdiodisplaycontrol|GBATek Game Boy Advance Specifications]]
The video display mode is a 16 bit value that is written to address 0x04000000. The lowest 3 bits control the screen mode. There are 5 to choose from. Modes 0-1 use tile graphics, Mode 2 is similar to the famous "Mode 7" on the SNES, and Modes 3, 4, and 5 are bitmap modes much like 80s home computers where individual pixels can be edited. Visibility of the background layers are controlled by bits 8 through 12 (going from right to left).
For example, to set the screen to Mode 3 with Background 2 visible:
<lang ARM Assembly>
MOV R1,#0x04000000
MOV R0,#0x403
STR r1,[r0] ;the game boy advance is little-endian, so I would have expected this not to work. However it does indeed work.
=={{header|BBC BASIC}}==
|