English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Asm / Hardware

 
 
Thread Tools
Old 21 October 2019, 03:15   #1
redblade
Zone Friend
 
redblade's Avatar
 
Join Date: Mar 2004
Location: Middle Earth
Age: 40
Posts: 2,127
68000 Alien Vs Predator Jaguar Source code

from this site they have a link to Alien Vs Predator and some other Jaguar games.

https://assemblergames.com/threads/g...p.64554/page-2

Unfortunatetly it doesn't come with the tiles which could be added to breathless or Gloom Engine. They must be ripped from the Jaguar ROM.
redblade is offline  
Old 30 June 2022, 03:16   #2
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Disregarding the post is 3 years old, given that the AvP on Jaguar is running in 65,536 colors, I wonder what kind of an Amiga config would one need to have at least 15 fps in a 320x200 raycaster.

Since AGA only supports 256 colors, I reckon one would need some kind of Zorro-based gfx card ?

I found this link related to various Zorro-based cards (not sure how precise that info is):
http://amiga.resource.cx/search.pl?intf=z3

Exactly how wide-spread were those gfx cards back in the day ?

Having done some raycaster-style texturing routines on Vampire in 65,536 colors, V2/V4 is certainly fast enough for that, from personal experience.

Is there any other relatively common accelerator that would supply 65,536 color modes ? I suspect they would probably go with 68060...


Wait, weren't there some high-end Amiga configs that had Voodoo 2 / Voodoo 3 cards ? Like, PowerPC/RISC-based or similar ? Those could certainly pull off 65,536 colors in 3D.

EDIT: Found this: Mediator in a plain towered 1200 with Voodoo 3 !
[ Show youtube player ]
Looks like the Mediator supported RadeOn. Probably Trident or S3 Virge would be an option too!

