Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can set the Start Address to shift the display [1], I haven't used this in graphics mode, but in text mode, if you set the line offset to 128, in 80x25 mode, you get easy scrolling (still line based though) with wrap around or you can use the offset register to start at 0 at a given scanline [2]. I think I picked up this technique from this article [3]

Edit to add; looks like you can do line based scrolling in text mode with the Preset Row Scan register [4].

Edit to add again; I think there's similar stuff in Vesa Bios Extensions (i set a SetDisplayStart, but I'm not sure I see a equivalent to the offset register), but if you're using a UEFI GOP framebuffer, I don't think there's anything similar, and you have to manage scrolling yourself. :(

[1] http://www.osdever.net/FreeVGA/vga/crtcreg.htm#0C

[2] http://www.osdever.net/FreeVGA/vga/crtcreg.htm#13

[3] http://www.os2museum.com/wp/dosv-graphics-text-modes-and-scr...

[4] http://www.osdever.net/FreeVGA/vga/crtcreg.htm#08



Oh wow thanks, these are great links!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: