afoster@ogcvax.UUCP (Allan Foster) (09/10/87)
Ok Folks,
Here is the source to change the MAC II into Ntsc video.
The Slot must be between 9 and 14 inclusive.
The procedures are written in Rascal from Reed College but
the format is reliatively similar to Pascal.
I am posting the news as I have received a lot of requests to do
this.
Procedure SetInterlace(Slot:Integer);
(* Set to NTSC Video *)
Var
CardPtr : ^Longint[15]; (* Pointer to array of longints *)
Dummy : Integer;
Calc : Longint ;
Begin
(* CardPtr := $100000L*Slot +$80000L; card = $00100000*slot +$80000 *)
CardPtr := Slot;
CardPtr := (CardPtr << 20) +$80000L; (* << is the shift left OP *)
CardPtr^[0] := $FF;
CardPtr^[1] := $48;
CardPtr^[2] := $ff;
CardPtr^[3] := $f7;
CardPtr^[4] := $9f;
CardPtr^[5] := $1a;
CardPtr^[6] := $c4;
CardPtr^[7] := $e6;
CardPtr^[8] := $fa;
CardPtr^[9] := $f7;
CardPtr^[10] := $e5;
CardPtr^[11] := $F1;
CardPtr^[12] := $7b;
CardPtr^[13] := $f1;
CardPtr^[14] := $d1;
CardPtr^[15] := $06;
CardPtr := Slot;
CardPtr := (Cardptr <<20) +$C0000 ;
Dummy := Cardptr^ ; (* Must be a Longint reference *)
End;
Procedure ClearInterlace(Slot:Integer);
(* Set To Mac Normal video *)
Var
CardPtr : ^Longint[15];
Dummy : Integer;
Begin
CardPtr := Slot;
CardPtr := (CardPtr <<20) +$80000L; (* card = $00100000*slot +$80000 *)
CardPtr^[0] := $FF;
CardPtr^[1] := $B8;
CardPtr^[2] := $ff;
CardPtr^[3] := $f7;
CardPtr^[4] := $0f;
CardPtr^[5] := $1a;
CardPtr^[6] := $88;
CardPtr^[7] := $b9;
CardPtr^[8] := $fa;
CardPtr^[9] := $e1;
CardPtr^[10] := $e1;
CardPtr^[11] := $e9;
CardPtr^[12] := $79;
CardPtr^[13] := $69;
CardPtr^[14] := $d2;
CardPtr^[15] := $02;
CardPtr := Slot;
CardPtr := (CardPtr <<20) +$B0000 ;
Dummy := Cardptr^ ;
End;