gamelly / core-native-gba

create your own game-engine with just lua for game boy advance
https://gamelly.github.io/core-native-gba/
9 stars 0 forks source link

downgrade from lua 5.4 to lua 5.1 (only integer) as default #5

Open RodrigoDornelles opened 3 weeks ago

RodrigoDornelles commented 3 weeks ago

image

PinhoLinux commented 3 weeks ago

Qual o problema?

RodrigoDornelles commented 3 weeks ago

Qual o problema?

o gameboy advanced não possui FPU então operacores matematicas são muito custosas por emular ponto fluante em software, eu não sabia que com lua 5.1 era possivel alterar o number além de float32 ou double, no caso eu vou dar suporte a ambos os casos lua 5.4 com float32 ou então lua 5.1 (apenas inteiros), por padrão vai ser lua 5.1 porque isso vai ordens de grandeza em perfomance mas ainda vai ser possivel alternar usando uma flag com cmake -DLUA_MODE=


The Gameboy Advanced does not have an FPU so mathematical operations are very expensive to emulate floating point in software, I did not know that with Lua 5.1 it was possible to change the number beyond float32 or double, in this case I will support both cases Lua 5.4 with float32 or Lua 5.1 (only integers), by default it will be Lua 5.1 because this will change orders of magnitude in performance but it will still be possible to switch using a flag with cmake -DLUA_MODE=

PinhoLinux commented 3 weeks ago

Vou escreve sobre, já já te retorno. As 18:20hrs