English Amiga Board


Go Back   English Amiga Board > News

 
 
Thread Tools
Old 02 March 2013, 06:53   #1
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
Strife AGA - Now Available!

Hi guys,

I got my A1200 setup finally up and running so of course i decided to set up a compiler and start messing around

I managed to get an AGA Port of Strife ported over in a few evenings of coding. If you don't know what this is its an old FPS based RPG that uses the Doom engine by Rogue. It's the last ever title
that used the Doom engine and its a really awesome game

Here's a quick look at how its performing - note its running on a Blizzard 1260 060 at 50mhz. Speed is looking pretty good, i could probably tweak it faster. I don't know if an 030 will handle this. Id say a minimum 040/40mhz to be considered playable


[ Show youtube player ]


now available on Aminet - http://aminet.net/game/misc/StrifeAGA-1.0.lha

cheers

Last edited by lantus360; 11 March 2013 at 06:01.
lantus360 is offline  
Old 03 March 2013, 20:23   #2
Rebel-CD32
Amiga will never die!
 
Rebel-CD32's Avatar
 
Join Date: Nov 2004
Location: Tasmania, Australia
Age: 43
Posts: 532
Send a message via MSN to Rebel-CD32
Great work! Thanks for bringing another classic PC game to the Amiga, it looks like it runs just right on your 060 but I'm still curious to see it running on a 030 since it's all I've got and what most other A1200 owners seem to have too. I'm not sure if it's of much use, but DoomAttack was the most optimised Doom port for the Amiga, so the source code might hold a few helpful ideas if you haven't browsed through it already. It's on Aminet now - http://aminet.net/package/game/shoot/DoomAttack_src
Rebel-CD32 is offline  
Old 03 March 2013, 22:29   #3
Bamiga2002
BlizzardPPC'less
 
Bamiga2002's Avatar
 
Join Date: May 2004
Location: Finland
Age: 46
Posts: 3,210
Send a message via MSN to Bamiga2002
"I'd buy that for a dollar!"
Bamiga2002 is offline  
Old 03 March 2013, 22:37   #4
s2325
Zone Friend
 
s2325's Avatar
 
Join Date: Jun 2006
Location: Gargore
Age: 43
Posts: 17,789
Long ago I thought it's something like 'remake' of Legends of Valour but with more action. If I remember correctly if you walk armed you will attract more guardians, I didn't understand that at first. I was not sure about where I am because of medieval castles mixed with futuristic weapons.
s2325 is offline  
Old 03 March 2013, 23:51   #5
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Looking forward to giving it a go
NovaCoder is offline  
Old 04 March 2013, 07:04   #6
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
minor update - now with sound - [ Show youtube player ]

Rebel - i am certainly interested in squeezing as much performance out as possible so i will take a look at the DoomAttack source. Having said that i cant see it running very well on an 030. Maybe at one of the smaller screen sizes it might be playable

Right now im timedemo'ing at 17fps on my 060/50mhz. I'm not sure where that lies in terms of comparisons to other similar Doom engine games. Id be interested in any numbers people may have as a guideline
lantus360 is offline  
Old 04 March 2013, 15:19   #7
Cammy
Registered User
 
Cammy's Avatar
 
Join Date: Aug 2007
Location: Tasmania, Australia
Age: 39
Posts: 1,189
It seems that Doom runs at around 24 FPS on a 060/50 when running the TimeDemo according to these two results:
http://amigaworld.net/modules/newbb/...order=0#455080
http://www.complang.tuwien.ac.at/misc/doombench.html

But Strife looks more detailed than Doom, more similar to HeXen and Heretic I guess.
Cammy is offline  
Old 05 March 2013, 02:47   #8
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
Thanks Cammy yeah I think Strife is a little more detailed than Doom having said that I think the FPS should be better. I'm working on patching in some DoomAttack asm. Hopefully that will help some
lantus360 is offline  
Old 05 March 2013, 04:24   #9
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
I used some DoomAttack ASM for my port of BOOM BTW, I'll see if I can dig out the relevant parts for you.

Ok, I used this from m_fixed.h

Code:
typedef int fixed_t;


static __inline__ fixed_t FixedMul(fixed_t eins, fixed_t zwei) {
#ifndef version060

	__asm __volatile
	("muls.l %1,%1:%0 \n\t"
	 "move %1,%0 \n\t"
	 "swap %0 "
					 
	  : "=d" (eins), "=d" (zwei)
	  : "0" (eins), "1" (zwei)
	);

	return eins;

#else
	__asm __volatile
	("fmove.l	%0,fp0 \n\t"
	 "fmul.l	%2,fp0 \n\t"
	 "fmul.x	fp7,fp0 \n\t"
	 "fmove.l	fp0,%0"
					 
	  : "=d" (eins)
	  : "0" (eins), "d" (zwei)
	  : "fp0"
	);

	return eins;
#endif
}



