unable to get the framebuffer

Programming, for all ages and all languages.
Post Reply
SmolChicken45
Posts: 4
Joined: Sat Jun 27, 2026 10:07 am
Libera.chat IRC: SmolChicken45

unable to get the framebuffer

Post by SmolChicken45 »

I am making a bootable game. I'm still in the early stage of getting a program to work. I still don't know what i'm doing for setuping and compiling the code so i'm using gemini for that part which doesn't work.

Setup:
I have a build script that gives me an iso: the assembly, the linker, copying files into a folder to make an iso and adding a boot sector
the iso is then run into vmware workstation pro as a "CD/DVD Drive"

Programs:
- limine v4.20230909.0. (i have the limine-deploy.exe used in the script and both (limine.sys, limine-cd.bin) in the folder of the iso)
-nasm-3.01 (my assembler)
-ld.lld.exe (the linker)
-xorriso.exe (the iso maker)

The problem:
when I boot the iso, I get into launched into limine, which is great, I can also start my program. Of what gemini told me, I prepared a requests for getting the framebuffer address (getting a screen?) however, at the response address, I get a 0. my code does verify for that case and makes my CPU halt, which is how I know I don't have a screen to write on.

main.asm looks like this

Code: Select all

[BITS 64]
DEFAULT REL

section .limine_reqs progbits alloc noexec write
align 8
    dq framebuffer_request                               ; if i understand this is all of the resquests
    dq 0

section .data
align 8
framebuffer_request:
    dq 0xc7b1dd30df4c8b88     ; magic numbers apparently first 2 are common for all request other 2 for the framebuffer?
    dq 0x0a82e883a194f07b
    dq 0x9d5827dcd881dd1f
    dq 0xafb1aa5a1b8eea61
    dq 0
    dq 0                                          ; response address? so [framebuffer_request + 40]


section .text
global _start

_start: 

    mov rax, [framebuffer_request + 40]
    test rax, rax
    jz .halt           ; i know the code takes that path, i only have 1 hlt in my code

   ; ... rest of my code



.halt:
    hlt
    jmp .halt

I don't really know what is usefull information to give, so i'll give the the github repo link : https://github.com/SmolChicken45/ASM-baremetal
(sorry some parts are in french)
Octocontrabass
Member
Member
Posts: 6245
Joined: Mon Mar 25, 2013 7:01 pm

Re: unable to get the framebuffer

Post by Octocontrabass »

SmolChicken45 wrote: Sat Jun 27, 2026 10:31 am

Code: Select all

    dq 0x9d5827dcd881dd1f
    dq 0xafb1aa5a1b8eea61
Did Gemini give you these numbers?
SmolChicken45
Posts: 4
Joined: Sat Jun 27, 2026 10:07 am
Libera.chat IRC: SmolChicken45

Re: unable to get the framebuffer

Post by SmolChicken45 »

yes I did get those numbers from gemini. for all the boot loader stuff, gemini told me how do do it, I wouldn't mind changing it or something.

Gemini told me that those numbers are "magic" numbers that tell Limine that I'm asking for the framebuffer pointer
sebihepp
Member
Member
Posts: 256
Joined: Tue Aug 26, 2008 11:24 am
GitHub: https://github.com/sebihepp

Re: unable to get the framebuffer

Post by sebihepp »

Which version of Limine are you using? And which are you installing on your iso file?
SmolChicken45
Posts: 4
Joined: Sat Jun 27, 2026 10:07 am
Libera.chat IRC: SmolChicken45

Re: unable to get the framebuffer

Post by SmolChicken45 »

I'm using Limine v4.20230909.0 for both? (both from the same zip file)

I have limine.sys and limine-cd.bin in the root folder of the iso
and i use limine-deploy.exe bios-install on my iso file to (again i'm not sure) to install the boot sector on the iso file

I tried using the most recent limine version, v12.3.3 (including a different code in the limine.conf/limine.cfg, main.asm and the linker), but it didn't work, as gemini told me (i know I'm relying to much on it) the v4 is easier to work with.
Octocontrabass
Member
Member
Posts: 6245
Joined: Mon Mar 25, 2013 7:01 pm

Re: unable to get the framebuffer

Post by Octocontrabass »

SmolChicken45 wrote: Sun Jun 28, 2026 7:55 amyes I did get those numbers from gemini.
Did Gemini give you the correct numbers?
SmolChicken45
Posts: 4
Joined: Sat Jun 27, 2026 10:07 am
Libera.chat IRC: SmolChicken45

Re: unable to get the framebuffer

Post by SmolChicken45 »

It didn't
it gave me the one i posted before but it was in fact

Code: Select all

0x9d5827dcd881dd75
0xa3148604f6fab11b
thank you so much, especially for the link for the docs
Post Reply