Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3   Go Down

Author Topic: Width of a Rainbow  (Read 18602 times)

0 Members and 1 Guest are viewing this topic.

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Width of a Rainbow
« on: November 29, 2009, 11:39:57 AM »

Hi folks.

Does ayone here know of a way to limit the width of a rainbow?
I am using colour 0 for the rainbow effect but I dont want the rainbow to be viewed in the left
and right border area's of the screen. I know I could just use another colour but that means one colour less for my display. It must use colour 0.

Is there a solution to this?

Many thanks, Kev G
Logged

Sidewinder

  • Forum Mod
  • A600
  • *****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 155
    • http://www.liquido2.com/
Re: Width of a Rainbow
« Reply #1 on: November 29, 2009, 03:34:14 PM »

Hello KevG,

A rainbow is basically a custom copper list that waits for the end of a line and then jams a new color value in the selected color register.  It is possible to create a custom copper list that waits for a given horizontal and vertical position before jamming the new color value.  This could, in theory, be used to set color 0 to black for the border and then to the rainbow color in the screen area, but I've never tried it in practice.

AMOS has some commands that allow you to create custom copper lists from within AMOS, see Appendix F of the Pro manual or the end of chapter 10 of the Creator manual.
« Last Edit: November 29, 2009, 03:42:56 PM by Sidewinder »
Logged
- Sidewinder

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: Width of a Rainbow
« Reply #2 on: November 29, 2009, 04:34:44 PM »

Thanks Sidewinder for the info. I'll look into it.

Kev G

Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Width of a Rainbow
« Reply #3 on: November 30, 2009, 03:10:55 PM »

Use caution when using custom copper lists because you then lose the Amos copper list generator and therefore lose computed sprites.
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Width of a Rainbow
« Reply #4 on: December 02, 2009, 07:41:47 PM »


Hi,

As others have said you can limit the width of a rainbow. I suggest you take a look at this thread

Copper Play (Code)

in which I started playing with custom copperlists. There is also an AMOS file I uploaded, I suggest you take a look at this as it will help you create your own copperlist. Please be careful... if you get your copperlist wrong it's very difficult to recover the AMOS default copperlist (you can do it by pressing Ctrl-C to break out of your program and press Escape a few times to switch between the Editor and Direct mode - this usually does the trick if you haven't completely crashed the Amiga).


Regards,
Lonewolf10

Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: Width of a Rainbow
« Reply #5 on: December 02, 2009, 08:09:46 PM »

Hey, thanks Lonewolf.

I will check it out :)

