flat assembler
Message board for the users of flat assembler.

Index > Windows > Blitz3D FASM SDK

Author
Thread Post new topic Reply to topic
3D_FASM



Joined: 11 May 2023
Posts: 24
3D_FASM 11 May 2023, 20:58
A simple SDK that allows to create 2D and 3D graphics applications on FASM using the B3D.dll function.

Image

I guess this should make learning assembly for beginners more interesting, at least not so boring.

Link to SDK (see README.md) https://github.com/Blitz3DFASM/Blitz3DFASMSDK/tree/main

Sufficiently crude B3D.dll commands help: https://blitz3dfasm.github.io/FASM_B3D_SDK_HELP/help/asm_commands/index.htm

Help repo: https://github.com/Blitz3DFASM/FASM_B3D_SDK_HELP


Last edited by 3D_FASM on 16 May 2023, 14:08; edited 2 times in total
Post 11 May 2023, 20:58
View user's profile Send private message Reply with quote
Roman



Joined: 21 Apr 2012
Posts: 1794
Roman 12 May 2023, 06:53
Blitz3D very old.
I don't know did is support directx 11 or hlsl shaders.
Post 12 May 2023, 06:53
View user's profile Send private message Reply with quote
3D_FASM



Joined: 11 May 2023
Posts: 24
3D_FASM 12 May 2023, 12:51
Yes, it is very old and uses DirectX 7. And of course there is no support for shaders.

However, how many assembly lines would it take with pure DirectX or OpenGL to load a 3D 3DS model and display it on the screen? Or, for example, to download a sound or video file and play it?

With this library, it only takes a couple of lines.

This allows to make the assembler more visual and simplify the input and output of information.

For example random line generator source code:

Code:
    ; Line example
    include "blitz3d.inc"

    r dd 0
    g dd 0
    b dd 0
    x1 dd 0
    y1 dd 0
    x2 dd 0
    y2 dd 0

    start:
         ; Set The Graphic Mode
         cinvoke bbGraphics, 800, 600, 0, 0

         ; Set backbuffer
         cinvoke bbBackBuffer
         cinvoke bbSetBuffer, eax

         ; Wait for ESC to hit
    main_loop:
         cinvoke bbKeyHit, KEY_ESCAPE ; Wait Esc
         or eax, eax
         jnz exit_from_main_loop

         ; Set a random color
         rand [r],255
         rand [g],255
         rand [b],255
         cinvoke bbColor, [r], [g], [b]

         ; Draw a random line
         rand [x1],800
         rand [y1],600
         rand [x2],800
         rand [y2],600
         cinvoke bbLine, [x1],[y1],[x2],[y2]

         cinvoke bbFlip, 0

         jmp main_loop;
    exit_from_main_loop:  
    


Of course, B3D.dll has some shortcomings, this is the lack of functions for working with the file system, with the network, there is no random number generator, time date functions and much more.
Post 12 May 2023, 12:51
View user's profile Send private message Reply with quote
Picnic



Joined: 05 May 2007
Posts: 1389
Location: Piraeus, Greece
Picnic 30 Jul 2023, 09:44
I managed to install and run the examples. Very good.
Post 30 Jul 2023, 09:44
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< 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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.