flat assembler
Message board for the users of flat assembler.
Index
> DOS > VGA 3D Rotate Goto page Previous 1, 2, 3 |
Author |
|
DJ Mauretto 26 Nov 2007, 18:20
Code: st st1 st2 st3 FILD Dword [gs:edi+00] ; x FCHS ; -x FILD Dword[gs:edi+08] ; z -x FCHS ; -z -x FLD ST1 ; -x -z -x FLD ST1 ; -z -x -z -x FIMUL Dword[sin.y] ; -z*siny -x -z -x FXCH ST2 ; -z -x -z*siny -x FIMUL Dword[cos.y] ; -z*cosy -x -z*siny -x FADD ST,ST2 ; z -x -z*siny -x FIDIV [Value_256] ; FISTP Dword [gs:edi+08] ; -x -z/siny -x etc... This compute z continue you for x Note that this code is not optimise,i written now online is only one example to proceed with FPU stack. Don't be afraid FPU is nice and very useful for trigonometry |
|||
26 Nov 2007, 18:20 |
|
edfed 26 Nov 2007, 22:08
if i want to translate my 3Dengine for fpu, then i need to rewrite all the program.
let's go! after, i'll try with MMX and after, in SSE FPS at the top left will show the fpeed for each intruction set. |
|||
26 Nov 2007, 22:08 |
|
LocoDelAssembly 26 Nov 2007, 23:10
Quote:
Don't, it is integer only. You could try with 3DNow which also uses the MMX registers (and these ones actually are stored in the ST registers), but it is AMD-only technology. |
|||
26 Nov 2007, 23:10 |
|
edfed 27 Nov 2007, 00:07
my best computer only have a SSE1
so i cannot code for floating SIMD but integral SIMD i can for all my machines with MMX and for my test computers i don't have FPU. 386dx,486sx,P100MHz,PMMX233MHz,celeron(PII)563MHz,PIIIm800MHz i don't know what AMD is it shall work on all machines with maximum performances. Last edited by edfed on 27 Nov 2007, 01:48; edited 2 times in total |
|||
27 Nov 2007, 00:07 |
|
LocoDelAssembly 27 Nov 2007, 00:55
Quote:
Not sure why you can't code for floating SIMD, but note that SSE1 works with single precision floating point, the same precision that 3DNow has but handling four floats. |
|||
27 Nov 2007, 00:55 |
|
edfed 27 Nov 2007, 01:38
cpuid is ok, i have SSE
ho, i didn't read with care the developer manual. effectivelly, SSE operate on scalar floating point values. up to 16 XMM registers up to 32 floating point 32bits values! ok. good! really good (it's because i only have my SSE pc since 2 mounths )
|
|||||||||||
27 Nov 2007, 01:38 |
|
LocoDelAssembly 27 Nov 2007, 02:17
Quote:
Actually eight (or do you have a 64-bit enabled CPU?), and scalar and packed floating point values. It is still true that you have 32 floating point values since every register can hold four 32-bit values. |
|||
27 Nov 2007, 02:17 |
|
rhyno_dagreat 27 Nov 2007, 03:51
Oh, and btw, for you neophytes to 3D-programming who are reading all of this, some explaination of the math's can be found at http://www.phatcode.net/ under Graphics. Check the 5 tutorials by Rel. They were all written around QB, but it's the understanding of the math behind it that really helps.
Also there's a good FPU tutorial that I read in about a night that is good too. Check under "Assembly" for that. |
|||
27 Nov 2007, 03:51 |
|
edfed 27 Nov 2007, 13:14
QB will never die!!!!
what about a fasm QB?QUICK ASM who is interrested to make a QA compilo with fasm? there it need the colaboration of everybody ide is fasmw. for dos. providing some QB math facilities. F9 to RUN instead of QB F5! for me it's ok QA, if we try to make this, will be ok in a long time. |
|||
27 Nov 2007, 13:14 |
|
rhyno_dagreat 27 Nov 2007, 20:58
I was thinking about a BASIC compiler for my (our, if you're still willing to work with me) OS project.
|
|||
27 Nov 2007, 20:58 |
|
edfed 27 Nov 2007, 23:52
yes
and with a friend of mine, i want to implement a direct boot java virtual machine.(planed for at least 2009 ... ) in fact this os project is not to be a central os only a bootable platform to implement what you wish, like a basic compiler with a set of programs, or a java platform, or an asm platform, or a bootable cd or usbpen that can be indifferently exectuted with the os, in an emulator or at boot_time without any os, or simply all of these. |
|||
27 Nov 2007, 23:52 |
|
rhyno_dagreat 28 Nov 2007, 01:34
I think we should enable an option in it, though, to be able to install it as a central OS. Maybe a CLI command like "osinstall" or something, where it copies from memory to the HDD or such.
|
|||
28 Nov 2007, 01:34 |
|
Dex4u 28 Nov 2007, 17:13
If you were thinking about a basic interpreter instead of compiler, i would be interested in the project too.
|
|||
28 Nov 2007, 17:13 |
|
edfed 28 Nov 2007, 17:22
sure it's interpreter.
with optional compilation. and optional asm optimisation. and all things that don't already exists |
|||
28 Nov 2007, 17:22 |
|
DJ Mauretto 28 Nov 2007, 18:12
WOW
3D Rotate post became the project of an interpreter, compiler basic, isn't funny? |
|||
28 Nov 2007, 18:12 |
|
LocoDelAssembly 28 Nov 2007, 19:06
Yes, I was thinking about splitting the thread. Seems that I have to do several splits instead of just one
Also, there are some posts that are almost on topic, I'm not sure what to do with those. |
|||
28 Nov 2007, 19:06 |
|
DJ Mauretto 28 Nov 2007, 19:20
Leave things as they are,not put limits to imagination
|
|||
28 Nov 2007, 19:20 |
|
edfed 06 Dec 2007, 14:02
yes, 3d rotate with fpu looks like a command line.
x=x*cosy-z*siny z=z*cosy+x*siny x=[offset.x]*cos[angle.y]-[offset.z]*sin[angle.y] z=[offset.z]*cos[angle.y]+[offset.x]*sin[angle.y] and finally, something like the exemple of DJ mauretto. fine. so it can be linked with that hread about algebra or equivalent |
|||
06 Dec 2007, 14:02 |
|
Goto page Previous 1, 2, 3 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.