mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-10-26 16:33:45 +01:00 
			
		
		
		
	+ introduce the InitInt10hMode helper routine in the go32v2 graph unit as well
git-svn-id: trunk@41071 -
This commit is contained in:
		
							parent
							
								
									eb4f3a29da
								
							
						
					
					
						commit
						38ddbc541b
					
				| @ -192,6 +192,14 @@ const | |||||||
|       pop ebp |       pop ebp | ||||||
|    end ['EAX']; |    end ['EAX']; | ||||||
| 
 | 
 | ||||||
|  |  Procedure InitInt10hMode(mode : byte); | ||||||
|  |    begin | ||||||
|  |      if DontClearGraphMemory then | ||||||
|  |        CallInt10(mode or $80) | ||||||
|  |      else | ||||||
|  |        CallInt10(mode); | ||||||
|  |    end; | ||||||
|  | 
 | ||||||
|   procedure seg_xorword(segment : word;ofs : longint;count : longint;w : word); |   procedure seg_xorword(segment : word;ofs : longint;count : longint;w : word); | ||||||
|     begin |     begin | ||||||
|       asm |       asm | ||||||
| @ -722,10 +730,7 @@ end; | |||||||
| 
 | 
 | ||||||
| procedure InitCGA320C0; | procedure InitCGA320C0; | ||||||
| begin | begin | ||||||
|   if DontClearGraphMemory then |   InitInt10hMode($04); | ||||||
|     CallInt10($84) |  | ||||||
|   else |  | ||||||
|     CallInt10($04); |  | ||||||
|   VideoOfs := 0; |   VideoOfs := 0; | ||||||
|   SetCGAPalette(0); |   SetCGAPalette(0); | ||||||
|   SetCGABorder(16); |   SetCGABorder(16); | ||||||
| @ -734,10 +739,7 @@ end; | |||||||
| 
 | 
 | ||||||
| procedure InitCGA320C1; | procedure InitCGA320C1; | ||||||
| begin | begin | ||||||
|   if DontClearGraphMemory then |   InitInt10hMode($04); | ||||||
|     CallInt10($84) |  | ||||||
|   else |  | ||||||
|     CallInt10($04); |  | ||||||
|   VideoOfs := 0; |   VideoOfs := 0; | ||||||
|   SetCGAPalette(1); |   SetCGAPalette(1); | ||||||
|   SetCGABorder(16); |   SetCGABorder(16); | ||||||
| @ -746,10 +748,7 @@ end; | |||||||
| 
 | 
 | ||||||
| procedure InitCGA320C2; | procedure InitCGA320C2; | ||||||
| begin | begin | ||||||
|   if DontClearGraphMemory then |   InitInt10hMode($04); | ||||||
|     CallInt10($84) |  | ||||||
|   else |  | ||||||
|     CallInt10($04); |  | ||||||
|   VideoOfs := 0; |   VideoOfs := 0; | ||||||
|   SetCGAPalette(2); |   SetCGAPalette(2); | ||||||
|   SetCGABorder(0); |   SetCGABorder(0); | ||||||
| @ -758,10 +757,7 @@ end; | |||||||
| 
 | 
 | ||||||
| procedure InitCGA320C3; | procedure InitCGA320C3; | ||||||
| begin | begin | ||||||
|   if DontClearGraphMemory then |   InitInt10hMode($04); | ||||||
|     CallInt10($84) |  | ||||||
|   else |  | ||||||
|     CallInt10($04); |  | ||||||
|   VideoOfs := 0; |   VideoOfs := 0; | ||||||
|   SetCGAPalette(3); |   SetCGAPalette(3); | ||||||
|   SetCGABorder(0); |   SetCGABorder(0); | ||||||
| @ -1054,10 +1050,7 @@ end; | |||||||
| 
 | 
 | ||||||
| procedure InitCGA640; | procedure InitCGA640; | ||||||
| begin | begin | ||||||
|   if DontClearGraphMemory then |   InitInt10hMode($06); | ||||||
|     CallInt10($86) |  | ||||||
|   else |  | ||||||
|     CallInt10($06); |  | ||||||
|   VideoOfs := 0; |   VideoOfs := 0; | ||||||
|   CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that} |   CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that} | ||||||
| end; | end; | ||||||
| @ -1365,10 +1358,7 @@ end; | |||||||
| 
 | 
 | ||||||
| procedure InitMCGA640; | procedure InitMCGA640; | ||||||
| begin | begin | ||||||
|   if DontClearGraphMemory then |   InitInt10hMode($11); | ||||||
|     CallInt10($91) |  | ||||||
|   else |  | ||||||
|     CallInt10($11); |  | ||||||
|   VideoOfs := 0; |   VideoOfs := 0; | ||||||
|   CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that} |   CurrentCGABorder := 0; {yes, TP7 CGA.BGI behaves *exactly* like that} | ||||||
| end; | end; | ||||||
| @ -1664,20 +1654,14 @@ end; | |||||||
| 
 | 
 | ||||||
|   Procedure Init640x200x16; |   Procedure Init640x200x16; | ||||||
|     begin |     begin | ||||||
|       if DontClearGraphMemory then |       InitInt10hMode($e); | ||||||
|         CallInt10($8e) |  | ||||||
|       else |  | ||||||
|         CallInt10($e); |  | ||||||
|       VideoOfs := 0; |       VideoOfs := 0; | ||||||
|     end; |     end; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|    Procedure Init640x350x16; |    Procedure Init640x350x16; | ||||||
|     begin |     begin | ||||||
|       if DontClearGraphMemory then |       InitInt10hMode($10); | ||||||
|         CallInt10($90) |  | ||||||
|       else |  | ||||||
|         CallInt10($10); |  | ||||||
|       VideoOfs := 0; |       VideoOfs := 0; | ||||||
|     end; |     end; | ||||||
| 
 | 
 | ||||||
| @ -1685,10 +1669,7 @@ end; | |||||||
| 
 | 
 | ||||||
|   Procedure Init640x480x16; |   Procedure Init640x480x16; | ||||||
|     begin |     begin | ||||||
|       if DontClearGraphMemory then |       InitInt10hMode($12); | ||||||
|         CallInt10($92) |  | ||||||
|       else |  | ||||||
|         CallInt10($12); |  | ||||||
|       VideoOfs := 0; |       VideoOfs := 0; | ||||||
|     end; |     end; | ||||||
| 
 | 
 | ||||||
| @ -2338,10 +2319,7 @@ End; | |||||||
| 
 | 
 | ||||||
|  Procedure Init320; |  Procedure Init320; | ||||||
|     begin |     begin | ||||||
|       if DontClearGraphMemory then |       InitInt10hMode($13); | ||||||
|         CallInt10($93) |  | ||||||
|       else |  | ||||||
|         CallInt10($13); |  | ||||||
|       VideoOfs := 0; |       VideoOfs := 0; | ||||||
|     end; |     end; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 nickysn
						nickysn