Quake 2 on Falcon030

All 680x0 related coding posts in this section please.

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

User avatar
calimero
Atari God
Atari God
Posts: 1836
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Quake 2 on Falcon030

Postby calimero » Sat Jan 07, 2017 9:31 am

Ok. I found this video at 1:53 min. https://m.youtube.com/watch?v=FQ6WtQMFCSM

It is Pentium 200MHz NOT mmx (not sure if anyway quake use mmx instructions) running Quake II (without cache, with 256KB and 512KB cache).
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X

User avatar
Ragstaff
Atari Super Hero
Atari Super Hero
Posts: 568
Joined: Mon Oct 20, 2003 3:39 am
Location: Melbourne Australia
Contact:

Re: Quake 2 on Falcon030

Postby Ragstaff » Sat Jan 07, 2017 1:22 pm

I thought all Pentiums after 200 mhz were MMX... or maybe it was 233.
Anyway, I can confirm I used to run Quake II on my Pentium 133 (not mmx), but at full screen the frame rate was a little low, I would take the borders in 2 steps. I can't remember how much RAM I had at the time, it definitely ran on 32mb but I may have run it before then on 16mb. Not sure.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sat Jan 07, 2017 1:53 pm

The PC version of Quake 2 uses a FPU trick (the rasterizer is coded in i386 assembly) to speed up texturing. The portable (compiled C) version of the code I'm using can't replicate this trick effectively so its a good bit slower when tested on the same PC. Also the portable version is a reference algorithm and slightly errs on the side of correctness, compared with the asm version which takes a few extra shortcuts for speed.

Still the whole engine assumes FPU performance from that generation onwards so it doesn't fit very well on these old chips. The Pentium FPU can execute something like 20-50x more work per single clock, probably even more for most ops.

It also assumes virtually mapped / logical memory - e.g. it requests a flat 16mb of scratch space just to load a map, required or not. That sort of thing doesn't work too well on a Falcon :) Fortunately those problems are solved with the F030 rasterizer, but the FPU performance problem remains hanging over the game code - which is what I'm investigating atm.

I think the conclusion in the end will be close to what I guessed though at the beginning...

A plain Falcon should be able to run the whole engine providing no AIs are awake on the map and moving around. The costs I've seen appear to be quite manageable even for the attract mode replay (I have to assume for now the attract mode demo replay is *not* properly running collisions or predictions because the cost for these is too low).

It should be able to run deathmatch mode on an empty map, and (hopefully) with pickup items and 2 players moving around the map (with some optimisation effort applied). This is what I was hoping for.

It is likely to struggle though with singleplayer AI content awake and moving around a map. I haven't seen this yet in the profiling but I think it will become evident when I get it to boot properly into a singleplayer game instead of just falling into attract mode. I can't even guess if that's worth trying to fix but it's probably a stretch. Will look at the other cases first.

User avatar
Trixster
Atari User
Atari User
Posts: 40
Joined: Sat Nov 07, 2015 1:15 pm
Location: York

Re: Quake 2 on Falcon030

Postby Trixster » Sun Jan 08, 2017 9:25 am

Disregard!
Last edited by Trixster on Sun Jan 08, 2017 12:16 pm, edited 1 time in total.
Atari Falcon + FX Xtender | Atari 2600 | A1200 + 80mhz B1260 + 128MB + Indi AGA2 + Ide-fix Express
A4000/060 A3660 64mhz + 64MB + Indi AGA + Mediator & Voodoo3 | C64 | Saturn | PS1 | CPC6128
Acorn A3020 + 4MB + LAN | A3000 | BBC B + 128K SWR + 20K Shadow Ram | A500 | SNES

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sun Jan 08, 2017 12:15 pm

Hi,

Trixster wrote:Hi,
I've just been trying to get the test release 2 and 3 from earlier in the thread working but I'm getting a black screen after launching either of them. Both archives have been decompressed with strip into their own folders. This is on a falcon with newly formatted hd, 14mb ram and 68882 fpu.
Thanks!


Ok I'm having a look at it just now. The q2testpublic3.zip I shared a while back does seem to run here but I only checked in Hatari 2.00 just now. It was tested on HW before releasing it but I was planning on releasing a small update soon anyway and that needs tested again on HW.


You do need to specify which map to load on the commandline otherwise it won't run. So type in 'fatal1' for example. There are 3 maps prepared:

fatal1
ikdm2
ikdm9

