Set cursor speed to the vga standard of 32 frames for a full period. Hope that this is correct for the other machines as well. Fix that frameskip would slow down the cursor blinking speed.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4298
This commit is contained in:
		
							parent
							
								
									0987fb6f0c
								
							
						
					
					
						commit
						e7df2b9b19
					
				
					 1 changed files with 7 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -395,7 +395,7 @@ static Bit8u * VGA_TEXT_Draw_Line(Bitu vidstart, Bitu line) {
 | 
			
		|||
		*draw++=(fg&mask1) | (bg&~mask1);
 | 
			
		||||
		*draw++=(fg&mask2) | (bg&~mask2);
 | 
			
		||||
	}
 | 
			
		||||
	if (!vga.draw.cursor.enabled || !(vga.draw.cursor.count&0x8)) goto skip_cursor;
 | 
			
		||||
	if (!vga.draw.cursor.enabled || !(vga.draw.cursor.count&0x10)) goto skip_cursor;
 | 
			
		||||
	font_addr = (vga.draw.cursor.address-vidstart) >> 1;
 | 
			
		||||
	if (font_addr>=0 && font_addr<(Bits)vga.draw.blocks) {
 | 
			
		||||
		if (line<vga.draw.cursor.sline) goto skip_cursor;
 | 
			
		||||
| 
						 | 
				
			
			@ -444,7 +444,7 @@ static Bit8u * VGA_TEXT_Herc_Draw_Line(Bitu vidstart, Bitu line) {
 | 
			
		|||
			*draw++=(fg&mask2) | (bg&~mask2);
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	if (!vga.draw.cursor.enabled || !(vga.draw.cursor.count&0x8)) goto skip_cursor;
 | 
			
		||||
	if (!vga.draw.cursor.enabled || !(vga.draw.cursor.count&0x10)) goto skip_cursor;
 | 
			
		||||
	font_addr = (vga.draw.cursor.address-vidstart) >> 1;
 | 
			
		||||
	if (font_addr>=0 && font_addr<(Bits)vga.draw.blocks) {
 | 
			
		||||
		if (line<vga.draw.cursor.sline) goto skip_cursor;
 | 
			
		||||
| 
						 | 
				
			
			@ -506,7 +506,7 @@ static Bit8u* VGA_TEXT_Draw_Line(Bitu vidstart, Bitu line) {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	// draw the text mode cursor if needed
 | 
			
		||||
	if ((vga.draw.cursor.count&0x8) && (line >= vga.draw.cursor.sline) &&
 | 
			
		||||
	if ((vga.draw.cursor.count&0x10) && (line >= vga.draw.cursor.sline) &&
 | 
			
		||||
		(line <= vga.draw.cursor.eline) && vga.draw.cursor.enabled) {
 | 
			
		||||
		// the adress of the attribute that makes up the cell the cursor is in
 | 
			
		||||
		Bits attr_addr = (vga.draw.cursor.address-vidstart) >> 1;
 | 
			
		||||
| 
						 | 
				
			
			@ -564,7 +564,7 @@ static Bit8u* VGA_TEXT_Xlat16_Draw_Line(Bitu vidstart, Bitu line) {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
	// draw the text mode cursor if needed
 | 
			
		||||
	if ((vga.draw.cursor.count&0x8) && (line >= vga.draw.cursor.sline) &&
 | 
			
		||||
	if ((vga.draw.cursor.count&0x10) && (line >= vga.draw.cursor.sline) &&
 | 
			
		||||
		(line <= vga.draw.cursor.eline) && vga.draw.cursor.enabled) {
 | 
			
		||||
		// the adress of the attribute that makes up the cell the cursor is in
 | 
			
		||||
		Bits attr_addr = (vga.draw.cursor.address-vidstart) >> 1;
 | 
			
		||||
| 
						 | 
				
			
			@ -834,7 +834,9 @@ static void VGA_VerticalTimer(Bitu /*val*/) {
 | 
			
		|||
		E_Exit("This new machine needs implementation in VGA_VerticalTimer too.");
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//Check if we can actually render, else skip the rest (frameskip)
 | 
			
		||||
	vga.draw.cursor.count++; // Do this here, else the cursor speed depends on the frameskip
 | 
			
		||||
	if (vga.draw.vga_override || !RENDER_StartUpdate())
 | 
			
		||||
		return;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -902,7 +904,7 @@ static void VGA_VerticalTimer(Bitu /*val*/) {
 | 
			
		|||
		else vga.draw.linear_mask = 0x3fff; // CGA, Tandy 4 pages
 | 
			
		||||
		vga.draw.cursor.address=vga.config.cursor_start*2;
 | 
			
		||||
		vga.draw.address *= 2;
 | 
			
		||||
		vga.draw.cursor.count++;
 | 
			
		||||
		//vga.draw.cursor.count++; //Moved before the frameskip test.
 | 
			
		||||
		/* check for blinking and blinking change delay */
 | 
			
		||||
		FontMask[1]=(vga.draw.blinking & (vga.draw.cursor.count >> 4)) ?
 | 
			
		||||
			0 : 0xffffffff;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue