PM4_TYPE_2

This commit is contained in:
Pavel 2022-12-23 11:45:15 +03:00
parent 4b84da607a
commit 50d00719cb
2 changed files with 28 additions and 9 deletions

View File

@ -236,13 +236,6 @@ const
type type
PPM4_HEADER=^PM4_HEADER;
PM4_HEADER=bitpacked record
reserved:Word; //16
count:bit14; //14
_type:bit2; //2
end;
PPM4_TYPE_0_HEADER=^PM4_TYPE_0_HEADER; PPM4_TYPE_0_HEADER=^PM4_TYPE_0_HEADER;
PM4_TYPE_0_HEADER=bitpacked record PM4_TYPE_0_HEADER=bitpacked record
baseIndex:Word; //16 baseIndex:Word; //16
@ -250,6 +243,12 @@ type
_type:bit2; //2 _type:bit2; //2
end; end;
PPM4_TYPE_2_HEADER=^PM4_TYPE_2_HEADER;
PM4_TYPE_2_HEADER=bitpacked record
reserved:bit30; //30
_type:bit2; //2
end;
PPM4_TYPE_3_HEADER=^PM4_TYPE_3_HEADER; PPM4_TYPE_3_HEADER=^PM4_TYPE_3_HEADER;
PM4_TYPE_3_HEADER=bitpacked record PM4_TYPE_3_HEADER=bitpacked record
predicate:bit1; //1 predicate:bit1; //1

View File

@ -976,11 +976,21 @@ begin
end; end;
//the first 32K bytes is system registers and beyond that is graphics and multi-media.
//For the first 32KB of register space (system registers)
//there is no SET_* type packet and TYPE-0 packets should be used.
procedure onPm40(pm4Hdr:PM4_TYPE_0_HEADER;Body:PDWORD); procedure onPm40(pm4Hdr:PM4_TYPE_0_HEADER;Body:PDWORD);
begin begin
//set system registres
{$ifdef ww}Writeln('PM4_TYPE_0:Reg:',HexStr(pm4Hdr.baseIndex,4),' count(DW):',pm4Hdr.count+1);{$endif} {$ifdef ww}Writeln('PM4_TYPE_0:Reg:',HexStr(pm4Hdr.baseIndex,4),' count(DW):',pm4Hdr.count+1);{$endif}
end; end;
procedure onPm42(pm4Hdr:PM4_TYPE_2_HEADER);
begin
{$ifdef ww}Writeln('PM4_TYPE_2');{$endif}
end;
procedure onPushMarker(Body:PChar); procedure onPushMarker(Body:PChar);
begin begin
{$ifdef ww}Writeln('\HINT_PUSH_MARKER:',Body);{$endif} {$ifdef ww}Writeln('\HINT_PUSH_MARKER:',Body);{$endif}
@ -2544,10 +2554,20 @@ begin
token:=PDWORD(P)^; token:=PDWORD(P)^;
case PM4_TYPE(token) of case PM4_TYPE(token) of
0:begin 0:begin //PM4_TYPE_0
onPm40(PM4_TYPE_0_HEADER(token),@PDWORD(P)[1]); onPm40(PM4_TYPE_0_HEADER(token),@PDWORD(P)[1]);
end; end;
3:begin 2:begin //PM4_TYPE_2
onPm42(PM4_TYPE_2_HEADER(token));
//no body
t:=sizeof(DWORD);
P:=P+t;
i:=i+t;
Continue;
end;
3:begin //PM4_TYPE_3
case PM4_TYPE_3_HEADER(token).opcode of case PM4_TYPE_3_HEADER(token).opcode of
IT_NOP: IT_NOP:
begin begin