flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
macgub 11 Jan 2006, 14:28
Will you see it ? Intros to MenuetOS to download.
|
|||||||||||||||||||||
![]() |
|
halyavin 12 Jan 2006, 18:38
My very old ugly (it even doesn't support exit) demo, it still have some 3d bugs (I wonder will you see them)... It uses texturing, but doesn't implement lighting. I am not show sources because they are big enough. (it written in fpc+asm)
|
|||||||||||
![]() |
|
macgub 13 Jan 2006, 12:16
What is fpc - C compiler?
@Madis I made a triangle drawing procedure. It uses only integer counts - not touch FPU. On this procedure is based engine.
|
|||||||||||
![]() |
|
rugxulo 13 Jan 2006, 19:59
|
|||
![]() |
|
Madis731 14 Jan 2006, 13:36
Yes - I did make some experiments:
1) www.anim8or.com 2) Some testobject 3) Export to vertex 4) make all floats to integers and put points and vertexes to right places ![]() EDIT: I want to thank you for all the hard work you've done. I took your piece of art and made 3DS-reader on top of it. Have a look - I made some optimizations, turning into MMX, but SSE couldn't be tested under MeOSEmul ![]() http://www.whisqu.se/per/docs/graphics56.htm http://thorkildsen.no/faqsys/docs/3ds2.txt I didn't make it fully 3DS-compliant, of course, but I filtered out the points and vertexes to quickly get it done. 2-days and I'm very surprised it was that easy. EDIT2: What could be wrong with SSE. It constantly keeps crashing like SSE is not supported. MMX code runs well, but at first SSE instruction it just quits with interrupt.
|
|||||||||||
![]() |
|
macgub 16 Jan 2006, 08:33
@halyavin. Textured triangles that is it!
@Madis. Seems to be nice. I enjoy, my work was development. |
|||
![]() |
|
Madis731 16 Jan 2006, 22:43
I had to modify Mike's emulator too
![]() --Sorry Mike EDIT: I've got an idea! Maybe I can map z into the drawing area and if anything wants to draw - it checks z first. Then you don't have to sort at all. The sorting algorithm is already much faster in non-optimized mode and about 2 times faster in MMX mode, but I think I'm going to do some advanced quicksorting on that thus increasing stack requirements :S but we'll see... --Mike - I made your MeOSEmul 1.65.8 compatible and I think I'm going to mail you soon if you're not reading these boards ![]() EDIT2: A demo added using QuickSort+Insert. I noticed that you needed z-s to be top down so I need to make it work the other way ![]() You'll get MMX-enabled MeOSEmul.exe later and sources... EDIT3: Another realization: the top-down order is possible negating only 5 jumps, but it only works perfectly under OllyDBG (I mean no under/overflow). If I put it to MenuetOS - I get an access fault and program exits immediately. But the program is now 100x quicker and I've come to a new bottleneck. If I could get the drawing 30x faster, I would say - a bottleneckless code ![]() EDIT4: Yet a thought: instead of doing: call calculate_angle ; calculates sinus and cosinus call copy_points call rotate_points call translate_points; translate from 3d to 2d call clrscr ; clear the screen call sort_triangles call draw_triangles you can sort the triangles and write the result back to original data. This way you can minimize the impact on sorting, because rotating the object causes only minor changes in order which you can easily have insertion sort handle. You will make angle, rotation, translation only to the fresh data. EDIT5: I made quick+insertsort work ![]() <<<ATTACHMENT REMOVED>>> Look the following posts, this one had bugs in it. <<<ATTACHMENT REMOVED>>> Last edited by Madis731 on 23 Jan 2006, 08:27; edited 1 time in total |
|||
![]() |
|
macgub 20 Jan 2006, 08:04
[/quote]
When only piece of triangle with greater z coordinate is visable, the image would be uncorectly... I must check it. |
|||
![]() |
|
Madis731 20 Jan 2006, 13:08
@macgub: Do you mean the black holes?
@Everyone interested: Finally I'm satisfied. But don't think that I'm quitting now. I will fix some bugs in drawing routine. Only this takes time and I thought posting you some results is appropriate. 1) 3DS.ASM, House.3ds, Comp.3ds, 3DSNON (plain), 3DSMMX (w/ MMX) The latest sources and binaries nicely in a package for you to test. I'm a bit worried why my MMX theory contradicts with facts, but MMX is slower on emulator - maybe its faster in the real world. 2) My MeOSEmul fixes It compiles under FASM 1.65.8 and has some increased MMX support as I stubled upon new instructions. Go to Emul_0F.asm and find instructions like EMMS, PMULLW/PMULHW, PSLL(W/D/Q), POR, PXOR, PAND, PANDN, maybe something else too. THERE ARE BUGS!!! I didn't watch very closely the bytecodes so some instructions like PMULLW and others don't support immediates etc. EDIT: I deleted the file to preserve space - you can always check out http://mikedld.com
Last edited by Madis731 on 08 Apr 2006, 21:32; edited 1 time in total |
|||||||||||
![]() |
|
mike.dld 20 Jan 2006, 21:45
Madis
I've got your e-mail. Yeah, I don't read boards too much now and last time I saw this topic there were only 4 answers (w/o yours). Have nothing against your additions to MeOSEmul. The only thing you have to keep in mind is that Menuet now doesn't support SSE(2,3) and 3DNow! (only MMX), so if you'll add these instructions support to MeOSEmul, it will allow you to write non-working applications. |
|||
![]() |
|
macgub 23 Jan 2006, 08:03
@Madis IMHO black holes are caused bad color triangle. It's not a big problem. I don't know why but older vwersions of your 3d work dont runs on my computer correctly. Now I run an MMXEmul and MMX version of 3DS and I saw house. Congratulations.
|
|||
![]() |
|
Madis731 23 Jan 2006, 08:35
I know what was the problem. I removed the FINIT because I didn't use any other instructions than FPU. But then I added MMX support and forgot to put the "init" back. So I tried fixing it with EMMS but no success. The only fast way was to clear FPU/MMX with FNINIT. This means no waiting for exceptions. And now it works. The drawing routine uses too much pushing and popping of registers. I might try to optimize these. I'll see what I can do.
The z-ordering works only when you have no overlapping triangles. You can't rely on the average z ![]() ![]() Good luck on your research! |
|||
![]() |
|
Madis731 05 Feb 2006, 13:26
Okey, this needed another post:
I've optimized many parts of the code and got it reasonably fast. Then I decided I needed to loose those divisions so I tried converting it to bresenham, but I'm only in the half way there, because what you see is wireframe, not full faces. I'm a bit afraid I can't get the most out of it because the wireframe is as fast as the full faces with the previous algo. This means that full-faced-bresenham-algo program might be slower. Lets see what it brings us ![]() Here's a bit of pre-taste! P.S. Works best on short pipelines because of jumps and random access!!! (i.e. Pentium III = Good, Pentium MMX = Best but Prescott and up == Worst!)
|
|||||||||||
![]() |
|
macgub 27 Feb 2006, 13:40
Now rotary in all directions. I want present another version of house.
|
|||||||||||
![]() |
|
Madis731 27 Feb 2006, 16:59
Simple, but GREAT! Good job.
|
|||
![]() |
|
willow 28 Feb 2006, 11:59
See new really fast emulator from diamond:
http://shade.msu.ru/~msu-se/KlbrInWin.7z http://shade.msu.ru/~msu-se/KlbrInWin_src.rar Discussion and bugreporting on Russian forum: http://meos.sysbin.com/viewtopic.php?t=426 |
|||
![]() |
|
macgub 02 Mar 2006, 10:04
Emulators that is really good thing. I can write program in Windows, compile it by FASMW and run/test it by emulator. This one is quick indeed. I test it by MOS3DE - rotary textured cube.
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.