# unit vbxe

### Video Board XE unit

author: Tomasz Biela (Tebe)

## Constants:

name: | value: | description:
--- | --- | ---
LoRes | 1 |
MedRes | 2 |
HiRes | 3 |
VC_XDL | 1 |
VC_XCOLOR | 2 |
VC_NO_TRANS | 4 |
VC_TRANS15 | 8 |

## Types:

name: | type: | description:
--- | --- | ---
TUInt24 | record byte0: byte; byte1: byte; byte2: byte; end; |
TXDL | record xdlc_: word; // blank rptl_: byte; xdlc: word; rptl: byte; ov_adr: TUInt24; ov_step: word; mp_adr: TUInt24; mp_step: word; mp_hscrol: byte; mp_vscrol: byte; mp_width: byte; mp_height: byte; ov_width: byte; ov_prior: byte; end; |
TBCB | record src_adr: TUInt24; src_step_y: smallint; src_step_x: shortint; dst_adr: TUInt24; dst_step_y: smallint; dst_step_x: shortint; blt_width: word; blt_height: byte; blt_and_mask: byte; blt_xor_mask: byte; blt_collision_mask: byte; blt_zoom: byte; pattern_feature: byte; blt_control: byte; end; |
TVBXEMemoryStream | Object Position: cardinal; Size: cardinal; // 0..Size-1 procedure Create; procedure Clear; procedure SetBank; procedure ReadBuffer(var Buffer; Count: word); procedure WriteBuffer(var Buffer; Count: word); function ReadByte: Byte; function ReadWord: Word; function ReadDWord: Cardinal; procedure WriteByte(b: Byte); procedure WriteWord(w: Word); procedure WriteDWord(d: Cardinal); end; |

## Interface:

name: | description:
--- | ---
VBXEMemoryBank | #### procedure VBXEMemoryBank(b: byte); assembler;
ReadVBXEMemoryByte | #### function ReadVBXEMemoryByte(var Position: cardinal): byte;
WriteVBXEMemoryByte | #### procedure WriteVBXEMemoryByte(var Position: cardinal; a: byte);
TVBXEMemoryStream.Create | #### procedure TVBXEMemoryStream.Create;
TVBXEMemoryStream.SetBank | #### procedure TVBXEMemoryStream.SetBank;
TVBXEMemoryStream.ReadBuffer | #### procedure TVBXEMemoryStream.ReadBuffer(var Buffer; Count: word);
TVBXEMemoryStream.WriteBuffer | #### procedure TVBXEMemoryStream.WriteBuffer(var Buffer; Count: word);
TVBXEMemoryStream.ReadByte | #### function TVBXEMemoryStream.ReadByte: Byte;
TVBXEMemoryStream.ReadWord | #### function TVBXEMemoryStream.ReadWord: Word;
TVBXEMemoryStream.ReadDWord | #### function TVBXEMemoryStream.ReadDWord: Cardinal;
TVBXEMemoryStream.WriteByte | #### procedure TVBXEMemoryStream.WriteByte(b: Byte);
TVBXEMemoryStream.WriteWord | #### procedure TVBXEMemoryStream.WriteWord(w: Word);
TVBXEMemoryStream.WriteDWord | #### procedure TVBXEMemoryStream.WriteDWord(d: Cardinal);
TVBXEMemoryStream.Clear | #### procedure TVBXEMemoryStream.Clear;
OverlayOff | #### procedure OverlayOff; assembler;
ColorMapOn | #### procedure ColorMapOn; assembler;
ColorMapOff | #### procedure ColorMapOff; assembler;
SetHorizontalRes | #### procedure SetHorizontalRes(a: byte); assembler;
SetHRes | #### procedure SetHRes(a: byte); assembler;
IniBCB | #### procedure IniBCB(var a: TBCB; src,dst: cardinal; w0, w1: smallint; w: word; h: byte; ctrl: byte);
SrcBCB | #### procedure SrcBCB(var a: TBCB; src: cardinal);
DstBCB | #### procedure DstBCB(var a: TBCB; dst: cardinal);
BlitterBusy | #### function BlitterBusy: Boolean; assembler;
RunBCB | #### procedure RunBCB(var a: TBCB); assembler;
GetXDL | #### procedure GetXDL(var a: txdl); register; assembler;
SetXDL | #### procedure SetXDL(var a: txdl); register; assembler;
VBXEControl | #### procedure VBXEControl(a: byte); assembler;
VBXEOff | #### procedure VBXEOff; assembler;