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
Thread Post new topic Reply to topic
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 15 Oct 2004, 09:59
or Roman numbers Very Happy
MCD-1400
MCM-1900 Wink
Post 15 Oct 2004, 09:59
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
MCD 19 Oct 2004, 13:26
or M&Ms (chewy!)

_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 19 Oct 2004, 13:26
View user's profile Send private message Reply with quote
penang



Joined: 01 Oct 2004
Posts: 59
penang 25 Oct 2004, 07:15
I know this is offtopics, but you said you have the fractals that you created with FractInt 20.0 ans UltraFractal 3, and you have the parameters/formulas files as well.

Well ... if possible, would it be okay for you to just give me the parameter and/or formulas so I can try it on my system here without having to dl all the superMB files ?

Dunno if I should put my email here or not, but heck, just email me, if it's not too troublesome - penang <a t> myrealbox <d o/tt> com

Thanks !

email help by MATRIX Smile
Post 25 Oct 2004, 07:15
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
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! Sad


Description: A formula and a parameter file, they should be used together in the same directory
Download
Filename: MADCPDGY.RAR
Filesize: 2.53 KB
Downloaded: 1074 Time(s)


_________________
MCD - the inevitable return of the Mad Computer Doggy

-||__/
.|+-~
.|| ||
Post 07 Dec 2004, 16:11
View user's profile Send private message Reply with quote
rea



Joined: 14 Nov 2004
Posts: 92
rea 07 Dec 2004, 16:50
Nice, havent thinked exactly this, but nice.
Post 07 Dec 2004, 16:50
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1403
Location: Piraeus, Greece
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.
Post 03 Jan 2008, 18:50
View user's profile Send private message Visit poster's website Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 602
Location: Germany
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"
Post 13 Aug 2008, 16:10
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
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 ';'    
Post 08 Oct 2012, 12:48
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1905
DOS386 04 Nov 2012, 13:54
Tomasz Grysztar wrote:
now generates GIF instead of TGA


COOL ... brewing PNG as next Smile
Post 04 Nov 2012, 13:54
View user's profile Send private message Reply with quote
MIHIP



Joined: 14 Feb 2013
Posts: 130
MIHIP 08 Nov 2014, 20:36
Fast Assembler, version 1.50.50 (16384 kilobytes memory)
1 passes, 2.1 seconds, 15186 bytes.

Very Happy
Post 08 Nov 2014, 20:36
View user's profile Send private message Visit poster's website Reply with quote
ACP



Joined: 23 Sep 2006
Posts: 204
ACP 09 Nov 2014, 23:02
MIHIP wrote:
Fast Assembler, version 1.50.50 (16384 kilobytes memory)
1 passes, 2.1 seconds, 15186 bytes.

Very Happy


I don't get it - what is the impact?
Post 09 Nov 2014, 23:02
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 10 Nov 2014, 06:12
Matrix wrote:
Hy again here are my test results:

; Some basic image properties. Feel free to modify (786 bytes header)
; tests in real time, Celeron II @ 933Mhz (600), 103MHz Bus, FSB, 16+16K L1, 256k L2:
; 20x20 : 0.2s 2000 pixels per sec 1186 bytes
; 40x40 : 0.9s 1777.77 pixels per sec 2386 bytes
; 80x80 : 3.6s 1777.77 pixels per sec 7186 bytes
; default 120x120 : 8.2s 1756.09 pixels per sec 15186 bytes
; 160x160 : 14.7s 1741.49 pixels per sec 26386 bytes
; 200x200 : 23.1s 1731.60 pixels per sec 40786 bytes
; 280x280 : 44.9s 1746.10 pixels per sec 79186 bytes
; 800x800 : 366.7s 1745.30 pixels per sec 640786 bytes
; 1200x1200 : 831.3s 1732.23 pixels per sec 1440786 bytes

MATRIX

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)
Post 10 Nov 2014, 06:12
View user's profile Send private message Visit poster's website Reply with quote
SeryZone



Joined: 20 Dec 2013
Posts: 38
Location: Ukraine, Kryviy Rih
SeryZone 22 Nov 2014, 20:59
That's not records :-} Try Perturbation theory for getting fastest result!
Post 22 Nov 2014, 20:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page Previous  1, 2

< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.