Changeset f8ddd17 in mainline for uspace/fb/ega.c
- Timestamp:
- 2006-12-09T20:20:50Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b82a13c
- Parents:
- 9ab9c2ec
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/fb/ega.c
r9ab9c2ec rf8ddd17 35 35 */ 36 36 37 38 37 #include <stdlib.h> 39 38 #include <unistd.h> … … 63 62 saved_screen saved_screens[MAX_SAVED_SCREENS]; 64 63 65 66 64 #define EGA_IO_ADDRESS 0x3d4 67 65 #define EGA_IO_SIZE 2 … … 127 125 int i; 128 126 if (rows > 0) { 129 memcpy (scr_addr,((char *)scr_addr) + rows * scr_width * 2, scr_width * scr_height * 2 - rows * scr_width * 2); 127 memcpy (scr_addr,((char *)scr_addr) + rows * scr_width * 2, 128 scr_width * scr_height * 2 - rows * scr_width * 2); 130 129 for (i = 0; i < rows * scr_width ; i ++) 131 (((short *)scr_addr) + scr_width * scr_height - rows * scr_width) [i] = ((style << 8) + ' '); 130 (((short *)scr_addr) + scr_width * scr_height - rows * 131 scr_width) [i] = ((style << 8) + ' '); 132 132 } else if (rows < 0) { 133 134 memcpy (((char *)scr_addr) - rows * scr_width * 2 ,scr_addr ,scr_width * scr_height * 2 + rows * scr_width * 2);133 memcpy (((char *)scr_addr) - rows * scr_width * 2, scr_addr, 134 scr_width * scr_height * 2 + rows * scr_width * 2); 135 135 for (i = 0; i < - rows * scr_width ; i++) 136 136 ((short *)scr_addr) [i] = ((style << 8 ) + ' '); … … 309 309 scr_width=sysinfo_value("fb.width"); 310 310 scr_height=sysinfo_value("fb.height"); 311 iospace_enable(task_get_id(),(void *)EGA_IO_ADDRESS,2); 312 313 sz = scr_width*scr_height*2; 314 scr_addr = as_get_mappable_page(sz); 315 316 physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >> PAGE_WIDTH, 317 AS_AREA_READ | AS_AREA_WRITE); 311 iospace_enable(task_get_id(), (void *) EGA_IO_ADDRESS, 2); 312 313 sz = scr_width * scr_height * 2; 314 scr_addr = as_get_mappable_page(sz, (int) 315 sysinfo_value("fb.address.color")); 316 317 physmem_map(ega_ph_addr, scr_addr, ALIGN_UP(sz, PAGE_SIZE) >> 318 PAGE_WIDTH, AS_AREA_READ | AS_AREA_WRITE); 318 319 319 320 async_set_client_connection(ega_client_connection);
Note:
See TracChangeset
for help on using the changeset viewer.