If you install Plan 9 Ports, check out /usr/local/plan9/src/cmd/devdraw. Russ can correct me if I'm wrong, but I think that's the only place the graphical programs interface with X. You'll need to find the places where devdraw is using X, and replace them with framebuffer code.
(I currently run emacs on arch linux with no x)