From 72148570de56e5c42e2fe8091e9b466610e49785 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 5 Jun 2011 11:00:00 +0200 Subject: DREAMWEB: Add original Dreamweb assembly sources They have been released under the GPL with permission from Neil Dodwell. Note that the version of these sources that was added in 9599894a4b2f79672fc3e2ca5a93ef9c7d457c08 has been tweaked to prepare for processing by tasmrecover. --- devtools/tasmrecover/dreamweb/print.asm | 591 ++++++++++++++++++++++++++++++++ 1 file changed, 591 insertions(+) create mode 100644 devtools/tasmrecover/dreamweb/print.asm (limited to 'devtools/tasmrecover/dreamweb/print.asm') diff --git a/devtools/tasmrecover/dreamweb/print.asm b/devtools/tasmrecover/dreamweb/print.asm new file mode 100644 index 0000000000..a276db7298 --- /dev/null +++ b/devtools/tasmrecover/dreamweb/print.asm @@ -0,0 +1,591 @@ +;Copyright (c) 1990-2011 by Neil Dodwell +;Released with permission from Neil Dodwell under GPLv2 +;See LICENSE file for full license text +Printchar proc near + + cmp al,255 + jz ignoreit + push si bx di + if foreign + sub bx,3 + endif + push ax + sub al,32 ;"A" + mov ah,0 + add ax,charshift + call showframe + pop ax di bx si + cmp kerning,0 + jnz nokern + call kernchars +nokern: push cx + mov ch,0 + add di,cx + pop cx + ;dec di +ignoreit: ret + + endp + + + + + + + + + + +Kernchars proc near + + ;sub al,13 + cmp al,"a" + jz iskern + cmp al,"u" + jz iskern + ret +iskern: cmp ah,"n" + jz kernit + cmp ah,"t" + jz kernit + cmp ah,"r" + jz kernit + cmp ah,"i" + jz kernit + cmp ah,"l" + jz kernit + ret +kernit: dec cl + ret + + endp + + + + + + +;------------------------------------------------Proportional text printing---- + + +;Memprint proc near +; +; call usecharset1 +; +; push ax bx cx dx es ds si di +; call deltextline +; pop di si ds es dx cx bx ax +; +; pop si +; push cs +; pop es +; inc si +; mov ds,currentset +; mov di,textaddressx +; mov bx,textaddressy +; mov dl,textlen +; mov al,0 +; mov ah,0 +; call printdirect +; push si + +; mov newtextline,1 +; ret + +; endp + + + + + + +;------------------------------------------------Proportional text printing---- + +;Print proc near +; +; pop si +; mov bx,[cs:si+2] +; mov di,[cs:si+0] +; mov dl,[cs:si+4] +; add si,6 +; mov ds,currentset +; +;printloop2: push bx di dx +; push es cs +; pop es +; call getnumber +; pop es +; mov ch,0 +;printloop1: mov ax,[cs:si] +; inc si +; cmp al,0 +; jz finishprint +; push cx es +; call modifychar +; call printchar +; pop es cx +; loop printloop1 +; pop dx di bx +; add bx,linespacing +; jmp printloop2 + +;finishprint: pop dx di bx + ; push si + ; ret + + ; endp + + + + + + + + + +Printslow proc near + + mov pointerframe,1 + mov pointermode,3 + mov ds,charset1 +printloopslow6: push bx di dx + call getnumber + + mov ch,0 +printloopslow5: push cx si es + mov ax,[es:si] + push bx cx es si ds + if foreign + call modifychar + endif + call printboth + pop ds si es cx bx + mov ax,[es:si+1] + inc si + cmp al,0 + jz finishslow + cmp al,":" + jz finishslow + cmp cl,1 + jz afterslow + push di ds bx cx es si + if foreign + call modifychar + endif + mov charshift,91 + call printboth + mov charshift,0 + pop si es cx bx ds di + call waitframes + cmp ax,0 + jz keepgoing + cmp ax,oldbutton + jnz finishslow2 +keepgoing: call waitframes +noslow: cmp ax,0 + jz afterslow + cmp ax,oldbutton + jnz finishslow2 ;used to finish early +afterslow: pop es si cx + inc si + loop printloopslow5 + + pop dx di bx + add bx,10 + jmp printloopslow6 + +finishslow: pop cx si es dx di bx + mov al,0 + ret + +finishslow2: pop cx si es dx di bx + mov al,1 + ret + + endp + + + +Waitframes proc near + + push di bx es si ds + call readmouse + call showpointer + call vsync + call dumppointer + call delpointer + mov ax,mousebutton + pop ds si es bx di + ret + + endp + + + + +Printboth proc near + + push ax cx bx + push di + call printchar + pop ax + push di + mov di,ax + call multidump + pop di + pop bx cx ax + ret + + endp + + + + + + +Printdirect proc near + + mov lastxpos,di + mov ds,currentset +printloop6: push bx di dx + call getnumber + mov ch,0 +printloop5: mov ax,[es:si] + inc si + cmp al,0 + jz finishdirct + cmp al,":" + jz finishdirct + push cx es + if foreign + call modifychar + endif + call printchar + mov lastxpos,di + pop es cx + loop printloop5 + pop dx di bx + add bx,linespacing + jmp printloop6 + +finishdirct: pop dx di bx + ret + + endp + + + + + + + + + + + + + + +Monprint proc near + + mov kerning,1 + mov si,bx + mov dl,166 + mov di,monadx + mov bx,monady + mov ds,tempcharset + +printloop8: push bx di dx + call getnumber + mov ch,0 +printloop7: mov al,[es:si] + inc si + + cmp al,":" + jz finishmon2 + cmp al,0 + jz finishmon + cmp al,34 + jz finishmon + cmp al,"=" + jz finishmon + cmp al,"%" + jnz nottrigger + mov ah,[es:si] + inc si + inc si + jmp finishmon +nottrigger: push cx es + if foreign + call modifychar + endif + call printchar + mov curslocx,di + mov curslocy,bx + mov maintimer,1 + call printcurs + + call vsync + push si dx ds es bx di + call lockmon + pop di bx es ds dx si + call delcurs + pop es cx + loop printloop7 + +finishmon2: pop dx di bx + call scrollmonitor + mov curslocx,di + jmp printloop8 + +finishmon: pop dx di bx + cmp al,"%" + jnz nottrigger2 + mov lasttrigger,ah +nottrigger2: mov curslocx,di + call scrollmonitor + mov bx,si + mov kerning,0 + ret + + endp + + + + + + + + + +Getnumber proc near + + mov cx,0 + push si bx di ds es + mov di,si + +wordloop: push cx dx + call getnextword + pop dx cx + cmp al,1 + jz endoftext + mov al,cl + mov ah,0 + push bx + mov bh,0 + add ax,bx + pop bx + sub ax,10 + mov dh,0 + cmp ax,dx + jnc gotoverend + add cl,bl + add ch,bh + jmp wordloop + +gotoverend: mov al,dl + and al,1 + jz notcentre + push cx + mov al,dl + and al,11111110b + mov ah,0 + mov ch,0 + sub ax,cx + add ax,20 + shr ax,1 + pop cx + pop es ds di bx si + add di,ax + mov cl,ch + ret +notcentre: pop es ds di bx si + mov cl,ch + ret + + + +endoftext: mov al,cl + mov ah,0 + push bx + mov bh,0 + add ax,bx + pop bx + sub ax,10 + mov dh,0 + cmp ax,dx + jnc gotoverend2 + add cl,bl + add ch,bh + +gotoverend2: mov al,dl + and al,1 + jz notcent2 + push cx + mov al,dl + and al,11111110b + add al,2 + mov ah,0 + mov ch,0 + add ax,20 + sub ax,cx + shr ax,1 + pop cx + pop es ds di bx si + add di,ax + mov cl,ch + ret +notcent2: pop es ds di bx si + mov cl,ch + ret + + endp + + + + + +Getnextword proc near + + mov bx,0 +getloop: mov ax,[es:di] + inc di + inc bh + cmp al,":" + jz endall + cmp al,0 + jz endall + cmp al,32 + jz endword + if foreign + call modifychar + endif + cmp al,255 + jz getloop + push ax + sub al,32 ;"A" + mov ah,0 + add ax,charshift + add ax,ax + mov si,ax + add ax,ax + add si,ax + mov cl,[si+0] + pop ax + call kernchars + add bl,cl + ;dec bl + jmp getloop + +endword: add bl,6 + mov al,0 + ret + +endall: add bl,6 + mov al,1 + ret + + endp + + + + + + if german + +Modifychar proc near + + cmp al,128 + jc nomod + cmp al,129 + jnz not129 + mov al,"Z"+3 + ret +not129: cmp al,132 + jnz not132 + mov al,"Z"+1 + ret +not132: cmp al,142 + jnz not142 + mov al,"Z"+4 + ret +not142: cmp al,154 + jnz not154 + mov al,"Z"+6 + ret +not154: cmp al,225 + jnz not225 + mov al,"A"-1 + ret +not225: cmp al,153 + jnz not153 + mov al,"Z"+5 + ret +not153: cmp al,148 + jnz not148 + mov al,"Z"+2 + ret +not148: ret + +nomod: ret + + endp + + endif + + + + + if spanish + +Modifychar proc near + + cmp al,128 + jc nomod + cmp al,160 + jnz not160 + mov al,"Z"+1 + ret +not160: cmp al,130 + jnz not130 + mov al,"Z"+2 + ret +not130: cmp al,161 + jnz not161 + mov al,"Z"+3 + ret +not161: cmp al,162 + jnz not162 + mov al,"Z"+4 + ret +not162: cmp al,163 + jnz not163 + mov al,"Z"+5 + ret +not163: cmp al,164 + jnz not164 + mov al,"Z"+6 + ret +not164: cmp al,165 + jnz not165 + mov al,","-1 + ret +not165: cmp al,168 + jnz not168 + mov al,"A"-1 + ret +not168: cmp al,173 + jnz not173 + mov al,"A"-4 + ret +not173: cmp al,129 + jnz not129 + mov al,"A"-5 +not129: ret + +nomod: ret + + endp + + endif + \ No newline at end of file -- cgit v1.2.3 From 575fbcb1c1ea904da17fe04580e589514275347a Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 19 Jun 2011 18:04:41 +0200 Subject: DREAMWEB: Remove control chars from source --- devtools/tasmrecover/dreamweb/print.asm | 1 - 1 file changed, 1 deletion(-) (limited to 'devtools/tasmrecover/dreamweb/print.asm') diff --git a/devtools/tasmrecover/dreamweb/print.asm b/devtools/tasmrecover/dreamweb/print.asm index a276db7298..e99641c094 100644 --- a/devtools/tasmrecover/dreamweb/print.asm +++ b/devtools/tasmrecover/dreamweb/print.asm @@ -588,4 +588,3 @@ nomod: ret endp endif - \ No newline at end of file -- cgit v1.2.3