I have already tried playing around with my owncopper list but I dont seem to get any results :(

I am creating a rainbow, then DOKEing values in that copper list rather than create a copper list from scratch. Nothing is crashing, but then again, nothing is happening. I am using COP SWAP as well as you can only DOKE in the Logical list apparantly.
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Width of a Rainbow
« Reply #6 on: December 03, 2009, 08:36:07 PM »


If you have looked at my example file I did't use the Doke command, as the copperlist is a special set of instructions and not just a list of numbers. You can only manipulate it directly when you understand how it fully works, and even then the slightest mess-up can corrupt the screen! These are the commands that you need:

Cop Move
Cop Swap
Cop Logic
Cop Movel
Cop Reset
Cop Wait
Copper Off
Copper On


Though having said that, I don't recall using the Cop Logic command. If you haven't already, do look at the example program I uploaded. The last one in it (7 or 8) is a fully working copperlist (well, except for the mouse...), and the others have some cool effects... I have one screen with something like 25 different rainbows active!


Regards,
Lonewolf10

Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: Width of a Rainbow
« Reply #7 on: January 24, 2010, 02:49:57 PM »

I think I have got it working. I have managed to get 7 copper rainbows side by side on the same scan line.
Look at the piccy below which only uses 3. (Sorry for my bad drawing skills)




The .iff image is a 4-colour image that I just knocked up in DPaint.
« Last Edit: January 24, 2010, 02:51:39 PM by KevG »
Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: Width of a Rainbow
« Reply #8 on: February 07, 2010, 09:23:27 PM »

Hi folks.

Here is little demo showing 7 rainbows on the same scan line!
This means that each scan line can have its own unique palette of 8 colours.
If you do the math for a full screen (PAL) then it works out at 1792 possible colours!
Thats even on an OCS A500 too!

Below is a screen shot showing an 8 colour screen then afterwards showing the
copper list created screen.



I've attached a demo (.lha) so that you can try it out yourselfs :)

I am working on an updated version that allows 16 rainbows on the same scan line.
That is 16x256 (Pal) which will generate 4096 colours! NOT Ham Mode, just 4 bitplanes!


Kev G
Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Width of a Rainbow
« Reply #9 on: February 07, 2010, 10:27:56 PM »

@KevG

It looks like you've become our "sliced HAM" expert.  (The so-called Sliced HAM mode was designed to allow maximal behind-the-boarder color changes primarily in HighRes mode on the OCS/ECS Amigas using palette changes with the copper.)
Logged

skateblind

  • Important 'looking' person
  • Forum Mod
  • A2000
  • *****
  • Karma: 668
  • Offline Offline
  • Gender: Male
  • Posts: 509
Re: Width of a Rainbow
« Reply #10 on: February 08, 2010, 09:33:52 AM »

What use would all these slices have and how easy would they be to use through out a game or application? It is very impressive.
Logged
What are you looking at?

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Width of a Rainbow
« Reply #11 on: February 08, 2010, 04:06:36 PM »

@skate

The problem with using these tricks in a game is that you have to disable the computed sprites before you can get these tricks to work.  I'm not sure if you can even do multiple screens when doing custom copper lists.  The Stars extension has some copper functions similar to sliced HAM but I don't know how well it works with screens and computed sprites.
Logged

KevG

  • A600
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 87
Re: Width of a Rainbow
« Reply #12 on: February 08, 2010, 05:15:39 PM »

@Skate

This technique is only really useful for static screen games although it is useful for horizontal scrolling games too. Shadow Of The Beast used this technique to get all the colours on the screen. It really is only a dual playfield display ( 8 by 8 ) but if you rip the graphics, the mountains are the same colour as the clouds. They used the copper to change the mountain colour. The scrolling fence at the bottom is just another mini dual playfield display.

Vertical scrolling games would be a nightmare to design because you would have to move the rainbows up and down with your graphics.

I don't know of any applications that would benefit although I had an idea last night! It could be possible to load 256 colour .bmp .gif .pcx files into a standard 16 colour AMOS screen. You could in effect have AGA on a non-AGA Amiga! It would take alot of work using colour reduction (quantisation) but in theory it is possible. Another idea to shelve for the time being.....


« Last Edit: February 08, 2010, 05:18:21 PM by KevG »
Logged

Lonewolf10

  • AMOS Extensions Developer
  • AMOS Dev
  • A2000
  • *****
  • Karma: 3
  • Offline Offline
  • Gender: Male
  • Posts: 618
    • http://www.aliensrcooluk.com
Re: Width of a Rainbow
« Reply #13 on: February 11, 2010, 06:30:25 PM »


@KevG

It's good to see that you have taken the work that I started and gone a bit further with it :)
I have yet to look at your code, but great job mate.


@SamuraiCrow

Multiple screens (one on screen at a time) are not a problem. The easiest way to switch screens is to:

 - Remove current one from being displayed (and any others that are open)
 - Switch on AMOS copperlist
 - Load in the new screen
 - Store address(es) of current bitplane(s)
 - Create your new copperlist
 - Deactivate AMOS copperlist and activate custom one :)

Dual playfield mode is tougher. You need a copperlist for each screen and... that's as much as I know at present. I never got that far into custom copperlists, as I was busy with other projects. (a phrase I seem to be using far too much :( )
I know there are 2 address registers (CopJmp1 and CopJmp2?). Perhaps they are the starting address of each of the copperlists for the 2 screens? Just guessing. I'll try to look into it sometime.


Regards,
Lonewolf10

Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Width of a Rainbow
« Reply #14 on: February 12, 2010, 12:56:59 AM »

Quote
I know there are 2 address registers (CopJmp1 and CopJmp2?). Perhaps they are the starting address of each of the copperlists for the 2 screens? Just guessing. I'll try to look into it sometime.

Ummm... wrong.  The second pair of 16-bit copper registers is for the odd numbered pixels on an interlaced screenmode.  The copper actually supports interlaced copper lists but AmigaOS doesn't have that support built in.
Logged
Pages: [1] 2 3   Go Up
 

TinyPortal 2.2.2 © 2005-2022