Follow

@akkartik
how do you do graphics in Mu?
I'm looking at kraxel.org/blog/2019/09/displa and wiki.osdev.org/VGA_Hardware and it's mostly alphabet soup at this point.

I'm not even sure if "int 0x10h" works via RISC-V? I mean there is interrupts, but...?

· · Web · 2 · 0 · 0

@s_ol Yeah, my goal is to start with vanilla x86 Qemu and configure it as little as possible. See akkartik.github.io/mu/html/boo

All I do is set a fairly unambitious video mode (line 188) and determine the beginning of video RAM (line 197)

Video mode info containing Video-memory-addr: github.com/akkartik/mu/blob/1f

From there on out I'm just writing to RAM to draw pixels: akkartik.github.io/mu/html/101

I draw text using a bitmap font: akkartik.github.io/mu/html/103

The font: akkartik.github.io/mu/html/fon

@s_ol

"Port 0x3C2

This is the miscellaneous output register. It uses port 0x3C2 for writing, and 0x3CC for reading. Bit 0 of this register controls the location of several other registers: if cleared, port 0x3D4 is mapped to 0x3B4, and port 0x3DA is mapped to 0x3BA."

WTF is this!

Sign in to participate in the conversation
Merveilles

Revel in the marvels of the universe. We are a collective of forward-thinking individuals who strive to better ourselves and our surroundings through constant creation. We express ourselves through music, art, games, and writing. We also put great value in play. A warm welcome to any like-minded people who feel these ideals resonate with them.