3D gamers floating point for z80

Страница 1/3
| 2 | 3

By hit9918

Prophet (2867)

Аватар пользователя hit9918

17-06-2018, 21:26

webmsx demo
can you see the demo?
The dream of a certain game in a playable framerate :D

it is using superfast floating point with 8bit mantissa :D
why floating point. say the window is 2 meters wide. 256 pixels are 2 meters. then 16bit make a universe of 512 meters size lol.
the code is here
https://sites.google.com/site/tueftlerlabs/home/downloads/de...
https://sites.google.com/site/tueftlerlabs/home/downloads

and when coding it I felt like the z80 was MADE for maths
there is not the usual register allocation pain because every register got the same shift instructions

Для того, чтобы оставить комментарий, необходимо регистрация или !login

By Pencioner

Paladin (951)

Аватар пользователя Pencioner

17-06-2018, 21:51

I bow to your great asm and math skills, sir!
actually, the great speed

By hit9918

Prophet (2867)

Аватар пользователя hit9918

17-06-2018, 22:07

Thanks! Another thing is that there is not the elite fisheye look, it is normal 3D.
I dream of the whole thing more pleasant and playable.

By Grauw

Ascended (8452)

Аватар пользователя Grauw

18-06-2018, 00:17

Looks neat!

What’s the advantage of floating point over fixed point?

By PingPong

Prophet (3448)

Аватар пользователя PingPong

18-06-2018, 00:35

screen mode?

By DarkSchneider

Paladin (869)

Аватар пользователя DarkSchneider

18-06-2018, 13:27

Hello, floating point or fixed point?

I would say sc5 using the line command.

By NYYRIKKI

Enlighted (5382)

Аватар пользователя NYYRIKKI

18-06-2018, 15:23

About floating point / fixed point... MSX-BASIC uses 10base floating point numbers -> It is horribly slow. MSX-BASIC kun compiler uses 2base floating point numbers ->That is a lot better, but still... since you know the scale you are working, fixed point math should be a lot faster to use.

By hit9918

Prophet (2867)

Аватар пользователя hit9918

18-06-2018, 16:13

it is nice that is suspected screen 5 hardware lines, but it is msx1 screen 2. and floaing point Big smile
the lines are drawn in RAM and the copy to vram uses the VDP delay time to CLS the RAM buffer.

Quote:

What’s the advantage of floating point over fixed point?

that floating point is faster Big smile
the graphics get away with a 8bit * 8bit -> 8bit mul and 8bit / 8bit -> 8bit div!
look how the fdiv function goes with 8bit ADD and SUB. and has only 8 iterations.
while fixpoint got to be some 16bit * 16bit -> 24bit mul.

By hit9918

Prophet (2867)

Аватар пользователя hit9918

18-06-2018, 16:43

a floating point add is much slower than fixpoint add.
so in a 2D game fixpoint is better, but a 3D game is a different thing. in 3D you need mul as often as add.

By Grauw

Ascended (8452)

Аватар пользователя Grauw

18-06-2018, 18:09

There's no speed benefit to multiply though isn't there? Shifting by an arbitrary amount is faster though.

To speed up multiply, could work in a logarithmic scale Smile.

By Metalion

Paladin (1006)

Аватар пользователя Metalion

18-06-2018, 18:15

Grauw wrote:

To speed up multiply, could work in a logarithmic scale Smile.

Yep, I was thinking the same thing.
But then you lose speed on addition and substraction ...

https://en.wikipedia.org/wiki/Logarithmic_number_system

Страница 1/3
| 2 | 3