flat assembler
Message board for the users of flat assembler.
Index
> Main > Compiling .ASM-source directly into a .TGA image with fasm!! Goto page Previous 1, 2 |
Author |
|
Madis731 15 Oct 2004, 09:59
or Roman numbers
MCD-1400 MCM-1900 |
|||
15 Oct 2004, 09:59 |
|
MCD 19 Oct 2004, 13:26
or M&Ms (chewy!)
_________________ MCD - the inevitable return of the Mad Computer Doggy -||__/ .|+-~ .|| || |
|||
19 Oct 2004, 13:26 |
|
MCD 07 Dec 2004, 16:11
I finally managed to upload some of my Ultra Fractal 3.0x formulas & parameters. Please do not remove the copyright notes in some of their parameter sets. No please, don't!
_________________ MCD - the inevitable return of the Mad Computer Doggy -||__/ .|+-~ .|| || |
|||||||||||
07 Dec 2004, 16:11 |
|
rea 07 Dec 2004, 16:50
Nice, havent thinked exactly this, but nice.
|
|||
07 Dec 2004, 16:50 |
|
Picnic 03 Jan 2008, 18:50
I saw this old post a couple of days ago, it's really cool MCD!
I use paintshop pro to open the tga image. |
|||
03 Jan 2008, 18:50 |
|
MCD 13 Aug 2008, 16:10
I just posted an updated version of my old mandeldb.
Changes: Now you don't you to explicitly specify "mandeldb.tga" output file anymore, you can now just "assemble" it with "fasm mandeldb.tga" |
|||
13 Aug 2008, 16:10 |
|
Tomasz Grysztar 08 Oct 2012, 12:48
Just for fun, I combined this example with my assembly-time LZW compression routine, so that it now generates GIF instead of TGA:
Code: format binary as 'gif' Width = 120 Height = 120 IterLim = 256 Prec = 29; don't set above 29 nor to low, else image may be scrambled virtual at 0 canvas:: PrecScale = 1 shl (Prec-1) StepR = (5 shl (Prec-1) +Width shr 1) / Width; = 2.5/Width StepI = (5 shl (Prec-1) +Height shr 1) / Height; = 3/Height PosI = -5 shl (Prec-2); = -1.25 repeat Height PosR = -2 shl Prec; = -2 repeat Width R = PosR I = PosI RR = (PosR*PosR) shr Prec II = (PosI*PosI) shr Prec Color = IterLim - 1; Color is also the current iteration number repeat IterLim if (RR + II) > 4 shl Prec break end if Tmp = (RR - II) + PosR I = (R*I) / PrecScale + PosI R = Tmp RR = (Tmp*Tmp) shr Prec II = (I*I) shr Prec Color = Color - 1; discounting Color end repeat if Color < 0 Color = 0 end if db Color PosR = PosR + StepR end repeat PosI = PosI + StepI end repeat .size = $ end virtual signature db 'GIF87a' width dw Width height dw Height bits db 11110111b background db 0 reserved db 0 ; palette: 256 * 3 bytes (RGB) repeat 256 db % - 1 db (%+0A9h) and 0FFh db (%+54h) and 0FFh end repeat db ',' dw 0,0 dw Width,Height db 0 db 8 __stream__start = $ db 0 macro __stream__write databyte { if $-__stream__start<256 store byte $-__stream__start at __stream__start else __stream__start = $ db 0 end if db databyte } __LZW__MAX_ENTRIES = 4096 virtual at 0 __LZW__table:: dd __LZW__MAX_ENTRIES dup (?,?) end virtual __LZW__count = 102h __LZW__last_byte = 0 __LZW__bit_offset = 0 macro __LZW__write code { local c,d,p d = __LZW__count-1 c = 0 while d d = d shr 1 c = c + 1 end while d = code while c > 0 if __LZW__bit_offset + c >= 8 p = 8 - __LZW__bit_offset __stream__write __LZW__last_byte or (d and (1 shl p - 1)) shl __LZW__bit_offset __LZW__last_byte = 0 __LZW__bit_offset = 0 c = c - p d = d shr p else __LZW__last_byte = __LZW__last_byte or d shl __LZW__bit_offset __LZW__bit_offset = __LZW__bit_offset + c c = 0 end if end while } dictionary_code = 0 string_offset = 0 string_length = 0 scan_from = 102h while string_offset + string_length < canvas.size string_length = string_length + 1 if string_length = 1 load dictionary_code byte from canvas:string_offset else in_dictionary = 0 repeat __LZW__count - scan_from load entry_offset dword from __LZW__table:(scan_from+%-1)*8 load entry_length dword from __LZW__table:(scan_from+%-1)*8+4 if string_length = entry_length equal = 1 repeat string_length load a byte from canvas:string_offset+%-1 load b byte from canvas:entry_offset+%-1 if a <> b equal = 0 break end if end repeat if equal in_dictionary = 1 dictionary_code = scan_from+%-1 scan_from = scan_from+% break end if end if end repeat if ~ in_dictionary __LZW__write dictionary_code store dword string_offset at __LZW__table:__LZW__count*8 store dword string_length at __LZW__table:__LZW__count*8+4 __LZW__count = __LZW__count+1 if __LZW__count>=__LZW__MAX_ENTRIES-1 __LZW__write 100h __LZW__count = 102h end if string_offset = string_offset+string_length-1 string_length = 0 scan_from = 102h end if end if end while if string_length > 0 __LZW__write dictionary_code __LZW__count = __LZW__count+1 __LZW__write 101h end if if __LZW__bit_offset > 0 __stream__write __LZW__last_byte end if db 0 db ';' |
|||
08 Oct 2012, 12:48 |
|
DOS386 04 Nov 2012, 13:54
Tomasz Grysztar wrote: now generates GIF instead of TGA COOL ... brewing PNG as next |
|||
04 Nov 2012, 13:54 |
|
MIHIP 08 Nov 2014, 20:36
Fast Assembler, version 1.50.50 (16384 kilobytes memory)
1 passes, 2.1 seconds, 15186 bytes. |
|||
08 Nov 2014, 20:36 |
|
ACP 09 Nov 2014, 23:02
MIHIP wrote: Fast Assembler, version 1.50.50 (16384 kilobytes memory) I don't get it - what is the impact? |
|||
09 Nov 2014, 23:02 |
|
Matrix 10 Nov 2014, 06:12
Matrix wrote: Hy again here are my test results: Retested using fair 2014 hardware: $ time fasm mandeltest.asm flat assembler version 1.71.23 (16384 kilobytes memory) 1 passes, 55.4 seconds, 1440786 bytes. real 0m55.497s user 0m55.473s sys 0m0.000s ; 1200x1200 : 55.4s 26006.967509025 pixels per sec 1440786 bytes >15.013576436 X speedup (using only one 3GHz core/dual ch 1333MHz ddr3) |
|||
10 Nov 2014, 06:12 |
|
SeryZone 22 Nov 2014, 20:59
That's not records :-} Try Perturbation theory for getting fastest result!
|
|||
22 Nov 2014, 20:59 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.