Created
December 1, 2016 03:19
-
-
Save yuriks/a130ac294bc4d3d4fe278094424f72f6 to your computer and use it in GitHub Desktop.
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
/// Initialize hardware | |
void Init() { | |
memset(&g_regs, 0, sizeof(g_regs)); | |
auto& framebuffer_top = g_regs.framebuffer_config[0]; | |
auto& framebuffer_sub = g_regs.framebuffer_config[1]; | |
// Setup default framebuffer addresses (located in VRAM) | |
// .. or at least these are the ones used by system applets. | |
// There's probably a smarter way to come up with addresses | |
// like this which does not require hardcoding. | |
framebuffer_top.address_left1 = 0x181E6000; | |
framebuffer_top.address_left2 = 0x1822C800; | |
framebuffer_top.address_right1 = 0x18273000; | |
framebuffer_top.address_right2 = 0x182B9800; | |
framebuffer_sub.address_left1 = 0x1848F000; | |
framebuffer_sub.address_left2 = 0x184C7800; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment