Screen damper

ZXNet echo conference «code.zx»

From Vyacheslav Kalinin To All 22 October 2003

Hello, All! Now I'm finishing Fire and Ice, so there it is The subject is used very actively. But I couldn’t do it quickly, I have doesn't even make it in one frame. Maybe someone can write to make it on time and didn't take up much space? (approximately no more than 200 bytes) Intersections with the beam are not dangerous, it should be reduced both ink and paper, bright should not be touched. newart/n-Discovery - Code, Gfx, AY Music fa

From Kirill Frolov To Vyacheslav Kalinin 25 October 2003

Press RESET immediately, Vyacheslav Kalinin! On Wed, 22 Oct 03 15:29:00 +0400, Vyacheslav Kalinin wrote: VK> Now I’m finishing Fire and Ice, so there it is VK> the subject is used very actively. VK> But I couldn’t make it quickly, I have VK> can't even keep up in one frame. VK> Maybe someone can write to keep it on time VK> and didn’t take up much space? (approximately no more than 200 bytes) VK> Intersections with the beam are not terrible, they should be reduced VK> both ink and paper, bright should not be touched. Total: ~58400 clock cycles, <120 bytes. The fade_init function must be called once, at the beginning of the program. FADE_SIZE equ 0x40 fade_by_1: ldhl, 0x5800 ; 10 ld de, fade_array ; 20 fade_loop: ld a, FADE_SIZE-1 and (hl) ld e, a ; ld de, fade_array ; (alternative, slow) ; add a, e ; ld e, a ; adc a, d ; sub e ; ld d,a ld a, (de) xor (hl) and FADE_SIZE-1 xor (hl) ld (hl), a inc hl ld a, 0x5b-1 cp h jp nc, fade_loop ; (106 -> 81408) 76 -> 58368 ret fade_init: ld hl, fade_array+FADE_SIZE ld b,FADE_SIZE-1 fade_init_loop: dec hl ld a, band a, 0x07 adc a, -1 ld a, b sbc a, 0x80 jr nc, $+4 add a, 0x80 ld (hl), a dec b jp p, fade_init_loop ret ; address MULTIPLE of 256 (alternatively not required) fade_array: ds FADE_SIZE ; 64 bytes