Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: Hot_Dog on December 27, 2011, 08:48:01 am

Title: DOOM melting effect for z80?
Post by: Hot_Dog on December 27, 2011, 08:48:01 am
I thought it'd be cool to create a melting effect for Elimination similar to the one used in DOOM.  I'm willing to create my own, but has one been created already?
Title: Re: DOOM melting effect for z80?
Post by: ben_g on December 27, 2011, 09:44:55 am
Do you have any pictures of what you mean? I never played doom.
Title: Re: DOOM melting effect for z80?
Post by: annoyingcalc on December 27, 2011, 10:06:32 am
at the beginning

and
I thought it'd be cool to create a melting effect for Elimination similar to the one used in DOOM.  I'm willing to create my own, but has one been created already?
yes  http://www.ticalc.org/archives/files/fileinfo/185/18542.html
Title: Re: DOOM melting effect for z80?
Post by: Hot_Dog on December 27, 2011, 11:20:31 am
at the beginning

and
I thought it'd be cool to create a melting effect for Elimination similar to the one used in DOOM.  I'm willing to create my own, but has one been created already?
yes  http://www.ticalc.org/archives/files/fileinfo/185/18542.html

I actually looked at that one, but I forgot to mention that I did.  Anyways, it's way too slow
Title: Re: DOOM melting effect for z80?
Post by: Stefan Bauwens on December 28, 2011, 07:24:22 am
(http://images3.wikia.nocookie.net/__cb20100614021741/doom/images/0/04/Screen_melt.gif)
If you watch this the whole time you might be able to see how it works. :P

EDIT: I have slowen down a part of the gif. In that you see it does some melting effects. The above gif may be a little too fast to see, but it only does a few melting effect(a little more than the gif here under) and then just moves that melted picture down(which actualy gives the impression it's still melting.
Title: Re: DOOM melting effect for z80?
Post by: Deep Toaster on December 28, 2011, 11:49:43 pm
Based off of the descriptions stefan posted, I made this. Not as accurate of a "melting" effect, but I hope it works :)
Spoiler For Source:
Quote from: Z80 Assembly
#include   "ti83plus.inc"
.org      $9D93
.db         $BB,$6D
   ld   HL,   Image
   ld   DE,   plotSScreen
   ld   BC,   768
   ldir
   ld   B,   32
ScreenLoop:
   ld   HL,   plotSScreen
   push   BC
   ld   C,   12
RowLoop:
   ld   A,   R
   ld   D,   A
   rla
   or   D
   ld   D,   A
   ld   B,   64
ColumnLoop:
   xor   (HL)
   and   D
   xor   (HL)
   ld   E,   A
   ld   A,   (HL)
   ld   (HL),   E
   push   BC
   ld   BC,   12
   add   HL,   BC
   pop   BC
   djnz   ColumnLoop
   ld   DE,   -767
   add   HL,   DE
   dec   C
   jr   nz,   RowLoop
   bcall(_GrBufCpy)
   pop   BC
   djnz   ScreenLoop
   ld   B,   64
BigLoop:
   push   BC
   ld   HL,   plotSScreen+755
   ld   DE,   plotSScreen+767
   ld   BC,   756
   lddr
   ld   C,   16
LittleLoop:
   djnz   LittleLoop
   dec   C
   jr   nz,   LittleLoop
   bcall(_GrBufCpy)
   pop   BC
   djnz   BigLoop
   ret
Image:
   .db   %11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111001
   .db   %11111111,%11111111,%11111111,%11011111,%11111111,%11111101,%11111111,%11111101,%11111111,%11111111,%11111111,%11111111
   .db   %11111011,%11111111,%11111111,%11111111,%11111111,%11101111,%11111111,%11111111,%11101111,%11111111,%11111110,%11111111
   .db   %11111111,%11111111,%11111101,%10111111,%11111111,%11101011,%11111111,%11111110,%11111111,%11111111,%11111110,%11111111
   .db   %11111011,%11111111,%11111111,%10111111,%11111111,%11111101,%11111111,%11111111,%10101111,%11111101,%11111111,%11111111
   .db   %11111111,%11101010,%11111101,%10111111,%01010111,%11101011,%11110101,%01111110,%11011111,%11110101,%11111110,%11111111
   .db   %11111011,%11111110,%11111111,%10111111,%11110111,%11101101,%11110101,%10111111,%11011111,%11111011,%11111110,%11111111
   .db   %11111111,%11101110,%11111101,%10111111,%01110111,%11101111,%11110111,%11111110,%11011111,%11111011,%11111110,%11111111
   .db   %11111011,%11111111,%11111101,%10111111,%01111011,%11101011,%11111111,%01111110,%10101111,%11111111,%11111110,%11111111
   .db   %11111011,%11101110,%11111100,%10111111,%00111111,%11101011,%11110111,%01111110,%11011111,%11111111,%11111110,%11111111
   .db   %11111011,%11101110,%11111101,%10111111,%01010011,%11101011,%11110110,%01111110,%10101111,%11111111,%11111110,%11111111
   .db   %11111011,%11100110,%11111100,%10111111,%00110111,%11101011,%11110101,%00111110,%10101111,%01111111,%11111110,%11111111
   .db   %11110011,%11101110,%11111101,%10111111,%01010111,%11101001,%11110110,%01111110,%10011111,%01111111,%11111110,%11111111
   .db   %11111011,%11100010,%11111100,%00111111,%00010011,%11101011,%11110100,%00111100,%10001111,%01111111,%11111110,%01111111
   .db   %11110011,%11101010,%11110100,%10111111,%00101011,%11101001,%11110100,%01101010,%10001011,%00111111,%11111110,%11111111
   .db   %11110011,%11100000,%10111100,%00100111,%00010011,%11101011,%11110100,%00101000,%10001001,%00111111,%11111110,%01111111
   .db   %11110011,%11100100,%11110100,%10011011,%00010011,%11100001,%11110100,%00101000,%10001010,%00101111,%11011110,%11111111
   .db   %11110011,%11100000,%01110100,%10001011,%00001011,%11101001,%11110100,%00000100,%11001010,%00001011,%11011110,%01111111
   .db   %11110011,%11100000,%11011100,%00100101,%00010011,%11101011,%11110100,%00010000,%00000001,%00010101,%10011110,%11111111
   .db   %11110011,%11100010,%01100100,%00100001,%00000011,%11100001,%11110100,%00000000,%10000001,%00000010,%00011110,%01111111
   .db   %11111011,%11000110,%10100000,%00000001,%00110011,%11100001,%10010111,%00000000,%00000000,%01000001,%00011110,%11111111
   .db   %11110011,%11100000,%10100001,%00100000,%00010001,%01001000,%00000000,%10000000,%10000000,%01101001,%00001110,%01111111
   .db   %11110001,%01000010,%00001100,%10101000,%00100000,%00100001,%00100000,%00000000,%00000000,%00100001,%00001110,%01111111
   .db   %11110011,%11101010,%10101111,%10101110,%00000010,%00001000,%00000000,%00000000,%11000000,%00100000,%00010100,%01111111
   .db   %11110001,%01001010,%00110111,%11111010,%00000000,%00001000,%00000000,%00000000,%01000000,%01000100,%10011010,%01111111
   .db   %11110001,%01000010,%00111110,%11010101,%00000000,%00000100,%00000000,%00000001,%10000000,%00100000,%10000000,%01111111
   .db   %11110010,%10000000,%01111111,%11111010,%00000000,%00011000,%00000000,%00000010,%00000000,%00110100,%00010100,%01111111
   .db   %11110000,%10000000,%00111111,%01011111,%10001000,%00000100,%00000000,%00000111,%11000000,%00100001,%00000100,%01111111
   .db   %11110000,%00000000,%01101111,%11100100,%10111111,%00111111,%00000000,%00111111,%10100000,%01001000,%00000000,%01111111
   .db   %11110010,%00000000,%01111111,%11110110,%11111111,%01001111,%10100000,%00111111,%11110100,%01110001,%00000100,%01111111
   .db   %11110000,%00000100,%11111101,%11110101,%10111011,%11000111,%11001010,%11111111,%11111011,%11001011,%00000000,%01111111
   .db   %11110000,%10000000,%01011101,%01010101,%11011011,%11110011,%11111011,%11111111,%11111111,%11100100,%10000000,%01111111
   .db   %11110000,%00000000,%01111110,%11111111,%01111111,%10110101,%11111111,%11111111,%11111111,%11111111,%00000000,%01111111
   .db   %11110000,%00000010,%11111111,%11111111,%11000001,%11110111,%11111111,%11111111,%11111111,%11111111,%10000000,%01111111
   .db   %11110000,%00100010,%11111111,%11101111,%00101000,%11111001,%11111111,%11111111,%11111111,%11111110,%00000000,%01111111
   .db   %11110000,%00010011,%11111111,%11111111,%11101001,%01110000,%11111111,%11111111,%11111111,%11111111,%00100001,%11111111
   .db   %11110001,%00011111,%11111111,%11111111,%10101010,%01100000,%11111111,%11111111,%11111111,%11111110,%10001111,%11111111
   .db   %11100010,%10101111,%11111111,%11111011,%01101011,%00100000,%01111111,%11111111,%11111111,%11111111,%11101111,%11111111
   .db   %11101101,%11111111,%01011011,%11101011,%10100101,%00100000,%00111111,%11111111,%11111111,%11111111,%11010111,%11111111
   .db   %11111100,%11111111,%01000111,%10111101,%11111010,%11011000,%00011111,%11111111,%11111111,%11111111,%11111111,%01111111
   .db   %11111111,%11111111,%11110011,%11101011,%10101011,%10010100,%00000111,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%10111111,%10111001,%11101101,%11111111,%10101111,%10000001,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%10111111,%10101100,%11110111,%11111101,%01001111,%00100000,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11011111,%11111111,%01111111,%11101010,%11100101,%11000000,%01111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11011111,%11110000,%11111111,%10111111,%01010111,%11100000,%01111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11101111,%11010000,%00111111,%11000001,%11110111,%01111000,%00011111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11111111,%10010100,%00111110,%00010010,%11111111,%11010100,%00111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11110111,%11010100,%00011110,%01001000,%01111111,%11101101,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11111010,%11110100,%00011101,%00000101,%10111011,%11111101,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11111110,%01111101,%00011110,%10111101,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111,%11111111
   .db   %11111111,%11111111,%10111000,%00001111,%10000111,%10101111,%11111111,%11111111,%11111111,%11111111,%11111110,%01111111
   .db   %11111111,%11111111,%11011111,%00000011,%11011101,%11110111,%11111111,%11111111,%11111111,%11111001,%11110000,%01111111
   .db   %11111111,%11111111,%11111110,%00000001,%01101111,%11111111,%01111101,%11111111,%11111111,%11111001,%11111000,%01111111
   .db   %11111111,%11111111,%11110111,%10000001,%11101110,%10111110,%10111111,%11111111,%11111111,%11111110,%11100000,%01111111
   .db   %11111111,%11111111,%11111111,%11000001,%11111111,%10011011,%01001111,%11111111,%11111111,%11100000,%00000000,%01111111
   .db   %11111111,%11111111,%11111101,%11110101,%11110111,%11101111,%11101111,%11111111,%11111111,%11110001,%00011000,%01111111
   .db   %11111111,%11111111,%11111110,%11011111,%11011011,%10101010,%01001111,%11111111,%11111111,%11111001,%00111000,%01111111
   .db   %11111111,%11111111,%11110101,%11111111,%11111011,%11111001,%11101111,%11111111,%11111111,%11111001,%00111000,%01111111
   .db   %11011111,%11111110,%11011111,%10111111,%11111110,%10110110,%10001111,%11111111,%11111111,%11111001,%00111000,%01111111
   .db   %11000101,%01101110,%00100100,%10111111,%11101110,%11110110,%11100011,%11111111,%11111111,%11110001,%00011000,%01111111
   .db   %11011011,%10100110,%10100101,%10111111,%11111111,%10111100,%00000001,%00011111,%11111111,%11100000,%01000000,%00011111
   .db   %11101010,%11111100,%10111011,%10111111,%11111111,%10111111,%10000000,%00011111,%11111111,%11110001,%00011010,%00111111
Generated by the BBify'r (http://clrhome.org/resources/bbify/ (http://clrhome.org/resources/bbify/))
Thanks to calc84maniac for help with bit operations!
Title: Re: DOOM melting effect for z80?
Post by: DJ Omnimaga on December 28, 2011, 11:52:21 pm
Wow this looks great. I'm sure I saw that kind of effect in another game somewhere, on calc, but it might have been nDoom. :P
Title: Re: DOOM melting effect for z80?
Post by: Deep Toaster on December 29, 2011, 12:30:30 am
Nah, you probably saw it in my Axe Doom program:

(http://i40.tinypic.com/2nk4cg5.gif)

J/k.
Title: Re: DOOM melting effect for z80?
Post by: Hot_Dog on December 29, 2011, 12:43:23 am
I'll try it!  You're awesome, Deep Thought!

(And of course I'll credit you ;D)

EDIT: In your screenshot, the sides stay completely black, as if the melting effect doesn't occur there.  Is that because the original image is completely black on those ends?
Title: Re: DOOM melting effect for z80?
Post by: DJ Omnimaga on December 29, 2011, 01:10:16 am
Lol Deep at the fake screenshot. I wish, though O.O
Title: Re: DOOM melting effect for z80?
Post by: TIfanx1999 on December 29, 2011, 05:43:42 am
Hey deep, what did you use to convert that to 4 shades of gray?
Title: Re: DOOM melting effect for z80?
Post by: AngelFish on December 29, 2011, 05:49:43 am
Nah, you probably saw it in my Axe Doom program:

(http://i40.tinypic.com/2nk4cg5.gif)

J/k.

I was about to ask why your dithering was so bad until I saw the "j/k" part :P
Title: Re: DOOM melting effect for z80?
Post by: Deep Toaster on December 29, 2011, 11:30:50 am
EDIT: In your screenshot, the sides stay completely black, as if the melting effect doesn't occur there.  Is that because the original image is completely black on those ends?
Exactly why. You can try making it melt in white instead of black by adding xor a right before ColumnLoop.
Hey deep, what did you use to convert that to 4 shades of gray?
Gimp ;D