English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 17 March 2009, 16:48   #1
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Cool How was it done? (helping understand the coding tricks)

Universe.
A simple ECS space adventure with some nice graphics released in 1994, when scanned closely appears to display ~180 colors per screen!

1st pic:

Number of colors: 190

2nd pic:

Number of colors: 171

Some part of the background from
the 2nd pic, without the character
and the space station:

Number of colors: 100

So, how was it done?
Looks nothing like HAM too me...
Multiple screens?
Shoonay is offline  
Old 17 March 2009, 17:01   #2
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,644
These guys developed a new graphics mode for this game that allowed them to use those many colours.

Exactly how, I dunno.
You can read about this in every WiP done about Universe, there was on in The One Magazine, circa 1994.
Amiga1992 is offline  
Old 17 March 2009, 17:27   #3
StevenJGore
Amiga Fanatic
 
StevenJGore's Avatar
 
Join Date: Feb 2004
Location: North Yorkshire, UK
Age: 46
Posts: 726
It runs at 256 colours on an A500. Looks the same on an A1200. Don't know how it was achieved though. The palette looks limited though, colour gradients aren't as smooth as AGA.
StevenJGore is offline  
Old 17 March 2009, 18:04   #4
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Thanks for the info Aki, could you perhaps point me in the right direction of this article concerning Universe's coding tricks?
Shoonay is offline  
Old 17 March 2009, 18:06   #5
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by 5h00n4y View Post
So, how was it done?
They probably use the copper to change a bunch of colors on each scanline. It's possible to change the palette of 15 colors in the border, and about 40 more in the screen area, and this can be done for every scanline.

HamLab can do this, too, although it will only change 15 colors in the border.
Thorham is offline  
Old 17 March 2009, 19:37   #6
yaqube
Registered User
 
Join Date: Mar 2008
Location: Poland
Posts: 159
I had a look at this game. It uses EHB mode. On every scanline during horizontal blanking some colours from palette entries 1-15 are changed. I saw as few changes as 2 and as many as 10.
yaqube is offline  
Old 17 March 2009, 19:49   #7
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Yeah that's what they do, they probably had a tool which analysed 256 colors pictures, reduced them to a lower number of colors (via dithering) and generated the palette variations at the relevant scan lines for the copper. It could be amusing to do such a tool (i guess they needed a part of the palette to remain constant for the sprites and texts).

I don't think there's enough time to change all the palette at every scan line (especially when using 6 bitplanes).

Last edited by hitchhikr; 17 March 2009 at 19:57.
hitchhikr is offline  
Old 17 March 2009, 19:49   #8
TCD
HOL/FTP busy bee
 
TCD's Avatar
 
Join Date: Sep 2006
Location: Germany
Age: 46
Posts: 31,518
Quote:
Originally Posted by 5h00n4y View Post
Thanks for the info Aki, could you perhaps point me in the right direction of this article concerning Universe's coding tricks?
I think it's this one Shoonay : http://amr.abime.net/review_14299
TCD is offline  
Old 17 March 2009, 20:35   #9
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Thanks guys
Shoonay is offline  
Old 17 March 2009, 22:37   #10
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by hitchhikr View Post
I don't think there's enough time to change all the palette at every scan line (especially when using 6 bitplanes).
Check out HamLab demo version. This changes 15 colors per scanline in the border for ham6 (six bpp).

Last edited by Thorham; 17 March 2009 at 22:43.
Thorham is offline  
Old 17 March 2009, 23:16   #11
Amiga1992
Registered User
 
Join Date: May 2001
Location: ?
Posts: 19,644
Quote:
Originally Posted by StevenJGore View Post
It runs at 256 colours on an A500.
No, it doesn't.
The exact number escapes me, but it's not 256, it's a bit less. Probably some of the tech gizmos can calculate it

So, if the colours are changed by the copper, it means they are not all available at any moment anywhere on screen, right? Like Lionheart.
Amiga1992 is offline  
Old 19 March 2009, 23:57   #12
hitchhikr
Registered User
 
Join Date: Jun 2008
Location: somewhere else
Posts: 511
Quote:
Check out HamLab demo version. This changes 15 colors per scanline in the border for ham6 (six bpp).
15 colors is only half of the available palette registers, the only ones relevant in ham but the mode used here wasn't ham.

I guess such a tool should handle maximum 15 colors / line or so and dither if there's too many present (keeping an history for next lines etc.) then generate the copper colors (or the whole copperlist directly).
So, for a 320x200 picture and considering the copper color registers would be constructed and saved within the file with the bitplanes that would give max. 44000 bytes / file and max. 3000 colors for a whole pic (most probably less) and a hell of a copperlist ;D

Last edited by hitchhikr; 20 March 2009 at 00:08.
hitchhikr is offline  
Old 20 March 2009, 03:04   #13
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
You can actually manage 16 color changes outside the display, if it makes a difference (at least according to WinUAE cycle exact A500).

