This commit is contained in:
Frater 2017-09-24 01:45:36 +02:00
commit 43352ff262
1291 changed files with 220976 additions and 0 deletions

119
BEG/ASM.ASM Normal file
View file

@ -0,0 +1,119 @@
code SEGMENT para public 'CODE'
ASSUME cs:code
.386
LOCALS
PUBLIC _inittwk
_inittwk PROC FAR
push bp
mov bp,sp
push si
push di
push ds
; ;clear palette
; mov dx,3c8h
; xor al,al
; out dx,al
; inc dx
; mov cx,768
;@@1: out dx,al
; loop @@1
;400 rows
mov dx,3d4h
mov ax,00009h
out dx,ax
;tweak
mov dx,3d4h
mov ax,00014h
out dx,ax
mov ax,0e317h
out dx,ax
mov dx,3c4h
mov ax,0604h
out dx,ax
;
mov dx,3c4h
mov ax,0f02h
out dx,ax
mov ax,0a000h
mov es,ax
xor di,di
mov cx,32768
xor ax,ax
rep stosw
;
pop ds
pop di
pop si
pop bp
ret
_inittwk ENDP
PUBLIC _lineblit
_lineblit PROC FAR
push bp
mov bp,sp
push si
push di
push ds
mov di,[bp+6]
mov es,[bp+8]
mov si,[bp+10]
mov ds,[bp+12]
zpl=0
REPT 4
mov dx,3c4h
mov ax,02h+(100h shl zpl)
out dx,ax
zzz=0
REPT 80/2
mov al,ds:[si+(zzz+0)*4+zpl]
mov ah,ds:[si+(zzz+1)*4+zpl]
mov es:[di+zzz],ax
zzz=zzz+2
ENDM
zpl=zpl+1
ENDM
pop ds
pop di
pop si
pop bp
ret
_lineblit ENDP
REPOUTSB MACRO
local l1
l1: mov al,ds:[si]
inc si
out dx,al
dec cx
jnz l1
ENDM
PUBLIC _setpalarea
_setpalarea PROC FAR
push bp
mov bp,sp
push si
push di
push ds
mov si,[bp+6]
mov ds,[bp+8]
mov ax,[bp+10]
mov dx,3c8h
out dx,al
inc dx
mov cx,[bp+12]
shl cx,1
add cx,ax
REPOUTSB
pop ds
pop di
pop si
pop bp
ret
_setpalarea ENDP
code ENDS
END

BIN
BEG/ASM.OBJ Normal file

Binary file not shown.

87
BEG/BEG.C Normal file
View file

@ -0,0 +1,87 @@
#include <stdio.h>
#include "..\dis\dis.h"
#include "readp.c"
extern char pic[];
char *vram=(char *)0xa0000000L;
char pal2[768];
char palette[768];
char rowbuf[640];
main()
{
int a,b,c,y;
dis_partstart();
outp(0x3c4,2);
outp(0x3c5,15);
memset(vram,15,32768);
memset(vram+32768,15,32768);
//_asm mov ax,80h+13h
//_asm int 10h
for(a=0;a<32;a++) dis_waitb();
outp(0x3c8,0);
for(a=0;a<255;a++)
{
outp(0x3c9,63);
outp(0x3c9,63);
outp(0x3c9,63);
}
outp(0x3c9,0);
outp(0x3c9,0);
outp(0x3c9,0);
inp(0x3da);
outp(0x3c0,0x11);
outp(0x3c0,255);
outp(0x3c0,0x20);
//inittwk();
_asm
{
mov dx,3d4h
mov ax,000ch
out dx,ax
mov ax,000dh
out dx,ax
mov al,9
out dx,al
inc dx
in al,dx
and al,not 80h
and al,not 31
out dx,al
mov dx,3c0h
mov al,11h
out dx,al
mov al,0
out dx,al
mov al,32
out dx,al
}
_asm
{
mov dx,3c0h
mov al,11h
out dx,al
mov al,255
out dx,al
mov al,20h
out dx,al
}
readp(palette,-1,pic);
for(y=0;y<400;y++)
{
readp(rowbuf,y,pic);
lineblit(vram+(unsigned)y*80U,rowbuf);
}
for(c=0;c<=128;c++)
{
for(a=0;a<768-3;a++) pal2[a]=((128-c)*63+palette[a]*c)/128;
dis_waitb();
setpalarea(pal2,0,254);
}
setpalarea(palette,0,254);
}

BIN
BEG/BEG.EXE Normal file

Binary file not shown.

BIN
BEG/BEG.OBJ Normal file

Binary file not shown.

BIN
BEG/DP_PREFS Normal file

Binary file not shown.

24
BEG/MAKEFILE Normal file
View file

@ -0,0 +1,24 @@
all : beg.exe
# objects
objs=beg.obj asm.obj
# option flags
asm_f = /ML /m9 /s /JJUMPS
c_f = /AL /c /W3
# general compile orders
.asm.obj :
tasm $(asm_f) $<
.c.obj :
cl /qc $(c_f) $<
beg.exe : $(objs)
link /E $(objs)+_pic.obk+..\dis\disc.obj,beg.exe,nul;
copy beg.exe ..\main\data\beglogo.exe

64
BEG/READP.C Normal file
View file

@ -0,0 +1,64 @@
struct st_readp
{
int magic;
int wid;
int hig;
int cols;
int add;
};
void readp(char *dest,int row,char *src)
{
int bytes,a,b;
struct st_readp *hdr;
hdr=(struct st_readp *)src;
if(row==-1)
{
memcpy(dest,src+16,hdr->cols*3);
return;
}
if(row>=hdr->hig) return;
src+=hdr->add*16;
while(row)
{
src+=*(int *)src;
src+=2;
row--;
}
bytes=*(int *)src;
src+=2;
_asm
{
push si
push ds
push di
push es
mov cx,bytes
lds si,src
add cx,si
les di,dest
l1: mov al,ds:[si]
inc si
or al,al
jns l2
mov ah,al
and ah,7fh
mov al,ds:[si]
inc si
l4: mov es:[di],al
inc di
dec ah
jnz l4
cmp si,cx
jb l1
jmp l3
l2: mov es:[di],al
inc di
cmp si,cx
jb l1
l3: pop es
pop di
pop ds
pop si
}
}

BIN
BEG/SRTITLE.LBM Normal file

Binary file not shown.

BIN
BEG/SRTITLE.UP Normal file

Binary file not shown.

BIN
BEG/TMP.BBM Normal file

Binary file not shown.

BIN
BEG/_PIC.OBK Normal file

Binary file not shown.