static __inline__ fixed_t FixedDiv(fixed_t eins, fixed_t zwei) {
	__asm __volatile

#ifndef version060
	("move.l	%0,d3\n\t"
	 "swap      %0\n\t"
	 "move.w    %0,d2\n\t"
	 "ext.l		d2\n\t"
	 "clr.w		%0\n\t"
	 "tst.l		%1\n\t"
	 "jeq		3f\n\t"
	 "divs.l	%1,d2:%0\n\t"
	 "jvc		1f\n"

	 "3: eor.l %1,d3\n\t"
	 "jmi       2f\n\t"
	 "move.l	#0x7FFFFFFF,%0\n\t"
	 "jra		1f\n"

	 "2: move.l #0x80000000,%0\n"
	 "1:\n"
	 
	 : "=d" (eins), "=d" (zwei)
	 : "0" (eins), "1" (zwei)
	 : "d2","d3"
	);
#else
	("tst.l		%1\n\t"
	 "jne		1f\n\t"

	 "eor.l		 %1,%0\n\t"
	 "jmi       2f\n\t"
	 "move.l	#0x7FFFFFFF,%0\n\t"
	 "jra		9f\n"

	 "2: move.l #0x80000000,%0\n\t"
     "jra		9f\n"
     
	 "1: fmove.l %0,fp0 \n\t"
	 "fdiv.l	%2,fp0 \n\t"
	 "fmul.x		fp6,fp0 \n\t"
	 "fmove.l	fp0,%0\n"

	 "9:\n"
	 
	 : "=d" (eins)
	 : "0" (eins), "d" (zwei)
	 : "fp0"
	);
#endif
	return eins;
}

static __inline__ int ULongDiv(int eins,int zwei)
{
	__asm __volatile
	(
		"divul.l %2,%0:%0\n\t"
		
		: "=d" (eins)
		: "0" (eins), "d" (zwei)
	);

	return eins;
}
Used here for example:
Code:
//
// I_GetTime
//
static long startTime = 0;

int  I_GetTime (void) {
	static struct timeval tp;
	
	GetSysTime(&tp);
	
    return (tp.tv_secs) * TICRATE + ULongDiv(tp.tv_micro * TICRATE, 1000000);
}
I originally used the 030 versions then swapped to 060 later on, both seemed to work ok. If you decide to use the 060 versions you need to do some addition setup (check out the DoomAttack source for details).

I code with gcc BTW, you might have to make some changes if you use something else.

Last edited by NovaCoder; 05 March 2013 at 04:31.
NovaCoder is offline  
Old 05 March 2013, 05:06   #10
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
thanks. Im already using those calls to handle the fixed point div/mult stuff. Im looking at patching in asm in r_engine.asm now
lantus360 is offline  
Old 05 March 2013, 05:33   #11
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
What compiler are you using BTW?
NovaCoder is offline  
Old 05 March 2013, 06:24   #12
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
AmiDevCpp - GCC 3.4

ive also got Cubic IDE and make a build for GCC 2.94 -i've heard it produces better code but in my real world tests its exactly the same performance as 3.4
lantus360 is offline  
Old 05 March 2013, 06:38   #13
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Yep been there done that

I've actually seen gcc 2.94 produce worse code than 3.4. I found CubicIDE painful to work with as well, AmiDevCpp is the best option I reckon.

You can also use StormC V4 (gcc), that's what I had to use for BOOM and my old DOTT port (AmiDevCpp didn't like those projects).
NovaCoder is offline  
Old 06 March 2013, 03:40   #14
lantus360
Registered User
 
Join Date: Feb 2013
Location: Olathe, Kansas
Posts: 214
ive had a bit of success patching in some DoomAttack routines in r_engine.asm

so far ive jumped from 17 fps -> 19fps. Its getting there!

Ill try and get a first release out this weekend on Aminet
lantus360 is offline  
Old 06 March 2013, 03:46   #15
matthey
Banned
 
Join Date: Jan 2010
Location: Kansas
Posts: 1,284
@NovaCoder
Code:
/* Must set rounding mode before using floating point MULH() and MUL64()
	fmove.l #$20,fpcr	;set rounding mode Toward Minus Infinitiy (RM) */

static inline int MULH(int a, int b) 
{ 
 int hi; 
 __asm__(
 "fmove.s #796917760,fp0 \n\t"
 "fmul.l %0,fp0 \n\t"
 "fmul.l %1,fp0 \n\t"
 "fmove.l fp0,%0 \n\t"
 :"=dm"(hi) 
 :"0"(a), "dm"(b) 
 ); 
 return hi; 
}

