diff options
| author | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-27 21:22:55 +1000 |
|---|---|---|
| committer | Melodi <62381002+Melodi17@users.noreply.github.com> | 2025-08-27 21:22:55 +1000 |
| commit | 634681ce2bb36cd686943102a0f071cd6a09049f (patch) | |
| tree | 6710047aa231d50f57114bdd54a27c559fb20a73 /ROMs/hid.c | |
| parent | 94ddc02e03ab942d0c881e29053e8df3d2940c30 (diff) | |
fixed bugs and revolutionized the universe
Diffstat (limited to 'ROMs/hid.c')
| -rw-r--r-- | ROMs/hid.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ROMs/hid.c b/ROMs/hid.c new file mode 100644 index 0000000..615808a --- /dev/null +++ b/ROMs/hid.c @@ -0,0 +1,34 @@ +int setPixel(int x, int y, int c) +{ + char* screenStart = 0x402F; + int i = (y * 128) + x; + screenStart[i] = c; +} + +int setPixelIndex(int i, int c) +{ + char* screenStart = 0x402F; + screenStart[i] = c; +} + +int clear(int c) +{ + char* screenStart = 0x402F; + char screenSize = 64 * 128; + for (int i = 0; i < screenSize; i++) + { + screenStart[i] = c; + } +} + +int main() +{ + while (1) + { + int* hid = 0x602F; + int mouseIndex = hid[0]; + int mouseState = hid[1]; + if (mouseState & 1 == 1) + setPixelIndex(mouseIndex, 1); + } +}
\ No newline at end of file |
