3D cube routine example ?

All 680x0 related coding posts in this section please.

Moderators: exxos, simonsunnyboy, Mug UK, Zorro 2, Moderator Team

rpineau
Atari Super Hero
Atari Super Hero
Posts: 501
Joined: Wed Jun 29, 2011 6:39 am
Location: California / USA
Contact:

Re: 3D cube routine example ?

Postby rpineau » Tue Jun 16, 2015 7:15 pm

@exxos : Any good 3D code will NOT use the MULx and DIVx instruction of the 68000 which is why you don't see a huge improvement.
@AtariZoll : executing it the way exxos shows doesn't have a lot of setup, you load the bin fine (relocatable dri linkable object code) and jump into it. So it you start counting just before the call instruction you get fairly accurate runtime (I trace the code that does the call and it doesn't do a lot before doing the jsr into my code).

Rodolphe
Falcon + AB040 + Eclipse PCI + ATI Rage VGA card + NE2000 Ethernec + HxC Floppy Emulator
MegaSTE 4MB + CosmosEx / 1040 STF for hardware dev
http://www.rti-zone.org/atari.php

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 685
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: 3D cube routine example ?

Postby mfro » Wed Jun 17, 2015 3:52 pm

Since the application's name ist GEMBench (and not "DemoBench" ;) ), I just hacked together this one:

VDI rotating cube


AtariZoll
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2945
Joined: Mon Feb 20, 2012 4:42 pm
Contact:

Re: 3D cube routine example ?

Postby AtariZoll » Wed Jun 17, 2015 4:53 pm

rpineau wrote:@AtariZoll : executing it the way exxos shows doesn't have a lot of setup, you load the bin fine (relocatable dri linkable object code) and jump into it. So it you start counting just before the call instruction you get fairly accurate runtime (I trace the code that does the call and it doesn't do a lot before doing the jsr into my code).
Rodolphe


As I said, there is longer initialization before displaying of cube/thetraeder starts. Only reasonable way for accurate measuring is that called program/subrutine returns the result. That's elementary and supported by (T)OS .
There is way to stop global warming.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: 3D cube routine example ?

Postby exxos » Wed Jun 17, 2015 7:41 pm

mfro wrote:Since the application's name ist GEMBench (and not "DemoBench" ;) ), I just hacked together this one:



Nice :)maybe you could add a timer in there and loop it for 20 seconds or so and print the score after ? Then I could try it at 16mhz speeds, but don't think it would show any higher speeds than other VDI tests in gembench :shrug:
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 685
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: 3D cube routine example ?

Postby mfro » Wed Jun 17, 2015 7:46 pm

exxos wrote:
mfro wrote:Since the application's name ist GEMBench (and not "DemoBench" ;) ), I just hacked together this one:



Nice :)maybe you could add a timer in there and loop it for 20 seconds or so and print the score after ?


Sure. The video above has been shot with Aranym, however, where VDI drawing is virtually free (because of Natfeats). Firebee speed is comparable.

With Hatari (which comes pretty close to a Falcon speedwise) it's like that:

spinning VDI cube



(about a second per frame)


User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: 3D cube routine example ?

Postby exxos » Wed Jun 17, 2015 10:09 pm

Cool - can you post your program so I can try it out on my ST's here ?
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 685
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: 3D cube routine example ?

Postby mfro » Thu Jun 18, 2015 4:20 am

Sure.

I'd assume it will be nice to your speeder since it's using ROM routines for drawing and very "straightforward" (just to avoid the word stupid) projection code.
You do not have the required permissions to view the files attached to this post.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: 3D cube routine example ?

Postby exxos » Thu Jun 18, 2015 9:05 am

355ms 8mhz ST
255ms 16mhz ST

So about 40% faster on a 16mhz ST. That is about what expected with ROM functions :)

btw- on my ST you app says "illegal AES function call" when it first loads, but seems to work ok after selecting the cube test :)
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 685
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: 3D cube routine example ?

Postby mfro » Thu Jun 18, 2015 3:15 pm

exxos wrote:btw- on my ST you app says "illegal AES function call" when it first loads, but seems to work ok after selecting the cube test :)


Known issue.

I use the same code as testbed for AES 3.40 popup menus so there are calls that a plain ST doesn't understand. There should be no harm besides the alert message.

User avatar
exxos
Hardware Guru
Hardware Guru
Posts: 4933
Joined: Fri Mar 28, 2003 8:36 pm
Location: England
Contact:

Re: 3D cube routine example ?

Postby exxos » Thu Jun 18, 2015 4:56 pm

Can anyone shed any light on doing underline in button text ?

gbp.jpg


On the left is the GB window as it loads form RSC file. For example GEM Dialog Box on the actual GB screen (on right) as the "D" underlined. But in the RSC file (and when I loaded the form) it says "[D" . So I assume in the HGK somewhere it looks for the "[" bracket and makes the letter after it a underlined letter.

I know there is VST Effects, but I only got that to do full line in that effect. I assume at some point the button text gets redone somehow, but no idea how. I'm trying to backtrack the GB code, but there are so many jumps in the code all over the place that its hard to actually work out whats going on. Really this is the only hold up I have so far in making progress with GB6 :roll:
You do not have the required permissions to view the files attached to this post.
4MB STFM 1.44 FD- VELOCE+ 020 STE - Falcon 030 CT60 - Atari 2600 - Atari 7800 - Gigafile - SD Floppy Emulator - PeST - various clutter

http://www.exxoshost.co.uk/atari/ All my hardware guides - mods - games - STOS
http://www.exxoshost.co.uk/atari/last/storenew/ - All my hardware mods for sale - Please help support by making a purchase.
http://ataristeven.exxoshost.co.uk/Steem.htm Latest Steem Emulator

User avatar
mfro
Atari Super Hero
Atari Super Hero
Posts: 685
Joined: Thu Aug 02, 2012 10:33 am
Location: SW Germany

Re: 3D cube routine example ?

Postby mfro » Thu Jun 18, 2015 5:20 pm

With standard AES, this is only possible using USERDEFs.

These are AES objects that call back a user defined routine which is supposed to draw the UI element using VDI functions.
A string with a single underlined character, for example, could be drawn using v_gtext() to draw the string, vqt_extend() to obtain the position of the underlined character and v_pline() to draw the underline.

fitten
Atarian
Atarian
Posts: 1
Joined: Tue May 31, 2016 10:48 pm

Re: 3D cube routine example ?

Postby fitten » Wed Jun 01, 2016 2:00 pm

AtariZoll wrote:In case of Ataris (and other oldies) without FPU integer divisions are avoided, even if there is such CPU command, because slowness. Instead it tables with precalculated results are used.


You can use tables of precalculated transcendentals and use fixed point arithmetic and it's all integer instructions (no FPU needed).


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 3 guests