diff options
author | StapleButter <thetotalworm@gmail.com> | 2017-01-18 17:57:12 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2017-01-18 17:57:12 +0100 |
commit | d7c1d2a2cdb39c5e0bc6c3711968b876485d758a (patch) | |
tree | ed7f95ad0cf489535c4637e25279419f6974659b /main.cpp | |
parent | d30e6956fa59182a23941a535d5f6c2bf515918a (diff) |
* start GPU shit: draw BG0 16-color.
* fix a few DMA bugs.
* fix a bug where some code could still run right after a halt instruction.
* fix VRAM mapping, too. I'm an idiot.
Diffstat (limited to 'main.cpp')
-rw-r--r-- | main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -34,6 +34,12 @@ LRESULT CALLBACK derpo(HWND window, UINT msg, WPARAM wparam, LPARAM lparam) { case WM_CLOSE: printf("close\n"); + { + FILE* f = fopen("vram.bin", "wb"); + for (int i = 0; i < 128; i++) + fwrite(GPU::VRAM_BBG[i], 16384, 1, f); + fclose(f); + } PostQuitMessage(0); return 0; @@ -46,6 +52,7 @@ LRESULT CALLBACK derpo(HWND window, UINT msg, WPARAM wparam, LPARAM lparam) case VK_DOWN: NDS::PressKey(7); break; case VK_LEFT: NDS::PressKey(5); break; case VK_RIGHT: NDS::PressKey(4); break; + case 'P': NDS::PressKey(16+6); break; } return 0; @@ -58,6 +65,7 @@ LRESULT CALLBACK derpo(HWND window, UINT msg, WPARAM wparam, LPARAM lparam) case VK_DOWN: NDS::ReleaseKey(7); break; case VK_LEFT: NDS::ReleaseKey(5); break; case VK_RIGHT: NDS::ReleaseKey(4); break; + case 'P': NDS::ReleaseKey(16+6); break; } return 0; |