aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc
Commit message (Collapse)AuthorAgeFilesLines
* vgabios: Fix compile error due to fixed prototypes.Kevin O'Connor2010-01-031-1/+1
|
* Be sure to add "void" to all function prototypes that take no args.Kevin O'Connor2010-01-034-24/+24
| | | | Omitting "void" leads to a K&R style declaration which was not intended.
* Minor vga binary cleanups.Kevin O'Connor2010-01-012-7/+9
|
* Replace common segment/offset pairs with struct segoff_s.Kevin O'Connor2009-09-092-19/+18
| | | | Introduce 'struct segoff_s' to more places.
* Do garbage collection of unused sections.Kevin O'Connor2009-06-101-1/+1
| | | | | | | | | | | Implement -ffunction-sections and -fdata-sections in both 32bit and 16bit code. Make sure all sections have unique names (even asm and discarded sections). Enhance tools/layoutrom.py script to find all sections reachable from exported 16bit code - prune all other sections. Mark sections with "export" if they can be visible outside of code - these sections wont be dropped when pruning unused sections.
* VGA: Move direct in/out calls out of vgafb.c.Kevin O'Connor2009-05-313-27/+38
| | | | Implement wrapper calls in vgaio.c and use them instead.
* VGA: Comment and name update.Kevin O'Connor2009-05-313-77/+87
| | | | | | Remove remaining "biosfn_" prefixes from functions. Don't use register names as function parameters. vgafb_read_pixel should return a value (instead of passing in a pointer)
* VGA: Arrange screen writing functions to minimize stack.Kevin O'Connor2009-05-311-21/+50
| | | | | | Pass pointer to cursor position into write_string and write_teletype. Handle flag processing of write_string in handle_1013. Implement a tail-recursive scroll_one() function.
* VGA: Reduce stack usage.Kevin O'Connor2009-05-312-7/+6
| | | | | Make 'struct carattr' 3 bytes in size - gcc does better with this. Add 'noinline' directives to some funcs to reduce handle_10 stack usage.
* VGA: No need to scroll multiple times when writing a tab.Kevin O'Connor2009-05-311-35/+21
| | | | | | A tab can only scroll the screen once. Inline the code from check_scroll into write_teletype. Also, move row check in write_string to handle_1013.
* VGA: Further simplify scrolling code.Kevin O'Connor2009-05-312-169/+86
| | | | | | Introduce memcpy_stride and memset_stride functions. Simplify the moves and fills using src and dest pointers. Don't nest for loops - just use one loop for copies.
* VGA: Simplify scrolling implementation.Kevin O'Connor2009-05-312-54/+18
| | | | | Check for nblines==0 in calling function. Eliminate full screen clearing optimization.
* VGA: Fix bad commit to vgafb.c - missing '}'.Kevin O'Connor2009-05-311-0/+1
|
* VGA: Define clear_screen in terms of memmodel.Kevin O'Connor2009-05-311-10/+12
| | | | Use vmode_g->memmodel instead of memmodel and svgamode.
* VGA: Breakup biosfn_scroll.Kevin O'Connor2009-05-313-165/+217
| | | | | | | | | | Rename biosfn_scroll to vgafb_scroll. Break function up into per-mode scroll function. Pass row/col params in a 'struct cursorpos'. Encode direction as sign in nblines. Move parameter checking to callers. Add enhancement to 'attr' for using mode specific default attribute. Also, make get_cursor_pos local to vga.c.
* VGA: Move cursor setting out of biosfn_write_teletype.Kevin O'Connor2009-05-261-24/+14
| | | | Call set_cursor_pos in callers that need it.
* VGA: Remove recursion from biosfn_write_teletype().Kevin O'Connor2009-05-261-28/+37
|
* VGA: Simplify vgafb_write/read_char.Kevin O'Connor2009-05-263-68/+87
| | | | | | 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.
* VGA: Remove vmode_g->class - store info in vmode_g->memmodel.Kevin O'Connor2009-05-254-37/+30
|
* VGA: Use struct for car/attr/WITH_ATTR.Kevin O'Connor2009-05-253-99/+66
| | | | | | The three parameters are used frequently together - define a struct to hold them. Alos, merge biosfn_write_char_attr/_only into one function.
* VGA: Combine x/y/page into one parameter.Kevin O'Connor2009-05-253-108/+90
| | | | | These three values are frequently used together - put them in a struct and pass the struct around.
* VGA: Inline biosfn_set_video_mode() into its only caller.Kevin O'Connor2009-05-251-133/+107
|
* VGA: Replace biosfn_load_text_* with vgafb_load_font().Kevin O'Connor2009-05-253-65/+30
| | | | | The functions font loading functions are nearly identical - replace with one common function.
* VGA: Factor out hardware accesses from biosfn_set_video_mode.Kevin O'Connor2009-05-254-96/+113
| | | | | Create vgahw_set_mode() that handles low-level vga setup in vgaio.c. Move screen clearing to new function in vgafb.c.
* VGA: Minor - improve indentation of palette structs.Kevin O'Connor2009-05-251-57/+113
|
* VGA: Inline several functions in vga.c.Kevin O'Connor2009-05-251-181/+109
| | | | | Move some functions directly into their only caller. Also, fix bug in handle_101210 - don't set ax.
* VGA: Define structs for save/restore state calls.Kevin O'Connor2009-05-213-289/+285
| | | | | | 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.
* VGA: Move some ioport accesses from vga.c to vgaio.c.Kevin O'Connor2009-05-183-47/+97
| | | | Move more hardware port accesses to vgaio.c.
* VGA: Remove references to 'struct bregs' from vgaio.c code.Kevin O'Connor2009-05-174-149/+109
| | | | | Move the bios interface control to vga.c. Also, replace "biosfn_" prefix with "vgahw_".
* VGA: Extract code from vga.c into new files vgaio.c and vgafb.c.Kevin O'Connor2009-05-174-975/+1010
| | | | | | | 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.
* VGA: Fix DAC loading during mode switch.Kevin O'Connor2009-05-171-6/+4
| | | | The total dac size is stored - not the number of entries.
* VGA: Make use of regs->ebp - now that it is present in 'struct bregs'.Kevin O'Connor2009-05-171-10/+6
|
* Define unified entry points for irq handlers.Kevin O'Connor2009-05-161-1/+4
| | | | | | 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.
* VGA: Use GET_IVT macro instead of raw GET_FARVAR.Kevin O'Connor2009-05-161-8/+4
|
* VGA: Add calling stubs for vbe functions.Kevin O'Connor2009-05-162-5/+11
|
* VGA: Use segment definitions.Kevin O'Connor2009-05-163-66/+64
| | | | | Don't hardcode use of 0xc000. Use definitions for 0xb000,0xb800,0xa000.
* VGA: Split biosfn_get_cursor_pos function.Kevin O'Connor2009-05-161-25/+23
| | | | Create biosfn_get_cursor_pos and biosfn_get_cursor_shape.
* VGA: Minor - use "_far" postfix on far pointers.Kevin O'Connor2009-05-161-19/+19
|
* VGA: Rework vga_modes[] array to have pointers to other structs.Kevin O'Connor2009-05-163-191/+170
| | | | Prefer using pointers instead of indexes into arrays.
* VGA: Misc syntax cleanups.Kevin O'Connor2009-05-161-362/+322
| | | | | | Use c99 variable declarations. Postfix global pointers with "_g" and far pointers with "_far". Other syntax cleanups.
* VGA: Minor - use "_g" suffix for global pointers.Kevin O'Connor2009-05-161-9/+9
|
* VGA: Add header guard to vgasrc/vgatables.hKevin O'Connor2009-05-141-0/+4
|
* VGA: Remove unused DEBUG ifdefs.Kevin O'Connor2009-05-141-31/+3
|
* VGA: memset16_far and memcpy16_far take byte count (not word count).Kevin O'Connor2009-05-131-10/+11
|
* VGA - turn DEBUG printfs into dprintf calls.Kevin O'Connor2009-05-131-21/+9
|
* Cleanup vga inb/outb port usages.Kevin O'Connor2009-05-072-30/+32
| | | | | | Use symbolic names for ports. Use VGAREG_ACTL_WRITE_DATA instead of VGAREG_ACTL_ADDRESS when writing a value to the register.
* Minor - update vgasrc/vga.c todo list.Kevin O'Connor2009-05-061-3/+0
|
* Add initial port of the "open source vga bios" project.Kevin O'Connor2009-05-067-0/+4545
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.