You can't run other maps unless I preprocess them first - the real maps use texture names which exceed 8.3 format and so produce lots of texture errors. I have to convert them and place 8.3 hashed versions in a tex83/ folder which the maps then refer to instead. Other than that the maps are the same format as Q2.

User avatar
Trixster
Atari User
Atari User
Posts: 40
Joined: Sat Nov 07, 2015 1:15 pm
Location: York

Re: Quake 2 on Falcon030

Postby Trixster » Sun Jan 08, 2017 12:18 pm

Ah! You just typed that literally as I worked out my mistake and edited my original post! Sorry to waste your time!

I hadn't specified the map in the prompt. Doh!
Atari Falcon + FX Xtender | Atari 2600 | A1200 + 80mhz B1260 + 128MB + Indi AGA2 + Ide-fix Express
A4000/060 A3660 64mhz + 64MB + Indi AGA + Mediator & Voodoo3 | C64 | Saturn | PS1 | CPC6128
Acorn A3020 + 4MB + LAN | A3000 | BBC B + 128K SWR + 20K Shadow Ram | A500 | SNES

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sun Jan 08, 2017 12:24 pm

Yeah I released the demo in a hurry and the startup code is a bit of a mess. You get warnings about missing PAK file (it has unfinished PAK support) and no error messages for common mistakes... but at least it works :)

User avatar
Trixster
Atari User
Atari User
Posts: 40
Joined: Sat Nov 07, 2015 1:15 pm
Location: York

Re: Quake 2 on Falcon030

Postby Trixster » Sun Jan 08, 2017 12:27 pm

Well, I can only say it's incredible. I read this thread from start to finish (and the Badmood one) over the Christmas break whilst I waited for my Falcon to arrive (you might have guessed I'm a complete noob at everything Atari - this falcon is my first one, I'm an Amiga guy!) and I just can't comprehend what you've achieved so far. So impressive.
Atari Falcon + FX Xtender | Atari 2600 | A1200 + 80mhz B1260 + 128MB + Indi AGA2 + Ide-fix Express
A4000/060 A3660 64mhz + 64MB + Indi AGA + Mediator & Voodoo3 | C64 | Saturn | PS1 | CPC6128
Acorn A3020 + 4MB + LAN | A3000 | BBC B + 128K SWR + 20K Shadow Ram | A500 | SNES


User avatar
Zogging Hell
Atari Super Hero
Atari Super Hero
Posts: 870
Joined: Sat Apr 29, 2006 12:08 pm
Location: Bristol, UK
Contact:

Re: Quake 2 on Falcon030

Postby Zogging Hell » Sun Jan 08, 2017 1:23 pm

Amazing as usual Doug. I did laugh as it the straight port of the PC code seems to be running at the same FPS as some 3D construction kit games :) I reckon it might be playable for people like me who are quite happy with things running at anything over 5fps (60fps - pah!) :)
Firebee, Falcon CT60, Milan 040, Falcon MkI, TT, Mega STe, Mega ST + Lots of STs of various flavours

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sun Jan 08, 2017 4:03 pm

Here's a more recent build, using the new gcc compiler. It's also a lot smaller (and is packed also -> 60k).

https://dl.dropboxusercontent.com/u/129 ... ublic4.zip

The rendering won't be any quicker since that's all in 68k but the collision detection might benefit - it can be a bit sluggish when walking across complicated geometry on some maps.

Not had a lot of time to test it properly but it works on here in Hatari 2.0.

User avatar
Eero Tamminen
Atari God
Atari God
Posts: 1433
Joined: Sun Jul 31, 2011 1:11 pm

Re: Quake 2 on Falcon030

Postby Eero Tamminen » Sun Jan 08, 2017 9:19 pm

Thanks, works great also in Hatari Mercurial tip!

You probably know of these already, but I thought to mention anyway something I noticed when tracing GEMDOS operations...

All environment files are first tried to be loaded from "env\" dir, before Quake tries the correct "data\baseq2\env\" path, and all player files are first tried to be loaded from "players\male\" before Quake tries the correct "data\baseq2\players\male\".

And the game tries to load these, but fails (dir missing), I guess when I clicked the mouse button:
* models\objects\rocket\tris.md2
* data\baseq2\models\objects\rocket\tris.md2

When loading the map BSP file, Hatari GEMDOS emulation complains that it needs to cut extra characters from the file name. Is there perhaps some string termination missing?

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Mon Jan 09, 2017 4:19 pm

Hi Eero,