Did anyone try doing these tricks using the CPU on the A1200? I'm thinking that with the code in the cache, 32 bit access to the RAM (and to the custom chips?) it should be faster to change colors with the CPU than the copper. By f.ex setting 64 color mode and switching palettes between scanlines using the BPLAM bits in BPLCON4, and thus getting a full scanline worth of time to change colors, you might be able to get 64 unique colors each scanline, or close to there.
Leffmann is offline  
Old 20 March 2009, 11:07   #14
cosmicfrog
The 1 who ribbits
 
cosmicfrog's Avatar
 
Join Date: Apr 2006
Location: leek, Staffs, UK
Age: 56
Posts: 3,557
Send a message via MSN to cosmicfrog
plz some1 do it,

is`t it about time some1 started pushing the original specs of the machine over and beond what was thought possible
cosmicfrog is offline  
Old 20 March 2009, 11:29   #15
AmigaFriend
Registered User
 
AmigaFriend's Avatar
 
Join Date: Sep 2008
Location: CLI
Posts: 1,462
That would be interesting really, to be seen.
AmigaFriend is offline  
Old 20 March 2009, 13:50   #16
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by Leffmann View Post
You can actually manage 16 color changes outside the display, if it makes a difference (at least according to WinUAE cycle exact A500).
That's correct. Hamlab does this (see Aminet)
Quote:
Originally Posted by Leffmann View Post
Did anyone try doing these tricks using the CPU on the A1200? I'm thinking that with the code in the cache, 32 bit access to the RAM (and to the custom chips?) it should be faster to change colors with the CPU than the copper. By f.ex setting 64 color mode and switching palettes between scanlines using the BPLAM bits in BPLCON4, and thus getting a full scanline worth of time to change colors, you might be able to get 64 unique colors each scanline, or close to there.
Yes, you can change around 64 colors per scanline with the cpu. I coded up something like that over 10 years ago. All you really have to do is set the colors for a scanline on the previous scanline and make sure none of those colors are used on the scanline on which they are changed. This doen't work on non-aga, and Ham8 is much better.

Also, because of timing irregularities, it's very difficult, if not impossible to make something similar work on non-aga as far as I know.
Thorham is offline  
Old 20 March 2009, 13:54   #17
Shoonay
Global Caturator
 
Shoonay's Avatar
 
Join Date: Aug 2004
Location: Porando
Age: 43
Posts: 6,105
Mmmmmm, just imagine some shitty Sierra EGA adventures remade with that trick into AGA...

*drools*
Shoonay is offline  
Old 20 March 2009, 14:37   #18
Thorham
Computer Nerd
 
Thorham's Avatar
 
Join Date: Sep 2007
Location: Rotterdam/Netherlands
Age: 47
Posts: 3,751
Quote:
Originally Posted by 5h00n4y View Post
Mmmmmm, just imagine some shitty Sierra EGA adventures remade with that trick into AGA...

*drools*
Or better yet, imagine how adventure games like Myst would look in glorious Highres Interlace Ham8
Thorham is offline  
Old 20 March 2009, 22:53   #19
Leffmann
 
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
Quote:
Originally Posted by Thorham View Post
That's correct. Hamlab does this (see Aminet)
Yes, you can change around 64 colors per scanline with the cpu. I coded up something like that over 10 years ago. All you really have to do is set the colors for a scanline on the previous scanline and make sure none of those colors are used on the scanline on which they are changed. This doen't work on non-aga, and Ham8 is much better.

Also, because of timing irregularities, it's very difficult, if not impossible to make something similar work on non-aga as far as I know.
HAM8 is great and probably sufficient for most pictures, but while it can generate MORE than 64 colors on a single scanline, it can't do 64 SPECIFIC colors, and you usually end up with some color bleeding. Which one is better probably depends on what picture you want to dither. For anything that is not large horizontal gradients, 64 unique colors per scanline will look very good, you could even use 256 colors and replace as many as you have time for on a scanline basis.

You could combine this and HAM8 and get some better results but I don't even want to think of how to work out the dithering algorithm
Leffmann is offline  
Old 21 March 2009, 22:11   #20
jotd
This cat is no more
 
jotd's Avatar
 
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,160
I saw static pictures of very good quality and a lot of colors on a demo disk a long time ago. The mode was called "dynamic hires".

fiddling with the copper for a demo/picture is one thing, doing it in a game is another. I guess Universe does not allow a lot of player movement, or delimited to a given zone.
jotd 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
Anyone understand Japanese? Jawsykilla Retrogaming General Discussion 19 02 April 2010 21:26
MapRom : I wanna understand Cosmos support.Hardware 5 20 November 2009 17:18
Bizarre coding tricks Ray Norrish Coders. General 6 01 January 2006 17:43
Helping out Firestar_Jes project.Sprites 7 30 May 2005 15:01
Understand the first part not the second bit? backtoskooldaze New to Emulation or Amiga scene 1 30 March 2002 03:49

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 13:31.

Top

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