-#else
-static int map_vram(void)
-{
- gpu.vram = vram_ptr_orig = (uint16_t*)calloc(VRAM_SIZE + (VRAM_ALIGN-1), 1);
- if (gpu.vram != NULL) {
- // 4kb guard in front
- gpu.vram += (4096 / 2);
- // Align
- gpu.vram = (uint16_t*)(((uintptr_t)gpu.vram + (VRAM_ALIGN-1)) & ~(VRAM_ALIGN-1));
- return 0;
- } else {
- fprintf(stderr, "could not allocate vram, expect crashes\n");
- return -1;
- }
-}
-
-static int allocate_vram(void)
-{
- gpu.vram = vram_ptr_orig = (uint16_t*)calloc(VRAM_SIZE + (VRAM_ALIGN-1), 1);
- if (gpu.vram != NULL) {
- // 4kb guard in front
- gpu.vram += (4096 / 2);
- // Align
- gpu.vram = (uint16_t*)(((uintptr_t)gpu.vram + (VRAM_ALIGN-1)) & ~(VRAM_ALIGN-1));
- return 0;
- } else {
- fprintf(stderr, "could not allocate vram, expect crashes\n");
- return -1;
- }
-}
-#endif