Kevin O'Connor
82221b2bf1
VGA: Remove recursion from biosfn_write_teletype().
2009-05-26 00:20:40 -04:00
Kevin O'Connor
d3b381514a
VGA: Simplify vgafb_write/read_char.
...
Pass cursor position into vgafb_write_char and vgafb_read_char.
Don't pass count into vgafb_write_char.
Break text writing into separate function.
2009-05-26 00:05:37 -04:00
Kevin O'Connor
e4f220fa2e
VGA: Remove vmode_g->class - store info in vmode_g->memmodel.
2009-05-25 23:37:13 -04:00
Kevin O'Connor
0926241e64
VGA: Use struct for car/attr/WITH_ATTR.
...
The three parameters are used frequently together - define a struct to
hold them.
Alos, merge biosfn_write_char_attr/_only into one function.
2009-05-25 11:44:11 -04:00
Kevin O'Connor
918b1564dd
VGA: Combine x/y/page into one parameter.
...
These three values are frequently used together - put them in a struct
and pass the struct around.
2009-05-25 11:05:18 -04:00
Kevin O'Connor
85ea07e668
VGA: Inline biosfn_set_video_mode() into its only caller.
2009-05-25 09:41:07 -04:00
Kevin O'Connor
deb9cb929d
VGA: Replace biosfn_load_text_* with vgafb_load_font().
...
The functions font loading functions are nearly identical - replace
with one common function.
2009-05-25 09:06:50 -04:00
Kevin O'Connor
124b6f7c9f
VGA: Factor out hardware accesses from biosfn_set_video_mode.
...
Create vgahw_set_mode() that handles low-level vga setup in vgaio.c.
Move screen clearing to new function in vgafb.c.
2009-05-25 00:44:29 -04:00
Kevin O'Connor
a959aa16be
VGA: Minor - improve indentation of palette structs.
2009-05-25 00:12:18 -04:00
Kevin O'Connor
e713204209
VGA: Inline several functions in vga.c.
...
Move some functions directly into their only caller.
Also, fix bug in handle_101210 - don't set ax.
2009-05-25 00:10:35 -04:00
Kevin O'Connor
ca668640a9
VGA: Define structs for save/restore state calls.
...
Define C structs for the state info.
Move hw specific code to vgahw.c.
Also, make sure to set 0x1c in regs->al on state save/restore calls.
2009-05-21 23:06:08 -04:00
Kevin O'Connor
a0ecb056c8
VGA: Move some ioport accesses from vga.c to vgaio.c.
...
Move more hardware port accesses to vgaio.c.
2009-05-18 23:34:00 -04:00
Kevin O'Connor
8bc059e9f7
VGA: Remove references to 'struct bregs' from vgaio.c code.
...
Move the bios interface control to vga.c.
Also, replace "biosfn_" prefix with "vgahw_".
2009-05-17 21:19:36 -04:00
Kevin O'Connor
c0c7df6bf4
VGA: Extract code from vga.c into new files vgaio.c and vgafb.c.
...
Move hardware IO accessor functions to vgaio.c.
Move framebuffer and font manipulation code to vgafb.c.
Also, have biosfn_write_teletype use biosfn_write_char_attr/only.
Also, breakout set_scan_lines() functionality from biosfn_load_text_X.
2009-05-17 18:11:33 -04:00
Kevin O'Connor
3c3c8315c8
VGA: Fix DAC loading during mode switch.
...
The total dac size is stored - not the number of entries.
2009-05-17 16:16:29 -04:00
Kevin O'Connor
99e08b7fc3
VGA: Make use of regs->ebp - now that it is present in 'struct bregs'.
2009-05-17 00:07:31 -04:00
Kevin O'Connor
9f193b9883
Define unified entry points for irq handlers.
...
The irq entry points now push the handler address and jump to a
function that does parameter setup. This reduces the code size
because the entry setup isn't repeated for every handler.
2009-05-16 23:31:27 -04:00
Kevin O'Connor
f61afb897f
VGA: Use GET_IVT macro instead of raw GET_FARVAR.
2009-05-16 21:32:27 -04:00
Kevin O'Connor
21079f4437
VGA: Add calling stubs for vbe functions.
2009-05-16 21:30:10 -04:00
Kevin O'Connor
d113a99c84
VGA: Use segment definitions.
...
Don't hardcode use of 0xc000.
Use definitions for 0xb000,0xb800,0xa000.
2009-05-16 21:05:02 -04:00
Kevin O'Connor
0818e1aa2d
VGA: Split biosfn_get_cursor_pos function.
...
Create biosfn_get_cursor_pos and biosfn_get_cursor_shape.
2009-05-16 18:00:19 -04:00
Kevin O'Connor
f94ec43133
VGA: Minor - use "_far" postfix on far pointers.
2009-05-16 17:37:23 -04:00
Kevin O'Connor
5727c29f9c
VGA: Rework vga_modes[] array to have pointers to other structs.
...
Prefer using pointers instead of indexes into arrays.
2009-05-16 17:29:32 -04:00
Kevin O'Connor
dd2be77bac
VGA: Misc syntax cleanups.
...
Use c99 variable declarations.
Postfix global pointers with "_g" and far pointers with "_far".
Other syntax cleanups.
2009-05-16 15:41:23 -04:00
Kevin O'Connor
4f79274123
VGA: Minor - use "_g" suffix for global pointers.
2009-05-16 14:55:01 -04:00
Kevin O'Connor
05c32dcc75
VGA: Add header guard to vgasrc/vgatables.h
2009-05-14 19:29:37 -04:00
Kevin O'Connor
6ace78f368
VGA: Remove unused DEBUG ifdefs.
2009-05-14 19:24:49 -04:00
Kevin O'Connor
a5288ffc77
VGA: memset16_far and memcpy16_far take byte count (not word count).
2009-05-13 22:25:24 -04:00
Kevin O'Connor
a12c2158f7
VGA - turn DEBUG printfs into dprintf calls.
2009-05-13 22:06:16 -04:00
Kevin O'Connor
d9fc0a09f7
Cleanup vga inb/outb port usages.
...
Use symbolic names for ports.
Use VGAREG_ACTL_WRITE_DATA instead of VGAREG_ACTL_ADDRESS when writing
a value to the register.
2009-05-07 22:00:25 -04:00
Kevin O'Connor
6a71970423
Minor - update vgasrc/vga.c todo list.
2009-05-06 23:40:07 -04:00
Kevin O'Connor
1f2c307bc3
Add initial port of the "open source vga bios" project.
...
This is an initial import of the code from:
http://www.nongnu.org/vgabios/
The code has been ported from bcc to gcc and gas.
This is an initial import - many functions have not been ported; many
bugs are present.
2009-05-06 23:35:59 -04:00