Good to know it still works - although it can't use TT ram with the current build since it's stealing the PMMU hardware and enforcing 24bit addressing as a side effect. However it shouldn't matter for the maps provided - they all fit in memory ok.

Eero Tamminen wrote:All environment files are first tried to be loaded from "env\" dir, before Quake tries the correct "data\baseq2\env\" path, and all player files are first tried to be loaded from "players\male\" before Quake tries the correct "data\baseq2\players\male\".


A lot of this has to do with nonworking PAK support, which results in fail/retry behaviour in the log. So currently it's 'normal' even if it looks ugly.

Eero Tamminen wrote:And the game tries to load these, but fails (dir missing), I guess when I clicked the mouse button:
* models\objects\rocket\tris.md2
* data\baseq2\models\objects\rocket\tris.md2


It does try to load meshes for entities which are present on the map (and for things like weapons, rockets etc), but is currently unable to draw them. So I wasn't careful about providing the meshes it doesn't really need yet.

Eero Tamminen wrote:When loading the map BSP file, Hatari GEMDOS emulation complains that it needs to cut extra characters from the file name. Is there perhaps some string termination missing?


I've seen this but haven't looked closely yet. This one probably a real bug yes.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Mon Jan 09, 2017 6:52 pm

Seems like the last build I posted doesn't run on HW, and it's tripping on posix directory slashes (which Hatari absorbs).

On top of that the sky format has changed, and there's some other issue I haven't identified yet...

So consider the qtestpublic4.zip broken (or hatari-only) until I figure out what happened and upload a new one.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Mon Jan 09, 2017 8:07 pm

Ok it was mostly silly stuff - including my f030's data dir being out of date and stuff missing :)

I should be able to upload a fixed version soon, with new maps, working sky etc.

The gcc6 build is running about 1.5% faster on a moderate scene - which is not huge but not bad for 'free', especially since the C code doesn't contribute much overhead now...

User avatar
Trixster
Atari User
Atari User
Posts: 40
Joined: Sat Nov 07, 2015 1:15 pm
Location: York

Re: Quake 2 on Falcon030

Postby Trixster » Wed Jan 11, 2017 12:46 pm

calimero wrote:Ok. I found this video at 1:53 min. https://m.youtube.com/watch?v=FQ6WtQMFCSM

It is Pentium 200MHz NOT mmx (not sure if anyway quake use mmx instructions) running Quake II (without cache, with 256KB and 512KB cache).


I find this very interesting from a 68060 point of view given that a 512kb l2 cache 200Mhz Pentium will apparently only return 7.8fps (albeit at 320x240) whereas an 80Mhz 68060 can return 8.5 fps (albeit at 320x200). That seems somewhat off-kilter! Maybe it's 640x480.
Last edited by Trixster on Thu Jan 12, 2017 6:29 pm, edited 1 time in total.
Atari Falcon + FX Xtender | Atari 2600 | A1200 + 80mhz B1260 + 128MB + Indi AGA2 + Ide-fix Express
A4000/060 A3660 64mhz + 64MB + Indi AGA + Mediator & Voodoo3 | C64 | Saturn | PS1 | CPC6128
Acorn A3020 + 4MB + LAN | A3000 | BBC B + 128K SWR + 20K Shadow Ram | A500 | SNES

User avatar
calimero
Atari God
Atari God
Posts: 1836
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Quake 2 on Falcon030

Postby calimero » Wed Jan 11, 2017 2:15 pm

Trixster wrote:
calimero wrote:Ok. I found this video at 1:53 min. https://m.youtube.com/watch?v=FQ6WtQMFCSM

It is Pentium 200MHz NOT mmx (not sure if anyway quake use mmx instructions) running Quake II (without cache, with 256KB and 512KB cache).


I find this very interesting from a 68060 point of view given that a 512kb l2 cache 200Mhz Pentium will apparently only return 7.8fps (albeit at 320x240) whereas an 80Mhz 68060 can return 8.5 fps (albeit at 320x200). That seems somewhat off-kilter!

you refer to NovaCoder 68060 Amiga version of Quake II, right?

Doug said that rendering part of original Quake II is writen in x86 assembler so NovaCoder manage to outperform ID software on "inferior" hardware (in regard of bitplane graphics that Amiga AGA use...) and lack of 512KB cache in 68060 (it has only 16KB!). Impresive!
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X

User avatar
Trixster
Atari User
Atari User
Posts: 40
Joined: Sat Nov 07, 2015 1:15 pm
Location: York

