|  | @@ -90,3 +90,30 @@ int unhook_bios_interrupt ( unsigned int interrupt, unsigned int handler,
 | 
		
	
		
			
			| 90 | 90 |  	hooked_bios_interrupts--;
 | 
		
	
		
			
			| 91 | 91 |  	return 0;
 | 
		
	
		
			
			| 92 | 92 |  }
 | 
		
	
		
			
			|  | 93 | +
 | 
		
	
		
			
			|  | 94 | +/**
 | 
		
	
		
			
			|  | 95 | + * Dump changes to interrupt vector table (for debugging)
 | 
		
	
		
			
			|  | 96 | + *
 | 
		
	
		
			
			|  | 97 | + */
 | 
		
	
		
			
			|  | 98 | +void check_bios_interrupts ( void ) {
 | 
		
	
		
			
			|  | 99 | +	static struct segoff vectors[256];
 | 
		
	
		
			
			|  | 100 | +	static uint8_t initialised;
 | 
		
	
		
			
			|  | 101 | +	struct segoff vector;
 | 
		
	
		
			
			|  | 102 | +	unsigned int i;
 | 
		
	
		
			
			|  | 103 | +
 | 
		
	
		
			
			|  | 104 | +	/* Print any changed interrupt vectors */
 | 
		
	
		
			
			|  | 105 | +	for ( i = 0; i < ( sizeof ( vectors ) / sizeof ( vectors[0] ) ); i++ ) {
 | 
		
	
		
			
			|  | 106 | +		copy_from_real ( &vector, 0, ( i * sizeof ( vector ) ),
 | 
		
	
		
			
			|  | 107 | +				 sizeof ( vector ) );
 | 
		
	
		
			
			|  | 108 | +		if ( memcmp ( &vector, &vectors[i], sizeof ( vector ) ) == 0 )
 | 
		
	
		
			
			|  | 109 | +			continue;
 | 
		
	
		
			
			|  | 110 | +		if ( initialised ) {
 | 
		
	
		
			
			|  | 111 | +			dbg_printf ( "INT %02x changed %04x:%04x => "
 | 
		
	
		
			
			|  | 112 | +				     "%04x:%04x\n", i, vectors[i].segment,
 | 
		
	
		
			
			|  | 113 | +				     vectors[i].offset, vector.segment,
 | 
		
	
		
			
			|  | 114 | +				     vector.offset );
 | 
		
	
		
			
			|  | 115 | +		}
 | 
		
	
		
			
			|  | 116 | +		memcpy ( &vectors[i], &vector, sizeof ( vectors[i] ) );
 | 
		
	
		
			
			|  | 117 | +	}
 | 
		
	
		
			
			|  | 118 | +	initialised = 1;
 | 
		
	
		
			
			|  | 119 | +}
 |