Skip to content

VGA interface: How do I go from register documentation to xreg() function calls, and vice versa? #44

Answered by michaelsarr
vruumllc asked this question in Q&A
Discussion options

You must be logged in to vote

ill give it a shot ,

the first 3 parameters identify the register the 4th is the value
xreg(1, 0, 0, 2); //set register 1:0:0 with the value 2 , CANVAS. this is 320x180
device 1, channel 0, address 0 set it to 2

// this sets several values at once
// the first 3 parameters identify the device , channel and address
the 4th ,5th, 6th ... are the values to set... address is incremented
xreg(1, 0, 1, 3, 2, 0xFF00, 0, 0, 140);

device 1, channel 0, address 1 set to 3 (MODE 3 Bitmap)
(since we are mode 3 look up the following from the mode 3 section of the vga documentation)
device 1, channel 0, address 2 set to 2 (OPTIONS 2 - 8 bit color )
device 1, channel 0, address 3 set to 0xFF00 ( CONFIG a…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@vruumllc
Comment options

@vruumllc
Comment options

@michaelsarr
Comment options

@vruumllc
Comment options

Answer selected by vruumllc
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants