News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Another rotating cube!

Started by BugCatcher, April 23, 2017, 04:40:46 AM

Previous topic - Next topic

BugCatcher

Since I've never posted any code before, here's some. Its a translation of a file Directx11\Tutorial5 from the Directx sdk 2010.
I built it with Radasm 3.0.0.9.c. Windows 10 home ed. Its hard coded to directx version 11_0 and uses shader version 4.
Hope it works for ya'all.

                                 Thks to Siekmanski with dx help.
                                  Thks to Chris Hobbs and the DiamondCrew(circa 1998) from the Gamedev net site,
                                 for his Testris assembly program in DirectDraw(still there).


avcaballero

Ops, I don't have d3dx9_43.dll, thanks anyway :t

jj2007

Quote from: BugCatcher on April 23, 2017, 04:40:46 AMHope it works for ya'all.

The exe works fine, well done :t

Bulding it the standard Masm way did not succeed, though. I guess RadAsm uses some special tricks :(

Siekmanski

Creative coders use backward thinking techniques as a strategy.

hutch--

Works fine on my win 10 64.

You could probably update this line to reflect 2017.  :biggrin:

AboutMsg         db 'MASM32 RadASM Dialog as main',13,10,'Copyright © MASM32 2001',0

guga

Not working on XP :( Don´t have the dll . I downloaded a copy of it and tried to use, but it lacks an import (i presume it is for usage exclusively on Windows Vista or later ?)
Coding in Assembly requires a mix of:
80% of brain, passion, intuition, creativity
10% of programming skills
10% of alcoholic levels in your blood.

My Code Sites:
http://rosasm.freeforums.org
http://winasm.tripod.com

BugCatcher

If I remember right, the last dx I had on my windows xp machine was directx 9. Don't think xp runs directx 11, or shader version 4.

HSE

Equations in Assembly: SmplMath

BlameTroi

The exe also runs fine for me on Windows 10. I wanted to assemble and poke around but I get errors on the MMX instructions. I get A2085 errors here, for instance (line 397 in the original source):


;    // Initialize the projection matrix
; g_Projection = XMMatrixPerspectiveFovLH( XM_PIDIV2, width / (FLOAT)height, 0.01f, 100.0f );
    cvtsi2ss    xmm0,vp.Width_
    cvtsi2ss    xmm1,vp.Height
    divss       xmm0,xmm1
    movss       fpAspectRatio,xmm0
    invoke      D3DXMatrixPerspectiveFovLH,addr g_Proj,FLT4(0.78539816339744


Searching didn't yield anything that worked for me. I added the following at the head of the source, no change in behavior:


; txb need mmx support
    .686
    .model flat,stdcall
    option casemap :none
    .xmm
"God made the integers, all else is the work of man." -- Leopold Kronecker.

Siekmanski

Hi BlameTroi,

try this:

   fld      vp.Width_
   fdiv     vp.Height
   fstp     fpAspectRatio
Creative coders use backward thinking techniques as a strategy.

LordAdef

Running smooth here!

Win 7 64, i7 16gb

Raistlin

This type of stuff reminds me so much of the SWAG pascal graphics distro.
http://swag.delphidabbler.com/

Some real kewl old school demo stuff using int 13  :t

Anyhow yes - work fine here aswell. re: spinning cube
Are you pondering what I'm pondering? It's time to take over the world ! - let's use ASSEMBLY...