Last edited by VladR; 30 June 2022 at 03:54.
VladR is offline  
Old 30 June 2022, 07:17   #3
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
While I don't think you'll be able to get 15fps in-game on a "real" 68K that way, more than 65K colors is possible with AGA using HAM8. This is typically done by converting each true color pixel into 4 color changes (RGBB) so you need to run in 1280x200 to get 320x200 "real" pixels. Since that takes a massive amount of chip cycles to pull off it was AFAIK only really used for still images. 160x100/160x128 true color wasn't uncommon in demos though.
paraj is offline  
Old 30 June 2022, 09:45   #4
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,337
With the release of DREAD I think all this is mute no?
alexh is offline  
Old 30 June 2022, 16:32   #5
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by paraj View Post
While I don't think you'll be able to get 15fps in-game on a "real" 68K that way, more than 65K colors is possible with AGA using HAM8. This is typically done by converting each true color pixel into 4 color changes (RGBB) so you need to run in 1280x200 to get 320x200 "real" pixels. Since that takes a massive amount of chip cycles to pull off it was AFAIK only really used for still images. 160x100/160x128 true color wasn't uncommon in demos though.
Right, there is HAM8. From the cursory look I gave it in HRM, it appears the RGB values are derived from the pixel next to it, so the 1280x200 sounds about right. That would make 060 sweat (though I'm sure lots of tables could be prepared to assist with that)...

Contrast that to a simple chunky framebuffer in Jaguar.

Speaking of "real" 68k - Hell, even a vanilla 13.3 MHz 68000 in Jaguar can fill the RGB 5-6-5 framebuffer pretty fast (especially horizontal and vertical slices used in a raycaster).
All we need is a system bandwidth for the 16-bit pixel transfer: move.w (a0),(a1)+

I was quite surprised when I did the benchmark and compared the pixel throughput between 26.6 MHz RISC GPU and 13.3 MHz 68000. The GPU isn't that much faster there as the system bandwidth is the limiting factor.


Was there ever some cheap accelerator that gave Amiga chunky framebuffer ? Even if it was just 256 colors ?
VladR is offline  
Old 30 June 2022, 16:34   #6
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by alexh View Post
With the release of DREAD I think all this is mute no?
I don't follow. How so ? Isn't Dread running in 32 colors (or similar) ?
VladR is offline  
Old 30 June 2022, 17:07   #7
alexh
Thalion Webshrine
 
alexh's Avatar
 
Join Date: Jan 2004
Location: Oxford
Posts: 14,337
Quote:
Originally Posted by VladR View Post
I don't follow. How so ? Isn't Dread running in 32 colors (or similar) ?
Because it is OCS/ECS at the moment.
alexh is offline  
Old 02 July 2022, 18:08   #8
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Quote:
Originally Posted by VladR View Post
Right, there is HAM8. From the cursory look I gave it in HRM, it appears the RGB values are derived from the pixel next to it, so the 1280x200 sounds about right. That would make 060 sweat (though I'm sure lots of tables could be prepared to assist with that)...

Contrast that to a simple chunky framebuffer in Jaguar.

Speaking of "real" 68k - Hell, even a vanilla 13.3 MHz 68000 in Jaguar can fill the RGB 5-6-5 framebuffer pretty fast (especially horizontal and vertical slices used in a raycaster).
All we need is a system bandwidth for the 16-bit pixel transfer: move.w (a0),(a1)+

I was quite surprised when I did the benchmark and compared the pixel throughput between 26.6 MHz RISC GPU and 13.3 MHz 68000. The GPU isn't that much faster there as the system bandwidth is the limiting factor.


Was there ever some cheap accelerator that gave Amiga chunky framebuffer ? Even if it was just 256 colors ?

What you want is a graphics card with RTG support. I don't think there were ever any widespread accelerators (unless you count CD32). If you're trying to do a simple conversion, you should probably just expect a graphics card, and if you feel like it offer a fallback for AGA.


The issue with SHRES HAM8 isn't that the 060 is sweating, rather that it will be spending most of it's time waiting to do chipram writes, so lookup tables will likely hurt you! You can help that a bit by going to HAM6 (75% fewer chip cycles needed for both display and writes) and/or switching to 2x1 or 2x2 resolution if that's acceptable.
paraj is offline  
Old 03 July 2022, 01:22   #9
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
I'm sure I had a post here?!?!

As I said before, whilst the Jag version might be in 65,000 colour mode, it sure as hell isn't using anything close to that, considering its mostly green.

There is no reason it couldn't be done in 256 colours and I defy anyone to notice the difference.

If Jag AVP was genuinely using that amount of colours, it would have made the PS and Saturn and every other version look like absolute crap.
Galahad/FLT is offline  
Old 03 July 2022, 14:18   #10
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by paraj View Post
What you want is a graphics card with RTG support. I don't think there were ever any widespread accelerators (unless you count CD32). If you're trying to do a simple conversion, you should probably just expect a graphics card, and if you feel like it offer a fallback for AGA.
CD32 had the Akiko chip for the C2P, right ? What was the CPU threshold for Akiko being slower in C2P ? IIRC, 68030/25 ?

Speaking of requiring RTG, does Cybergraphics API run in itself on non-accelerated Amigas ? Because I already have that in my codebase (for Vampire) and all I use from CGX is just C2P anyway. I reckon the C2P there would be pretty well optimized for various CPUs, right ? If that's the case, I don't have to do anything, just require CGX and it would run on any config (with or without RTG card, as long as I keep the AGA color depth) at that point (hopefully!).

Quote:
Originally Posted by paraj View Post
The issue with SHRES HAM8 isn't that the 060 is sweating, rather that it will be spending most of it's time waiting to do chipram writes, so lookup tables will likely hurt you!
Doesn't chipram write occur only for C2P ? So, if I run at 15/20 fps, I have full 3-4 frames worth of 060 power (minus the C2P cost), no ?

Quote:
Originally Posted by paraj View Post
You can help that a bit by going to HAM6 (75% fewer chip cycles needed for both display and writes) and/or switching to 2x1 or 2x2 resolution if that's acceptable.
How exactly does 2x1 and 2x2 work ? Is the second line just mirrored via Copper or something?
On paper, I was thinking of replicating 160x200 by simply writing 2 bits instead of 1, but perhaps Copper could achieve the same effect somehow ?
VladR is offline  
Old 03 July 2022, 14:23   #11
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by Galahad/FLT View Post
I'm sure I had a post here?!?!

As I said before, whilst the Jag version might be in 65,000 colour mode, it sure as hell isn't using anything close to that, considering its mostly green.

There is no reason it couldn't be done in 256 colours and I defy anyone to notice the difference.

If Jag AVP was genuinely using that amount of colours, it would have made the PS and Saturn and every other version look like absolute crap.
You haven't played it in person, right ?

I have AVP at home on my Jag and a very easy experiment to test how different it looks, is to first play Wolfenstein and then put the AvP cart in.

Really big visual difference. Kinda hits you in the face right away.
Of course, it was one of the first HiColor games, so it wasn't as colorful as some later ones, no doubt about that...
VladR is offline  
Old 03 July 2022, 14:30   #12
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
Originally Posted by Galahad/FLT View Post
There is no reason it couldn't be done in 256 colours and I defy anyone to notice the difference.
Now, you actually are right here, but probably not for the reason that you think (because you haven't mentioned CRY).

Jaguar has a unique 16-bit CRY mode which has 256 shades of a color. You have a fixed palette of 256 base colors (each with 256 shades).

So, those green segments in itself, are totally crying for CRY Mode and it would look better than RGB565 (which doesn't have as many shades per color as CRY Mode does).
VladR is offline  
Old 03 July 2022, 15:28   #13
Tsak
Pixelglass/Reimagine
 
Tsak's Avatar
 
Join Date: Jun 2012
Location: Athens
Posts: 1,031
Quote:
Originally Posted by VladR View Post
You haven't played it in person, right ?

I have AVP at home on my Jag and a very easy experiment to test how different it looks, is to first play Wolfenstein and then put the AvP cart in.
That's a pretty bad comparison, Wolfenstein is by no means a good representative of a 256 color game. Plus it has a very distinct cartoonish design and looks. I second what Galahad wrote, AVP would look pretty darn identical with 256 colors.

You also have to take into account that AVP has a very poor variety of textures per level and almost all level specific textures have the same exact coloration and looks. And there are only that many colors you can fit in a texture (which by default only uses an extremely narrow range from the whole palette and revolves around just a handful of hues).

But don't take my word for it. Here, a texture from the Alien levels.


The right one is just 32 colors and the conversion is extremely draft. With a proper conversion and expanding this palette to say -128- colors (to cover all needed texture light levels) you'll get indistinguishable results.
Attached Thumbnails
Click image for larger version

Name:	AVP-alien wall scarab 1.png
Views:	726
Size:	41.3 KB
ID:	75926  
Tsak is online now  
Old 03 July 2022, 16:12   #14
VladR
Registered User
 
Join Date: Dec 2019
Location: North Dakota
Posts: 741
Quote:
You also have to take into account that AVP has a very poor variety of textures per level and almost all level specific textures have the same exact coloration and looks.
Interesting. Well, I never got to play it more than 10-15 minutes , so I wouldn't claim I am familiar with the game itself very well. I did notice just few repeated textures in the first level, yes

I loved the very first AvP on PC, that was a phenomenal game. This one is very different and it didn't help I played it for the first time few decades after the launch :-)


Quote:
The right one is just 32 colors and the conversion is extremely draft. With a proper conversion and expanding this palette to say -128- colors (to cover all needed texture light levels) you'll get indistinguishable results.
Well, for our purposes, as we're talking OCS/AGA here, the 32 colors is actually just fine.
It does require some clever level design for connectors that allow you to smoothly transition between different palettes, but with, say, 030@50 MHz and some FastRAM, this should have a playable framerate even in EHB mode.

What's the best example of such EHB raycaster on Amiga ? Surely there are few ?
VladR is offline  
Old 03 July 2022, 16:26   #15
Tsak
Pixelglass/Reimagine
 
Tsak's Avatar
 
Join Date: Jun 2012
Location: Athens
Posts: 1,031
Quote:
Originally Posted by VladR View Post
Well, for our purposes, as we're talking OCS/AGA here, the 32 colors is actually just fine. ?
Well with OCS you have bigger problems than total colour count and that is the limited overal palette. I.e. the game will suffer tremendously with dark colors. But it should be still doable and looking fine (for a color reduced version). If you want near perfect results though then AGA only.
Tsak is online now  
Old 03 July 2022, 16:46   #16
Galahad/FLT
Going nowhere
 
Galahad/FLT's Avatar
 
Join Date: Oct 2001
Location: United Kingdom
Age: 50
Posts: 8,986
Quote:
Originally Posted by VladR View Post
You haven't played it in person, right ?

I have AVP at home on my Jag and a very easy experiment to test how different it looks, is to first play Wolfenstein and then put the AvP cart in.

Really big visual difference. Kinda hits you in the face right away.
Of course, it was one of the first HiColor games, so it wasn't as colorful as some later ones, no doubt about that...
Not only did I play it when it came out, I saw the source code to it at release as well

One of the guys at Imagitec had it, all written in pure 68000 ASM.

I'm not trying to shit on the Jaguar version by the way, I know its a great game, its not as good as the PC version which I completed with all three characters, but then again the PC needed to run AVP back in the day was quite a bit more expensive than a Jaguar, so its more a compliment to the Jag.

Pretty much the only game on the Jaguar that actually looked like it got close to using a decent mount of that 65,000 colour mode was a Rayman platformer, and that looks SUBTANTIALLY more colourful than AVP.

I think there are palette picking problems in AVP as from a distance, everything looks great, but move really close to walls especially when it comes to the Alien walls, and pixels quite often on rounded details look completely wrong, almost similar to HAM fringing on Amiga.
Galahad/FLT is offline  
Old 03 July 2022, 17:35   #17
paraj
Registered User
 
paraj's Avatar
 
Join Date: Feb 2017
Location: Denmark
Posts: 1,098
Quote:
Originally Posted by VladR View Post
CD32 had the Akiko chip for the C2P, right ? What was the CPU threshold for Akiko being slower in C2P ? IIRC, 68030/25 ?

Speaking of requiring RTG, does Cybergraphics API run in itself on non-accelerated Amigas ? Because I already have that in my codebase (for Vampire) and all I use from CGX is just C2P anyway. I reckon the C2P there would be pretty well optimized for various CPUs, right ? If that's the case, I don't have to do anything, just require CGX and it would run on any config (with or without RTG card, as long as I keep the AGA color depth) at that point (hopefully!).

To be honest, I don't really know. Never had a CD32 nor anything more fancy than an A1200, so not much experience there. I think CGX costs money? You should be able to code system friendly and have it work just as well for Amigas without graphics cards (at least if you're just doing normal 8-bit graphics). If you do that, it can always be optimized later on.
Regarding Akiko speed I found a benchmark in a forum post that suggest you're right about the cutoff:
Quote:
A1200 030/50Mhz 32Mb (Optimised 020 C2P) - 8481 realtics (8.8 fps)
Amiga CD32 68020/14Mhz 8Mb (Optimised 020 C2P) - 18971 realtics (3.9 fps)
Amiga CD32 68020/14Mhz 8Mb (Optimised Akiko C2P) - 12872 realtics (5.8 fps)
Quote:
Originally Posted by VladR View Post
Doesn't chipram write occur only for C2P ? So, if I run at 15/20 fps, I have full 3-4 frames worth of 060 power (minus the C2P cost), no ?
You're right that you won't be limited by chipram speed outside the C2P routine. The problem is that 1280x256 HAM8 uses all available DMA slots while the display is active, so you're only left with 40% and you need to transfer 1280*256*6/32 (61440) longwords to update the display (the control plane bits can be left alone). Doing a bit of calculation, I think it'll take almost 84ms just to copy the data meaning you're limited to ~12fps (and this is without the game running)! You can probably improve on that by only transferring when the display is inactive, splitting it up over multiple frames and interleaving normal game logic with it, but it'll get really complicated. On the bright side C2P is essentially free on a 060 because chipram is so slow. There's even left over cycles available if you can find good use for them.
In other words 1280x256 HAM8 isn't really usable for a game on a 060, but luckily there are many different routes available if you're willing to make a few tradeoffs. Some of them were mentioned earlier, but obviously the "best" would be if you could restrict yourself to 256 colors. I only brought it up to highlight that you could get 16-bit color on AGA
Quote:
Originally Posted by VladR View Post
How exactly does 2x1 and 2x2 work ? Is the second line just mirrored via Copper or something?
On paper, I was thinking of replicating 160x200 by simply writing 2 bits instead of 1, but perhaps Copper could achieve the same effect somehow ?
Vertical doubling can be done with the copper (and you need to for OCS/ECS) but is much easier with AGA (using FMODE.BSCAN2). You don't save on display bandwidth, but halve the number of chipram writes. For 8-bit displays horizontal doubling is usually folded in with the C2P and just saves on having to calculate the game/effect at twice the resolution (no saving chip access wise, but if you're OK with half the vertical resolution it's probably OK vertically as well and you save overall computations). For HAM modes going from 1280 to 640 will of course halve the load.
paraj is offline  
Old 03 July 2022, 17:37   #18
Etze
A3000-Fan
 
Etze's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 321
Quote:
Originally Posted by VladR View Post
Was there ever some cheap accelerator that gave Amiga chunky framebuffer ? Even if it was just 256 colors ?
Ever heard of Graffiti? I never had one so I don't know how well it works.
https://bigbookofamigahardware.com/b...ct.aspx?id=498
Etze is offline  
Old 05 July 2022, 03:19   #19
lmimmfn
Registered User
 
Join Date: May 2018
Location: Ireland
Posts: 672
The Dread engine is the best for this!!!
lmimmfn is offline  
Old 05 July 2022, 22:17   #20
Tsak
Pixelglass/Reimagine
 
Tsak's Avatar
 
Join Date: Jun 2012
Location: Athens
Posts: 1,031
The Dread engine is great, though completely inappropriate for such a port.
Issues:
1) Dread is strictly 16 colors for in-game stuff, that's a steep reduction in color count.
2) HUD would be impossible to make as it appears on AVP
3) No floor and ceiling textures
4) No way to have walls with transparent parts (which AVP uses a lot)
5) Most held weapons would most definitely not fit to specs (example: alien arm)
6) No variable light levels at a distance

A porobable MUCH better fit for this game would be the Genetic Species engine.
Tsak is online now  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
68000 code optimisations pmc Coders. Asm / Hardware 248 17 September 2023 13:20
68020 to 68000 code convertion using Ira and PhxAss gulliver Coders. Asm / Hardware 18 12 April 2014 01:09
68000 boot code billt Coders. General 15 05 May 2012 20:13
Alien vs Predator, MS-DOS s2325 request.Old Rare Games 11 20 June 2009 12:51
WANTED: Alien vs Predator For Atrai Jaguar Andrew MarketPlace 2 01 July 2003 19:43

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 19:59.

Top

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