X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fdevices%2Fcga.c;h=3a775637e4dc1b34b819666f502156abddeac440;hb=0fe8e057d19e132f88ab71dce8724b2c5585803a;hp=aabe81072351e785a9829fec4bdbe90751ccfd25;hpb=b54cbe1dbbe15ed228de7472ea284df96ecce909;p=palacios-OLD.git diff --git a/palacios/src/devices/cga.c b/palacios/src/devices/cga.c index aabe810..3a77563 100644 --- a/palacios/src/devices/cga.c +++ b/palacios/src/devices/cga.c @@ -28,12 +28,12 @@ -/* + #ifndef DEBUG_CGA #undef PrintDebug #define PrintDebug(fmt, args...) #endif -*/ + #define START_ADDR 0xB8000 #define END_ADDR 0xC0000 @@ -58,9 +58,11 @@ struct video_internal { uint8_t crtc_index_reg; // io port 3D4 uint8_t crtc_data_regs[25]; // io port 3D5 - + + /* IMPORTANT: These are column offsets _NOT_ byte offsets */ uint16_t screen_offset; // relative to the framebuffer uint16_t cursor_offset; // relative to the framebuffer + /* ** */ // updating the screen offset is not atomic, // so we need a temp variable to hold the partial update