How about this...

This commit is contained in:
Kevin Lange 2011-04-04 22:22:22 -05:00
parent bff65f127f
commit ad8175e0f5

View File

@ -122,10 +122,8 @@ bochs_set_point(
void void
bochs_scroll() { bochs_scroll() {
//__asm__ __volatile__ ("cli");
uint32_t size = sizeof(uint32_t) * bochs_resolution_x * (bochs_resolution_y - 12); uint32_t size = sizeof(uint32_t) * bochs_resolution_x * (bochs_resolution_y - 12);
memmove((void *)BOCHS_VID_MEMORY, (void *)((uintptr_t)BOCHS_VID_MEMORY + bochs_resolution_x * 12 * sizeof(uint32_t)), size); memmove((void *)BOCHS_VID_MEMORY, (void *)((uintptr_t)BOCHS_VID_MEMORY + bochs_resolution_x * 12 * sizeof(uint32_t)), size);
//__asm__ __volatile__ ("sti");
} }
void void
@ -261,10 +259,10 @@ void bochs_term_scroll() {
/* Oh dear */ /* Oh dear */
if (current_scroll + 12 >= 3072) {//3328) { if (current_scroll + 12 >= 3072) {//3328) {
/* And here's where it gets hacky */ /* And here's where it gets hacky */
__asm__ __volatile__ ("cli"); // __asm__ __volatile__ ("cli");
uint32_t size = sizeof(uint32_t) * bochs_resolution_x * (bochs_resolution_y - 12); uint32_t size = sizeof(uint32_t) * bochs_resolution_x * (bochs_resolution_y - 12);
memmove((void *)BOCHS_VID_MEMORY, (void *)((uintptr_t)BOCHS_VID_MEMORY + bochs_resolution_x * (current_scroll + 12) * sizeof(uint32_t)), size); memmove((void *)BOCHS_VID_MEMORY, (void *)((uintptr_t)BOCHS_VID_MEMORY + bochs_resolution_x * (current_scroll + 12) * sizeof(uint32_t)), size);
__asm__ __volatile__ ("sti"); // __asm__ __volatile__ ("sti");
bochs_set_y_offset(0); bochs_set_y_offset(0);
} else { } else {
bochs_set_y_offset(current_scroll + 12); bochs_set_y_offset(current_scroll + 12);