X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=bootsplash;a=blobdiff_plain;f=bootsplash.asm;h=130073dde3cfee094b57837f768fc801bd591ce9;hp=03e3a50823081fbdbe946dddd0b5500eb07aef70;hb=820efb5b1e9e68781482470778053ac47282c4b7;hpb=31c7db31506389bcb38340122278728b0a71e62d diff --git a/bootsplash.asm b/bootsplash.asm index 03e3a50..130073d 100644 --- a/bootsplash.asm +++ b/bootsplash.asm @@ -137,15 +137,32 @@ splash: ; effect main loop .mainloop: - mov cx, spawn_rate ; spawn 10 points per frame + mov cx, spawn_rate .spawn: call rand xor edx, edx div dword [num_spawn_pos] ; edx <- rand % num_spawn_pos mov bx, [es:edx * 2] ; grab one of the spawn positions - mov byte [fs:bx], 1 ; plot a pixel there + mov byte [fs:bx], 0xff ; plot a pixel there dec cx jnz .spawn + ; blur the screen upwards + mov ax, fs + mov ds, ax ; let's use ds for this to avoid long instructions + xor bx, bx ; use: pointer + xor ax, ax ; use: pixel accum + xor dx, dx ; use: second pixel +.blurloop: + mov al, [bx] + mov dl, [bx + 320] + add ax, dx + shr ax, 1 + mov [bx], al + inc bx + cmp bx, 64000 - 320 + jnz .blurloop + + ; wait until the start of vblank .waitvblank: mov dx, 3dah