static inline int64_t MUL64(int a, int b) 
{ 
 int lo, hi;
 __asm__(
 "fmove.l %0,fp0 \n\t"
 "muls.l %1,%0 \n\t"
 "bvs.b 0f \n\t"
 "smi %1 \n\t"
 "extb.l %1 \n\t"
 "bra.b 1f \n\t"
 "0: \n\t"
 "fmul.s #796917760,fp0 \n\t"
 "fmul.l %1,fp0 \n\t"
 "fmove.l fp0,%1 \n\t"
 "1: \n\t"
 :"=d"(lo), "=d"(hi) 
 :"0"(a), "1"(b) 
 ); 
 return ((uint64_t)hi <<32) | lo;
}
That looks a lot like my 68060 fp code for ffmpeg .

Quote:
Originally Posted by lantus360 View Post
AmiDevCpp - GCC 3.4

ive also got Cubic IDE and make a build for GCC 2.94 -i've heard it produces better code but in my real world tests its exactly the same performance as 3.4
GCC 2.95.3 does generally generate better code. GCC 3.4.0 has some flaws like putting an extra instruction inside of some loops. GCC 3.4.0 does use the utility.library math functions and the exec.libary memory copy routines so if these are patched with CPU specific versions then it can make a quite noticable improvement. It depends on the code in the end.

Oh. Howdy neighbor! It's kind of funny finding an Amiga programmer that lives so close on a forum so far away .
I'm looking forward to playing Strife. It looks like you're making good progress. Well, off to DosBox debugging I go.
matthey is offline  
Old 06 March 2013, 23:14   #16
imigger
Banned
 
Join Date: Apr 2011
Location: england
Posts: 135
your next port is dark forces now that i would love to see please beg.
imigger is offline  
Old 07 March 2013, 00:12   #17
Cammy
Registered User
 
Cammy's Avatar
 
Join Date: Aug 2007
Location: Tasmania, Australia
Age: 39
Posts: 1,189
Lucasarts has never made the source code for Dark Forces available, so I doubt anyone would be able to port it to the Amiga to easily.

I've played Dark Forces on my A1200/030 through Shapeshifter though, so at least that's possible if you wanted to try.

Other First Person Shooter games I know of that have had their source code released and would be portable to the Amiga are:

Doom
Doom II
Heretic
HeXen
Duke Nukem 3D
Quake
Quake II
Rise of the Triad
Shadow Warrior
Strife
Wolfenstein
Unreal (Although possibly a bit unrealistic on anything less than 060/RTG)

Out of those, half have already been ported even if the ports were pretty quick and crappy. I think Rise of the Triad would be the best one to port over, and has the best chance of running on more Amigas than the others.
Cammy is offline  
Old 07 March 2013, 00:30   #18
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,400
Most of those games *should* be able to run really well on an 060 AGA.

I'd personally love to see a decent AGA port of Duke Nukem 3D, I had a look at the source code once but it's a bit nasty so I gave up.

[ Show youtube player ]


I've never tried the existing AGA ports of Hexen/Heretic/Duke Nukem but I assume they aren't that great with AGA?

I did try Descent but couldn't even get it to run, after looking at the source code I'm not surprised

I think most of these later ports were really targeted at RTG/PPC/Warp3D.

Last edited by NovaCoder; 07 March 2013 at 00:36.
NovaCoder is offline  
Old 07 March 2013, 01:00   #19
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,525
Heretic should be not 'worse' than Doom performance and AGA compatibilty-wise Hexen and Duke Nukem will require more 'horsepower' than Doom though I'd say. Heretic should really run at a decent speed and a lot of Doom ports run it right away.
TCD is offline  
Old 07 March 2013, 10:32   #20
utri007
mä vaan
 
Join Date: Nov 2001
Location: Finland
Posts: 1,653
Hexen runs very well with 040 no problems with heretic descent requires atleast 040 40mhz, fullu playable with 060

There is atari falcon port duke nukem 3d, sources are availlable. Could imagine that would be good start? Endian issues already fixed, code is maybe cleaned?
utri007 is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
No red coming from RGB port waltermixxx support.Hardware 15 24 June 2022 19:00
DosBox v0.74 AGA 68k Port NovaCoder Amiga scene 20 07 June 2018 02:17
JetHunt AGA - coming 2013... Coagulus Amiga scene 24 18 January 2014 22:44
AmiWolf - new AGA Wolfenstein 3D Port NovaCoder project.Amiga Game Factory 100 16 September 2013 01:44
BOOM - New AGA DOOM Port NovaCoder project.Amiga Game Factory 55 16 June 2012 13:13

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:24.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09483 seconds with 15 queries