From: sparky4 Date: Mon, 15 Feb 2016 21:13:16 +0000 (-0600) Subject: wwwwwwwwwww X-Git-Url: http://4ch.mooo.com/gitweb/?a=commitdiff_plain;h=7868e9cb2b33bedbdd8679c89e0ce769f6428bd7;p=plz.git wwwwwwwwwww --- diff --git a/copper.asm b/copper.asm index c7a6209..77e5c50 100755 --- a/copper.asm +++ b/copper.asm @@ -1,6 +1,6 @@ IDEAL - MODEL large - P386 + MODEL huge + 8087 EXTRN C l1:word, C l2:word, C l3:word, C l4:word, C k1:word, C k2:word, C k3:word, C k4:word EXTRN C il1:word, C il2:word, C il3:word, C il4:word, C ik1:word, C ik2:word, C ik3:word, C ik4:word @@ -10,7 +10,7 @@ CODESEG PUBLIC C frame_count, C init_copper, C close_copper, C cop_drop, C cop_pal, C do_pal PUBLIC C cop_scrl, C cop_start, C cop_plz -frame_count dw 0 +frame_count dw 0 cop_drop dw 0 cop_pal dd 0 do_pal dw 0 @@ -85,7 +85,16 @@ ENDP PROC copper2 - pusha + ;pusha + push AX + push CX + push DX + push BX + push SP + push BP + push SI + push DI + push ds inc [cs:frame_count] @@ -98,7 +107,9 @@ PROC copper2 mov al, 0d out dx, al inc dx - rep outsb + ;rep outsb + movsb + movsb mov [cs:do_pal], 0d @@no_pal: cmp [cs:cop_plz], 0d @@ -111,7 +122,16 @@ PROC copper2 call do_drop @@l1: pop ds - popa + ;popa + pop AX + pop CX + pop DX + pop BX + pop SP + pop BP + pop SI + pop DI + retf ENDP @@ -119,7 +139,7 @@ PROC copper3 retf ENDP -pompi db 0 +pompi db 0 PUBLIC C pompota @@ -132,9 +152,9 @@ PROC pompota mov ax, 0f07h out dx, ax ; 8th bit mov ax, 3c18h - inc [cs:pompi] + inc [cs:pompi] test [cs:pompi], 1d - jz @@l1 + jz @@l1 mov [cs:cop_scrl], 0d mov ax, 3d18h @@l1: @@ -146,36 +166,36 @@ PUBLIC C moveplz PROC moveplz - push ds - push SEG k1 - pop ds - - add [ds:k1], -3d - and [ds:k1], 4095d - add [ds:k2], -2d - and [ds:k2], 4095d - add [ds:k3], 1d - and [ds:k3], 4095d - add [ds:k4], 2d - and [ds:k4], 4095d - - add [ds:l1], -1d - and [ds:l1], 4095d - add [ds:l2], -2d - and [ds:l2], 4095d - add [ds:l3], 2d - and [ds:l3], 4095d - add [ds:l4], 3d - and [ds:l4], 4095d - - pop ds + push ds + ;;;;push SEG k1 + pop ds + + add [ds:k1], -3d + and [ds:k1], 4095d + add [ds:k2], -2d + and [ds:k2], 4095d + add [ds:k3], 1d + and [ds:k3], 4095d + add [ds:k4], 2d + and [ds:k4], 4095d + + add [ds:l1], -1d + and [ds:l1], 4095d + add [ds:l2], -2d + and [ds:l2], 4095d + add [ds:l3], 2d + and [ds:l3], 4095d + add [ds:l4], 3d + and [ds:l4], 4095d + + pop ds ret ENDP LABEL dtau Word ccc=0 cccc=0 -REPT 65 ; 43=dy*512/dtý +REPT 65 ; 43=dy*512/dt dw ccc*ccc/4*43/128+60 ccc=ccc+1 ENDM @@ -204,7 +224,10 @@ PROC do_drop out dx, ax mov al, 07h mov ah, bh - shl ah, 4d + shl ah, 1d + shl ah, 1d + shl ah, 1d + shl ah, 1d and ah, 10h or ah, 0fh out dx, ax ; 8th bit @@ -214,18 +237,18 @@ PROC do_drop @@over: cmp [cs:cop_drop], 256d - jae @@end + jae end_ cmp [cs:cop_drop], 128 jae @@lll cmp [cs:cop_drop], 64+32d - ja @@end + ja end_ @@lll: mov [Word cs:cop_pal], OFFSET fadepal mov [Word cs:cop_pal+2], SEG fadepal mov [do_pal], 1d cmp [cs:cop_drop], 65 - je @@l5 + je l5 mov dx, 3d4h mov ax, 3c18h @@ -233,7 +256,10 @@ PROC do_drop mov ax, 0f07h out dx, ax ; 8th bit - push ds si di cx + push ds + push si + push di + push cx lds si, [cs:cop_fadepal] mov di, OFFSET fadepal @@ -251,9 +277,12 @@ PROC do_drop dec cx jnz @@l4 - pop cx di si ds + pop cx + pop di + pop si + pop ds ret -@@l5: +l5: mov dx, 3d4h mov ax, 9018h out dx, ax @@ -262,7 +291,7 @@ PROC do_drop call initpparas ret -@@end: +end_: mov [cs:cop_drop], 0d ret ENDP @@ -270,8 +299,8 @@ ENDP PROC initpparas push ax push ds - push SEG k1 - pop ds + ;;;;push SEG k1 + pop ds mov ax, [ds:il1] mov [ds:l1], ax diff --git a/copper.err b/copper.err deleted file mode 100755 index f4821ca..0000000 --- a/copper.err +++ /dev/null @@ -1,4 +0,0 @@ -copper.asm(236): Error! E065: Operator is expected -copper.asm(254): Error! E065: Operator is expected -copper.asm(256): Error! E043: Jump out of range -copper.asm(265): Error! E043: Jump out of range diff --git a/copper.o b/copper.o new file mode 100755 index 0000000..8496109 Binary files /dev/null and b/copper.o differ diff --git a/plz.o b/plz.o new file mode 100755 index 0000000..f7e08d3 Binary files /dev/null and b/plz.o differ diff --git a/plzpart.map b/plzpart.map index b5afaee..9c82cff 100755 --- a/plzpart.map +++ b/plzpart.map @@ -1,7 +1,7 @@ Open Watcom Linker Version 2.0 beta Jan 16 2016 17:32:38 (64-bit) Copyright (c) 2002-2015 The Open Watcom Contributors. All Rights Reserved. Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved. -Created on: 16/02/15 14:01:39 +Created on: 16/02/15 15:13:07 Executable Image: plzpart.exe creating a DOS executable Error! E2028: init_copper_ is an undefined reference @@ -30,7 +30,7 @@ Segment Class Group Address Size ======= ===== ===== ======= ==== plzpart_TEXT CODE AUTO 0000:0000 00000020 -copper_TEXT CODE AUTO 0000:0020 00000997 +copper_TEXT CODE AUTO 0000:0020 0000099b tweak_TEXT CODE AUTO 0000:09c0 0000006d plz_TEXT CODE AUTO 0000:0a30 00000a30 _TEXT CODE AUTO 0000:1460 000004c8 @@ -66,18 +66,18 @@ Module: plzpart.o(/dos/z/plz/plzpart.c) 0000:0000 main_ Module: copper.o(/dos/z/plz/copper.asm) 0000:0020 _frame_count +0000:005b* init_copper +0000:0030* close_copper 0000:0022 _cop_drop 0000:0024* _cop_pal 0000:0028* _do_pal -0000:002a _cop_start 0000:002c* _cop_scrl +0000:002a _cop_start 0000:002e _cop_plz -0000:0030* _close_copper -0000:005b* _init_copper -0000:00fb* _pompota -0000:0129* _moveplz -0000:0203 _fadepal -0000:0803 _cop_fadepal +0000:00fb* pompota +0000:0129* moveplz +0000:0207 _fadepal +0000:0807 _cop_fadepal Module: tweak.o(/dos/z/plz/tweak.c) 0000:09c0 tw_opengraph2_ 0000:0a08 tw_setrgbpalette_ diff --git a/tweak.o b/tweak.o new file mode 100755 index 0000000..28da850 Binary files /dev/null and b/tweak.o differ