Write to framebuffer help

Discussion in '3DS - Homebrew Development and Emulators' started by aliak11, Jan 10, 2014.

  1. aliak11
    OP

    aliak11 Pokemon Master

    Member
    4
    Dec 5, 2010
    United States
    Florida
    Can someone give an example, or explain how to write to the framebuffer to display on the top LCD. The addresses are here http://3dbrew.org/wiki/LCD.
     
  2. FAST6191

    FAST6191 Techromancer

    pip Reporter
    20
    Nov 21, 2005
    United Kingdom
    Have you tried a proof of concept using the REG_LCDCOLORFILL* registers?
     
  3. ernilos

    ernilos GBAtemp Regular

    Member
    3
    Aug 28, 2013
    United States
    CAT
    Registers won't work on ARM9
    Just satart searching in FCRAM...
     
    fierce waffle likes this.
  4. T3GZdev

    T3GZdev head of T3GZdev

    Member
    3
    Apr 21, 2010
    United States
    it was his destiny to know
     
  5. escherbach

    escherbach GBAtemp Regular

    Member
    2
    Dec 26, 2013
    Maybe something like


    int fbfd = 0;
    // Open the framebuffer for reading and writing
    fbfd = open("/dev/fb0", O_RDWR);
    if (!fbfd) {
    printf("Error: cannot open framebuffer device.\n");
    exit(1);
    }
    // Map the framebuffer to memory
    unsigned int * fbp = (unsigned int *)mmap(0, XRES*YRES*4, PROT_READ | PROT_WRITE, MAP_SHARED, fbfd, 0);

    then fbp is a pointer to the framebuffer memory

    EDIT: or just set fbfd to the physical address?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice