You can help CodeWalrus stay online by donating here. | New CodeWalrus | Old (dark mode) | Old (light) | Discord server

[gLib][3d][z80][ez80] gLib a fast 3D asm/axiom library

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

0
[cross posted from various site]

As some of you already know, I passed the last few month to convert GLib to an axiom, and if you doesn't know/or guess it, well SURPRISE !  :
I am proud to finally present this works, and hope we will be able to see some 3D project appears. Of course keep in mind
that this is a calculator engine, even if performances are definitly WAY more superior to axe version (thanks to asm/code refactoring).

In cliping, for example, I've got almost a 50%, even 55% performances boost....

For the new features/ changes from the axe version :
-library now use matrix, way more powerful than the previous method that I used, and for now faster
-VBO has been limited to 8 and for now can't be supressed (but don't worry you will soon be able to do that, and I'll post in tuto a way to do it from axe point of view)
-Many many many optimization, size wise and speed wise. Standard cube (example provided) run at more than 40 fps ....

Anyway, the little test screen :



note that the white a the begining is definitly a gif bug >_>

And of course, the download is attached. (I hope I don't forget anything in it !) Wait a little for a tuto update, and you will be able to play with it at is full potential  ;)
Concerning the source, I am pretty sure that Asm guru will find a lot, lot of optimization, feel free to take a look  ;D
Also, there is most likely going to have update, for example new optimization, bug fixes, but the syntax won't hopefully change (except if a small change can boost performance like hell  :P)

EDIT : there will be a change in syntax, cause this change does indeed increase performance like hell  :P


Almost finished tuto: https://codewalr.us/index.php?topic=692.msg21406#msg21406

gLib is making is way to color calculator and ez80 !! Screenies in the thread.



The download is obsolete, there is a new version (4.0.0) in the tuto thread  ;)
Last Edit: September 21, 2016, 10:28:24 AM by TheMachine02
Inicia sesión o crea una cuenta para dejar un comentario
u/pimathbrainiac January 19, 2015, 05:14:31 PM
YAY! Now for that portal game... *runs*

I can't wait for the tutorial. This will be really useful!
u/Snektron January 19, 2015, 05:49:29 PM
I've actually been working on some 3d projection myself :)
ASM only though, and so far it has only some basic MultiplyMM and
MultiplyMV, but it is quite optimized (and big, MultiplyMM is 400 row, excl macros).
Anyway, im interested in how you do your calculations? Floating points or
just signed ints? Im using zeda's 24-bit float lib :)
And great work! :D
u/TheMachine02 January 19, 2015, 06:16:11 PM
definitly signed int, as 24 bits float will definitly leed to pretty much sslllooow thing. As we don't have many cycles for calculation, it could only be viable with int. (Altough that maybe half float could be use - 16 bit float, with 8bit mantissa, 7bit exponnent, 1bit sign, allowing doing only a 8x8 multiplication for multiplying two numbers)
My projection code is pretty much slow, since I use division. (altough that I made a fast math one, but limited in range) You can look at the code if you want  ;)
u/Snektron January 19, 2015, 06:21:35 PM
Ah, i was thinking about 16 bit signed int when i started, but i felt that wouldnt be precise enough :/
And i will defenitely look at your src :)
u/TheMachine02 January 19, 2015, 06:24:13 PM
Well, projection IS on 16 bit signed, and is relatively precise ....  :). It actually well enough for a 96x64 screen.
u/Snektron January 19, 2015, 06:32:16 PM
And MVP calculation? i haven't really timed, but i'll see if i can record some gif :P
EDIT:
this is 3 multiplies every frame, running at 15 Mhz mode (its not the fastest, but what do you expect
with floats on a z80 :P). Also it's 'only' 6K since i unrolled ALL multiplications in the mm and mv :P
Last Edit: January 19, 2015, 06:48:08 PM by Cumred_Snektron
u/Dream of Omnimaga January 20, 2015, 09:01:27 AM
I'm glad that this is alive again and now an axiom. :D Hopefully it's easier to use for Axe coders now :D
u/TheMachine02 January 20, 2015, 10:16:16 AM
Matrix calculation is also made with integer, 7bit integer to be more precise. [-64,64] and precision is ok, as well as speed :



stress test with 256 points, 6fps at 6MHz (so for matrix rotation : 2304 fastmul per frame, and 256 div, 512 mul)
this test is without using fast math  :)
u/Keoni29 January 20, 2015, 10:22:26 AM
Which software do you use to record these? The gif error is really strange. Looks quite impressive though :)
u/TheMachine02 January 20, 2015, 10:24:58 AM
I am using wabbitemu, and I don't know what is causing this error. I've never had it before  :(
u/Snektron January 20, 2015, 02:10:47 PM
My GIF is wabbit too yet idont have any problems
u/TheMachine02 January 20, 2015, 02:14:17 PM
bah it isn't too bad, and I think I can ircummvent this bug by launching program at the start of the screen.
u/Dream of Omnimaga January 21, 2015, 05:01:44 AM
Quote from: TheMachine02 on January 20, 2015, 10:16:16 AM
Matrix calculation is also made with integer, 7bit integer to be more precise. [-64,64] and precision is ok, as well as speed :



stress test with 256 points, 6fps at 6MHz (so for matrix rotation : 2304 fastmul per frame, and 256 div, 512 mul)
this test is without using fast math  :)
This almost lools like this could be used for terrain generation because of the low resolution :)
u/novenary January 21, 2015, 02:40:16 PM
Whoa this looks really epic. I didnt know you were making it an Axiom. Great job. :D
Start a Discussion

b/[Inactive] gLib 3D polygon library (TI-83+/84+/CE/83PCE)

A 3D polygon engine for the TI-84 Plus and TI-84 Plus CE calculators, by TheMachine02

3
Topics
Explore Board
Website statistics


MyCalcs | Ticalc.org | Cemetech | Omnimaga | TI-Basic Developer | MaxCoderz | TI-Story | Casiocalc.org | Casiopeia | The Museum of HP Calculators | HPCalc.org | CnCalc.org | Music 2000 Community | TI Education | Casio Education | HP Calcs | NumWorks | SwissMicros | Sharp Calculators
Powered by EzPortal