This Code works great and outputs the pixels as expected:
int main(){ *(unsigned int *)0x04000000 = 0x0403; unsigned short *Screen = (unsigned short *)0x06000000; Screen[120 + 80 * 240] = 0x001F; Screen[136 + 80 * 240] = 0x03E0; Screen[120 + 96 * 240] = 0x7C00; Screen[100] = 0x7C00; while (1); return 0;}
but whenever I try to add the for loop and change the vram values from within that, I get white screen on the emulator, it compiles with no errors and even warnings, but I get white screen on the emulator.
int main(){ *(unsigned int *)0x04000000 = 0x0403; unsigned short *Screen = (unsigned short *)0x06000000; Screen[120 + 80 * 240] = 0x001F; Screen[136 + 80 * 240] = 0x03E0; Screen[120 + 96 * 240] = 0x7C00; Screen[100] = 0x7C00; int i; for (i = 100; i < 110; i++) { Screen[i] = 0x7C00; } while (1); return 0;}