flat assembler
Message board for the users of flat assembler.
Index
> DOS > VGA 3D Rotate Goto page 1, 2, 3 Next |
Author |
|
Picnic 13 Nov 2007, 22:11
DJ please...
I don't know about FPU stuff yet so judging the result only i say what a great example is this. 400 dos section threads! |
|||
13 Nov 2007, 22:11 |
|
DJ Mauretto 14 Nov 2007, 11:20
Thanks Thimis
FPU is only a way to make float point + transcendental computation, a hobby for mathematic. |
|||
14 Nov 2007, 11:20 |
|
edfed 14 Nov 2007, 12:22
2 bugs in your code!!
too much dots are computed, the figure wrap around the half, don't you see! the screen is blinking, this is not good but the idea is very good and the coments are very very good, i think you must post this in a FPU stuff thread, no? like this everybody can use the "tutorials" you make for fpu |
|||
14 Nov 2007, 12:22 |
|
DJ Mauretto 14 Nov 2007, 14:02
To Edfed:
Try to raise Delay to 3 or 4 in this point: Code: MOV CX,2 ; increase to 3 or 4 @Delay: Wait_Sync LOOP @Delay My PC is slow and I have not tried on computers faster If you raise the delay you must compensate the angle also in the data section therefore: increase delay to 3 or 4 and increase angolo (angle) in the data section to 5 or 6 |
|||
14 Nov 2007, 14:02 |
|
Dex4u 14 Nov 2007, 18:13
If you use Verticle Retrace, as a delay it will run more or less the same on fast or slow PC .
Code: mov word[count],0ddf:call FullVertWaitcmp word [count],70jne ddf;Do some thing in herexor ah, ahint 16hmov ax, 04c00hint 21h;**************************FullVertWait:MOV DX,3DAhVr:IN AL,DXTEST AL,8JNZ Vr ;wait until Verticle Retrace startsNvr:IN AL,DXTEST AL,8JZ Nvr ;wait until Verticle Retrace EndsADD word[count],1RET;**************************count dw 0 |
|||
14 Nov 2007, 18:13 |
|
DJ Mauretto 14 Nov 2007, 21:05
HI,
I made only general setting for test on my P3 ,but you can do more on your pc. Guide to test: /* data section */ K_y ; control height of image K_x ; control width of image K_z ; control depth of image Angolo ; rotation speed /* code sectioin */ Code: MOV CX,4 ; control Delay @Delay: Wait_Sync LOOP @Delay CALL @Rotate_x ; you can disable also this CALL @Rotate_y ; or this CALL @Rotate_z ; or this Please meet your favorite setting |
|||
14 Nov 2007, 21:05 |
|
edfed 14 Nov 2007, 23:46
yes des4u is right, use the vertical retrace
two buffers are needed the video memory and a buffer then transfert buffer into video memory when bit 3 of crt status reg is pulsed 0 is the signal of vertical retrace ok 1011111..11111011111....11101111....11111011111....11111 you don't need any delay just write in a buffer and wait for retrace my machines are slower than your i have PMMX @233MHz, PII @ 563MHZ and PIII @800MHZ |
|||
14 Nov 2007, 23:46 |
|
DJ Mauretto 15 Nov 2007, 10:52
Try this setting.
I don't have used double buffer,because is only a simply example, not a professional software,but you can start with this to make your optimization. Maybe next days will write a better example. Last edited by DJ Mauretto on 17 Nov 2007, 23:07; edited 1 time in total |
|||
15 Nov 2007, 10:52 |
|
DJ Mauretto 15 Nov 2007, 16:45
Hello, here there is a Torus function with Double Buffer,
Please try to make constructive criticism, not destructive ENJOY Last edited by DJ Mauretto on 19 Nov 2007, 09:41; edited 2 times in total |
|||
15 Nov 2007, 16:45 |
|
LocoDelAssembly 15 Nov 2007, 17:01
EXCELENT!!
As I can see you also changed to rotate only since you previous version was rotating and transforming the shape. Thanks for posting this new example!! |
|||
15 Nov 2007, 17:01 |
|
DJ Mauretto 15 Nov 2007, 17:20
Thanks Loco, intelligent observation
|
|||
15 Nov 2007, 17:20 |
|
Mac2004 15 Nov 2007, 19:57
DJ Mauretto: Neat example indeed !
regards Mac2004 |
|||
15 Nov 2007, 19:57 |
|
edfed 15 Nov 2007, 20:38
my critisism are constructive.
you prove this by making a good optimisation of your code by using buffering |
|||
15 Nov 2007, 20:38 |
|
Picnic 15 Nov 2007, 22:21
excellent!!
runs fast and smooth on my laptop. |
|||
15 Nov 2007, 22:21 |
|
Dex4u 16 Nov 2007, 10:51
Great work .
|
|||
16 Nov 2007, 10:51 |
|
DJ Mauretto 19 Nov 2007, 09:40
HI
I updated and optimized the examples from the point of view of graphic |
|||
19 Nov 2007, 09:40 |
|
edfed 19 Nov 2007, 13:30
do you want to continue your 3Dengine project?
i hope you will do you want to make it compatible with others 3D(highlevel)engines or do you want to make it in pure optimised asm? to increase the speed you first make a build of your objects at the begining the builder will launch the formula or algorythm and translate it in a 3Dfile like this one from my engine, he he! Code: builder: ;esi = formula ;edi = destination file ... call esi ;returns: ;esi = result ;edi = file ;eax = file id ... ret ;end of builder ;x,y and z are the coordinates, dword size ;ax,ay and az are the rotation angles ;dword resolution?? ;i don't compute the angles because it's hard to do file3D: ;the editor or the coder makes this .camera: ;this little file is the camera used with .global dd x,y,z,ax,ay,az,,focus, zoom,mode,... .universe: ;the universe builder makes this dd .camera dd size dd macro1,x,y,z,ax,ay,az;,others datas dd macro2,x,y,z,ax,ay,az,etc etc ... ... ;end of universe .macro: ;the macro builder makes this dd size dd object1,x,y,z,ax,ay,az;other datas dd object1,x,y,z,ax,ay,az ... ;end of macro object: ;the object builder makes this .size dd ? ;size of all file .lines dd ? ;where is the line list? .planes dd ? ;where is the plane list? .dsize dd ? ;size of dot list .dot1 dd x,y,z ;this is one dot .dot2 dd x,y,z ... ;here are lines of the objetct dd dot1,dot2 ;this is one line ;if dot is outside the dot list then line doesn't exist ;here are planes of the object triangle1 dd line1,line2,line3 ;this is a triangle dd ;extradatas for the polygon, colors, lights ; texture, texture algorythm,etc etc others datas are to be defined step by step during the design of the engine triangle2 dd line5,line6,line7 this kind of structure works well and permitts a global threading of the universe to show it's good to don't have to recalculate the objects during all loops just the use of the 3D to 2D is then required with the Dot, line,plane structure, you can compute first the dots, X,Y,Z the 2D result goes in X,Y and Z is a flag line is a very fast line algorythm that needs to interpolate the screen limits in case of crossing and recalculate temporary X1,Y1,X2,Y2 coordinates i didn't try the plane type, but it needs to put the texture in the triangle and ignore the hidden faces, interpolate with other planes, and all fat computations |
|||
19 Nov 2007, 13:30 |
|
DJ Mauretto 19 Nov 2007, 15:54
WOW
Very Very good! Quote:
I don't Know,I like Hardware programming and my hobby is math, this is my first experiment with 3D,i have started one week ago. It is a intriguing stuff, my purpose is only learn some computer graphic basis. Thanks for your guidance |
|||
19 Nov 2007, 15:54 |
|
rhyno_dagreat 23 Nov 2007, 05:46
DJ Mauretto & edfed: WOW O_O
Bravo!!! DJ - Your stuff reminds me of some of the stuff I think my dad used to do in QBasic a while back. edfed - Your stuff reminds me of (don't ask me why) the Star Wars Tie Fighter game that used to be for DOS. All in all, amazing work you two! |
|||
23 Nov 2007, 05:46 |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.