flat assembler
Message board for the users of flat assembler.
Index
> DOS > Two VGA intros with sources |
Author |
|
Grenhald 15 Oct 2006, 11:18
|
|||
15 Oct 2006, 11:18 |
|
sylwek32 15 Oct 2006, 13:08
great!
Are there some Demoscene tutorials for fasm? I need a intro for my packer... |
|||
15 Oct 2006, 13:08 |
|
rugxulo 18 Oct 2006, 23:08
Grenhald, excellent work!
P.S. It seems to work best if run in a brand new CMD.EXE window (tested on Win XP Home SP2). DOSbox 0.65 also seems to work (for Hypnodelic and Boxes, at least). |
|||
18 Oct 2006, 23:08 |
|
Dex4u 19 Oct 2006, 01:33
Nice work , work fine in MiniDOS. if you change this "push 09000h" to this "push 05000h" as minidos uses that address.
|
|||
19 Oct 2006, 01:33 |
|
Goplat 19 Oct 2006, 04:21
Dex4u: real DOS uses that address too, the paragraph at 9FFF0 is the head of the UMCB chain.
|
|||
19 Oct 2006, 04:21 |
|
Dex4u 19 Oct 2006, 21:36
@rhyno_dagreat, here is a quick convert (note: not tested ) to run on Dex4u OS
Code: ;; Astroids 2 - The noise within; 256b intro by Grenhald/Asenses;; www: grenhald.unterground.net; ;; compiled with: fasm 1.66; October 2006;; Quick convert to Dex4u OS by Dex (note: have not tryed); If this does not work blame me (Dex).; Assemble:; C:\Fasm Astroids.asm Astroids.dexuse32 ORG 0x400000 ; where our program is loaded to jmp start ; jump to the start of program. db 'DEX1' ; We check for this, to make shore it a valid Dex4u file.start: mov ax,18h ; set ax to nonlinear base mov ds,ax ; add them to ds mov es,ax ; and es. ;----------------------------------------------------; ; Get calltable address. ; ;----------------------------------------------------; mov edi,Functions ; this is the interrupt mov al,0 ; we use to load the DexFunction.inc mov ah,0x0a ; with the address to dex4u functions. int 40h ;----------------------------------------------------; ; Change to mode 13h. ; ;----------------------------------------------------; mov ax,0x0013 ;Dex4u realmode int, set to mode 13h call [RealModeInt10h] ; es - screen ; fs - pixel buf mov esi, star_x mov [ds:esi], word -2500 push es mov ax,8h mov es,ax xor eax,eax mov ebx,eax mov edx,eax mov ecx,eax;---setup palette----------------------------------------- xchg eax, ebx mov dx, 03C8h out dx, al inc dxpalette_loop: out dx, al ; gray scale out dx, al out dx, al inc ax jnz palette_loop xchg eax, ebp ; bp:=0 main_loop:;---------------------------------------------------------; z = 50-0 ( -= 1 ); x = R*cos^3(a); y = R*sin^3(a); a = 0-2pi ( += 2pi/200 ); R = 50*b^2; b = 0-2pi ( += 2pi/50 ) mov ebx, 50 fldz ; 0.b_loop: mov ecx, 200 fldz ; 0 b.a_loop: ; R - here, bit slower but smaler ; a b mov [ds:esi+10], bx fild word [ds:esi+10] ; z a b fld st2 ; b z a b fmul st, st ; b*b z a b fimul word [ds:esi-8] ; 50*b^2 a b fld st2 ; a R z a b fsincos ; cos sin R z a b fld st ; cos cos sin R z a b fmul st, st ; cos^2 cos sin R z a b fmulp ; cos^3 sin R z a b fmul st, st2 ; R*cos^3 sin R z a b fxch st1 ; sin x R z a b fld st ; sin sin x R z a b fmul st, st ; sin^2 sin x R z a b fmulp ; sin^3 x R z a b fmulp st2, st ; x R*sin^3 z a b fld st2 ; z x y z a b fld st2 ; y z x y z a b fld st2 ; x y z x y z a b mov [ds:esi+4], word -75 call star ; x y z a b mov [ds:esi+4], word -25 call star ; a b fadd dword [ds:esi-16] ; a+da b loop .a_loop ffreep st ; b fadd dword [ds:esi-12] ; b+db dec ebx jnz .b_loop ; move inc word [ds:esi] cmp word [ds:esi], 5050 jne draw ; reset and change direction mov word [ds:esi], -2500 not ebp;---draw blur and clear buf-------------------------------draw: pushad xor edi, edi.blur: mov al, [ds:edi+Buffer] add al, [ds:edi+Buffer+1] adc ah, 0 add al, [ds:edi+Buffer+320+1] adc ah, 0 mov ebx, 160 test byte [ds:esi+1], 2 jnz .b2 shl ebx, 1.b2: add al,byte [ds:edi+Buffer+ebx] adc ah, 0 shr ax, 2 mov [es:edi+0xA0000], al mov [ds:edi+Buffer], ah ; 0 inc di jnz .blur popad;---key ESC----------------------------------------------- call [KeyPressedNoWait] cmp ax,1 jne main_loop ;Dex4u no keypress then loop pop es call [SetDex4uFonts] ;Dex4u set text mode ret ;Dex4u return contol to CLI;---render star point----------------------------------------star: ; x y z fiadd word [ds:esi] ; x+star_x y z fxch st1 ; y x z fiadd word [ds:esi] ; y+star_x x z fxch st2 ; z y x fiadd word [ds:esi+4] ; z+star_z y x ;z form [0; 100] to [0.5; 1] fiadd word [ds:esi-6] ; z+za y x fidiv word [ds:esi-4] ; (z+za)/zb y x fmul st2, st ; per y x*per fmulp ; y*per x*per fiadd word [ds:esi-6] ; y*per+100 x*per fistp word [ds:esi+8] ; x*per fiadd word [ds:esi-2] ; x*per+160 or ebp, ebp jz .next fchs ; -x.next: fistp word [ds:esi+6] ; ; put pixel mov ax, [ds:esi+8] mul word [ds:esi-2] shl ax, 1 add ax, [ds:esi+6] xchg edi, eax mov [ds:edi+Buffer], bl ; z-shading retd_a dd 0.0314 ;-16d_b dd 0.1256 ;-12r dw 50 ;-8za dw 100 ;-6zb dw 200 ;-4sw dw 160 ;-2star_x dw ? ; sistar_y dw ? ;+2star_z dw ? ;+4xs dw ? ;+6ys dw ? ;+8tmp dw ? ;+10include 'DexFunctions.inc' ;Dex4u function call tableBuffer: You will need the 'DexFunctions.inc' which is in the kernel32.zip from here: http://www.dex4u.com/download.htm PS: If you mind Grenhald, let me know and i will delete it. Last edited by Dex4u on 23 Oct 2006, 16:59; edited 1 time in total |
|||
19 Oct 2006, 21:36 |
|
rhyno_dagreat 20 Oct 2006, 03:03
Dex4U - O_O Cooooool....
|
|||
20 Oct 2006, 03:03 |
|
Adam Kachwalla 07 May 2007, 08:27
Doesn't like Windows Server "Longhorn"! ERROR: The system does not support Full-Screen Mode
|
|||
07 May 2007, 08:27 |
|
rugxulo 24 May 2007, 05:58
Yes, Windows Vista is worse than XP (and x86-64 XP or Vista won't work at all). Try DOSBox or DOSEMU instead (or even a pure FreeDOS boot disk, see links below).
Eric Auer wrote:
Also check out Balder at http://www.finnix.org/Balder (intended to replace ODIN, whose beta9r2 version in various sizes can be gotten at http://odin.fdos.org/odin2005/ ). |
|||
24 May 2007, 05:58 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.