Re: Quake 2 on Falcon030

Postby Trixster » Wed Jan 11, 2017 2:27 pm

Yeah, and pretty unbelievable! Something must be amiss with the set up of the pc in that video or the way he's testing.
Atari Falcon + FX Xtender | Atari 2600 | A1200 + 80mhz B1260 + 128MB + Indi AGA2 + Ide-fix Express
A4000/060 A3660 64mhz + 64MB + Indi AGA + Mediator & Voodoo3 | C64 | Saturn | PS1 | CPC6128
Acorn A3020 + 4MB + LAN | A3000 | BBC B + 128K SWR + 20K Shadow Ram | A500 | SNES

User avatar
calimero
Atari God
Atari God
Posts: 1836
Joined: Thu Sep 15, 2005 10:01 am
Location: STara Pazova, Serbia
Contact:

Re: Quake 2 on Falcon030

Postby calimero » Thu Jan 12, 2017 5:48 pm

Quake 2 was planed as RPG game!! :)

https://www.youtube.com/watch?v=zcxEBLEnbng
using Atari since 1986.http://wet.atari.orghttp://milan.kovac.cc/atari/software/ ・ Atari Falcon030/CT63/SV ・ Atari STe ・ Atari Mega4/MegaFile30/SM124 ・ Amiga 1200/PPC ・ Amiga 500 ・ C64 ・ ZX Spectrum ・ RPi ・ MagiC! ・ MiNT 1.18 ・ OS X

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Thu Jan 19, 2017 10:59 pm

I should be able to release an update soon using the custom-made maps from the later YT vids, with colour lightmaps, special skies etc.

grab0014.png


This was working for a long time but couldn't be used without special build flags and hacking around with filenames/paths and random bits of code.

I have now added a proper commandline parser to the engine startup code so you can specify maps, palettes, skies, surface cache config etc. when launching the .ttp.

Have also made some additional optimisations and fixed some bugs.
You do not have the required permissions to view the files attached to this post.

User avatar
Mindthreat
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 145
Joined: Tue Dec 16, 2014 4:39 am
Contact:

Re: Quake 2 on Falcon030

Postby Mindthreat » Fri Jan 20, 2017 4:33 am

dml wrote:I should be able to release an update soon using the custom-made maps from the later YT vids, with colour lightmaps, special skies etc.

grab0014.png

This was working for a long time but couldn't be used without special build flags and hacking around with filenames/paths and random bits of code.

I have now added a proper commandline parser to the engine startup code so you can specify maps, palettes, skies, surface cache config etc. when launching the .ttp.

Have also made some additional optimisations and fixed some bugs.


Absolutely beautiful as usual! :cheers:
"To create the future, you must first embrace the past." - http://cerka.weebly.com

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Fri Jan 20, 2017 7:28 pm

Have got a working version of the full Q2 collision detection method now, with swept primitives. At least against the map. Testing against models/meshes is separate.

This version won't get stuck in walls etc. and is reliable enough to be worth optimising properly. The previous one was not worth the effort, with too many funny cases.

It's probably too expensive as-is but it's a good place to start.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3375
Joined: Sat Jun 30, 2012 9:33 am

Re: Quake 2 on Falcon030

Postby dml » Sat Feb 04, 2017 11:49 pm

A few more changes recently...

- re-optimised the indexing of faces, which saves 5% on that stage
- converted some of the surface cache routines code to use self-modifying code during setup, to reduce access to stack variables
- started looking at ways to redo the collision detection so it's never dealing with leaf node meshes - just a pure bsp algorithm. this makes it easier to optimise for size/cache.

Have also looked at whats involved in coupling the new renderer to the Q2 engine. But there is some work to do on it first.

User avatar
LaceySnr
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 107
Joined: Wed Jun 26, 2013 5:00 am
Contact:

Re: Quake 2 on Falcon030

Postby LaceySnr » Sun Feb 05, 2017 3:28 am

Awesome work mate! Amazed at what you can pull out of these machines :)

User avatar
Atari030
Captain Atari
Captain Atari
Posts: 444
Joined: Mon Feb 27, 2012 6:14 am
Location: Melbourne, Australia

Re: Quake 2 on Falcon030

Postby Atari030 » Sun Feb 05, 2017 4:19 am

Agreed, keeping up with these threads is mind boggling.


Social Media

     

Return to “680x0”

Who is online

Users browsing this forum: No registered users and 2 guests