Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Using floats in div programs
Hi, I have this floating point DLL that could be useful to someone. Maybe I think DomCook might be interested to experiment a bit. It needs some
adjustments and has few functions implemented, but it could be improved and expanded. Then I could make some example of use.
Youtube(fixed) https://youtu.be/Ax2jkyOrsyI
[Edited on 8-5-2019 by Vortigano]
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Impressive.
I'm looking forward to seeing some more examples.
By the way it's just Dom really or Dominic if you like typing.
I haven't got around to figuring out if I can change my user name. I quite like the idea of calling myself "Tumbleweed".
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Hahaha, for a while i was called "Dr Kleiner" and other pseudonyms ... but I became known as Vortigano playing MOBA games, so I preferred to leave it
so that someone who looks for me can find me. In the end, the name takes its value according to our achievements and good deeds.
I fixed the youtube link because a server problem.
|
|
MikeDX
|
|
you guys make me wish i had more time to work on div 😍
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Make the time. That's an order.
|
|
MikeDX
|
|
i shall see that i do Dom
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
dom cook I've sent a u2u msg.
I wanted to tell you about the functions that the dll had:
addfloat(in_a, in_b, out_c);
subfloat(in_a, in_b, out_c);
divfloat(in_a, in_b, out_c);
mulfloat(in_a, in_b, out_c);
float_to_int, sin_float, cos_float.
Then I stopped when I was writing a parser to put "4*10 ^ -5" and things like that... but if you find it useful, I would try to continue it.
[Edited on 9-5-2019 by Vortigano]
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Sorry for the untidiness, but here you have a quick example.
I forgot to mention the sha-256 of the DLL
6E1B1CEB93FC61CD3EF86F447E2F4A9BACC0F79A1B424746932B342F5ACA1FCE
Attachment: float_test.PRG (2kB) This file has been downloaded 844 times
Attachment: float.dll (320kB) This file has been downloaded 916 times
[Edited on 9-5-2019 by Vortigano]
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
https://youtu.be/R1nH69AVjO8
Code adapted for the video:
Attachment: float_test.PRG (2kB) This file has been downloaded 889 times
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
I have a problem. I don't think DIV likes the import command. Does the .dll need to be in a specific folder?
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Quote: Originally posted by dom cook | I have a problem. I don't think DIV likes the import command. Does the .dll need to be in a specific folder? |
A cictec update broke the dll system ... I used a previous compilation of the cictec update since I started writing dlls, and I think it was removed
from the server. So I think I should upload the previous update of cictec.
This means that nobody could use any dll that I have built :/
|
|
dom cook
Div Pro
Posts: 387
Registered: 4-3-2016
Member Is Offline
|
|
Highly frustrating.
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
this is the cictec update that works fine with dll DIVDX-windows-18.04.26 the file exceed the forum file size limit.
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Here's the link:
https://drive.google.com/open?id=1gSgubvTLpIVHnnQtQREITLjTZT...
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
This example uses cosine sine and float_to_int ().
Remember that the trigonometric calculations are in radians, they are not in degrees. ^u^)/
Attachment: float_test2.PRG (4kB) This file has been downloaded 871 times
[Edited on 9-5-2019 by Vortigano]
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
I'm working on the parser in c... is going to ruin my brain, but I love it.
When I learn to analyze variables in a string and fix some bugs I will mix it with the divdx dll.
Blank line to exit, accept "+ - / * ^".
Exponents only positive integers for now.
Attachment: para dll v0.1.exe (11kB) This file has been downloaded 905 times
|
|
MikeDX
|
|
Vortigano I think we should discuss this. There is no reason why we could not include this in the main DIV core. That is how mode8 started (as a DLL),
and how the original div2 netplay began - there are even hints of this in the original source still today!
Is the dll source available? Could you share it with me privately if you don't want to publically share it so we can consider if DIV could benefit
from it being included in the main tree.
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
Quote: Originally posted by MikeDX | Vortigano I think we should discuss this. There is no reason why we could not include this in the main DIV core. That is how mode8 started (as a DLL),
and how the original div2 netplay began - there are even hints of this in the original source still today!
Is the dll source available? Could you share it with me privately if you don't want to publically share it so we can consider if DIV could benefit
from it being included in the main tree.
|
For now I'm not interested in making it public, but I can give you a copy of the source code when I adjust some things. Maybe you could improve the
parser as I have very little experience with C (less than 1 year) and programming in general. I only have strong experience with microchip RISC
assembler. I wish someone could first use it for something and then consider publishing the source code... that would make me happy.
|
|
Vortigano
DIV Regular
Posts: 237
Registered: 12-1-2017
Location: Ciudad de Buenos Aires, Argentina
Member Is Offline
|
|
I think what could be added would be inside the div-core a definition for float of 4bytes that I suppose would not break the alignment of the int32_t
memory.
This way we could simply declare and define a DIV variable as "float var_x = 0.05;".
|
|