English Amiga Board

English Amiga Board (https://eab.abime.net/index.php)
-   request.UAE Wishlist (https://eab.abime.net/forumdisplay.php?f=56)
-   -   Replace single color backgrounds with multi-colored ones (https://eab.abime.net/showthread.php?t=111943)

john4p 20 September 2022 23:22

Feature wish: Replace single color backgrounds with multi-colored ones
 
Hi Toni,

can you please tell me if the following idea would be possible to implement and, if yes, how much effort do you think it would take to add this to WinUAE (and if you'd be willing to do it)?

Add the option to replace every pixel (in every drawn frame) of one specific color with the color of the respective line of a given "mask"-picture that we can select - a picture like one of these ("copper"-like backgrounds taken from Turrican II):

https://up.picr.de/44391874fs.png https://up.picr.de/44391875hv.png

So that we'd be able to replace the one-color backgrounds of e.g. Giana Sisters or Turrican I:

https://hol.abime.net/pic_full/scree...93_screen2.png https://hol.abime.net/pic_full/scree...33_screen4.png

...with the multiple colors from the selected "mask"-pic.

So that the result would look about like this:

https://up.picr.de/44391885qz.png

(drawn by Bubba'n'Stix 2 in this Lemon thread)

This feature could enrich games with one color backgrounds.

There could be a limit set for the lines to be affected so that the hud at the bottom wouldn't look weird in case it has some pixels of the same color as the playfield's background.


The implementation could be an enhancement of the existing mask-/overlay-feature in the filter settings where only the pixels of one specific color would be affected by the mask.

Dan 21 September 2022 22:37

In the Hardware/Chipset menu, there is Genlock thing.
Turn it on, choose "image file (png)" then click on the ... and select a background picture.

It works in Workbench, it could work in games as well, if the color is right.

CFou! 22 September 2022 09:47

I'm digressing because it's not a WinUAE option

But I think it should be quite easy to add a rainbow background when modifying the copper list of a game like Great Giana because the scrolling is horizontal.
besides, maybe I'll try with an update of the slave whdload...

it's a little more complicated with a game like Turrican because the scolling is multi-directional.
But not impossible if you have enough free CHIP memory and you locate in memory the data relating to the Y position of the scrolling.

rothers 22 September 2022 12:34

Quote:

Originally Posted by Dan (Post 1566042)
In the Hardware/Chipset menu, there is Genlock thing.
Turn it on, choose "image file (png)" then click on the ... and select a background picture.

It works in Workbench, it could work in games as well, if the color is right.


This is probably the right route.

john4p 22 September 2022 14:46

Quote:

Originally Posted by Dan (Post 1566042)
In the Hardware/Chipset menu, there is Genlock thing.
Turn it on, choose "image file (png)" then click on the ... and select a background picture.

It works in Workbench, it could work in games as well, if the color is right.

Thank you, gonna give this a try after work.


Quote:

Originally Posted by CFou! (Post 1566100)
I'm digressing because it's not a WinUAE option

But I think it should be quite easy to add a rainbow background when modifying the copper list of a game like Great Giana because the scrolling is horizontal.
besides, maybe I'll try with an update of the slave whdload...

it's a little more complicated with a game like Turrican because the scolling is multi-directional.
But not impossible if you have enough free CHIP memory and you locate in memory the data relating to the Y position of the scrolling.

That sounds great. If it makes it easier a fix background (from light to dark blue) for Turrican would already be an improvement. Though a vertically scrolling copper background like in Turrican II would be a dream come true.

rothers 22 September 2022 16:09

You could make it anything you want within reason. Try some wild stuff let us see how it looks!

Retro1234 22 September 2022 17:13

Wish I still had it, if anyone has please upload but I once took out the copper brackground of Turrican 2 because of the sickly colours. But agree Giana would look good.

And iirc member Gary? Once used a Genlock with real hardware maybe Star wars to put in some kind of background.

I guess going a bit far! Two Amigas and a Genlock you could get some perfect parallax.

CFou! 22 September 2022 18:05

I'm thinking about giana :nuts

I image well 2 optional copper backgrounds (one for the sky and for the cellars)
There may be enough CHIP memory available before address $1000 (if not used in game=>to check) and the game is not using the second copperlist. Which allows a fairly easy patch of the first copperlist........

I image 2 external files with just the list of colors for the levels with blue background and black background for easy modification & test;)
the custom copperlist should have a maximum size of 200*8 bytes
for one WAIT & MOVE command per line...
I'll think about it this weekend

john4p 22 September 2022 18:51

Okay, tried the Genlock-way now with this png for Turrican:

https://up.picr.de/44401306uy.png

Sadly it's the black that gets replaced and not the blue:

https://up.picr.de/44401307bx.png


Quote:

Originally Posted by CFou! (Post 1566174)
I'm thinking about giana :nuts

I image well 2 optional copper backgrounds (one for the sky and for the cellars)
There may be enough CHIP memory available before address $1000 (if not used in game=>to check) and the game is not using the second copperlist. Which allows a fairly easy patch of the first copperlist........

I image 2 external files with just the list of colors for the levels with blue background and black background for easy modification & test;)
the custom copperlist should have a maximum size of 200*8 bytes
for one WAIT & MOVE command per line...
I'll think about it this weekend

Cool, incl. the underground. Looking forward to what you'll be able to do.

john4p 22 September 2022 19:02

Genlock doesn't work for Giana Sisters either.

For CarVup it works:

https://up.picr.de/44401371dd.png

rothers 22 September 2022 19:03

Isn't there a way to select the colour?

john4p 22 September 2022 19:05

Quote:

Originally Posted by rothers (Post 1566185)
Isn't there a way to select the colour?

No. I think it doesn't depend on a color, it's just the "background layer" that gets replaced I guess (don't know if that's the correct term).
Edit: I was wrong - it does depend on a color.

So Turrican's and Giana Sisters' background is not the system background layer (but CarVup's is).

Toni Wilen 22 September 2022 19:26

Quite weird request but easily doable because ECS Denise (and AGA) supports configurable genlock color (each color palette entry has genlock transparency bit) and it is already emulated. Simple to make it config file only option.

Not sure what kind of config file entry should be because it should allow more than 1 palette entry index.

But don't expect this to work perfectly, for example scoreboard might use same color palette entry (but different color value) that shouldn't be transparent..

john4p 22 September 2022 19:31

Quote:

Originally Posted by Toni Wilen (Post 1566189)
Quite weird request but easily doable because ECS Denise (and AGA) supports configurable genlock color (each color palette entry has genlock transparency bit) and it is already emulated. Simple to make it config file only option.

Not sure what kind of config file entry should be because it should allow more than 1 palette entry index.

But don't expect this to work perfectly, for example scoreboard might use same color palette entry (but different color value) that shouldn't be transparent..

Glad to hear it's not difficult to implement. Config file option only is totally fine.

I know it's a quite unusual request but I'd be very happy if you'd add this option.

Should the scoreboard be affected I can just change the PNG to account for this (paint the usual color in that area).

rothers 23 September 2022 12:59

Looking forward to seeing some excellent uses of pixel art backgrounds.

Toni Wilen 23 September 2022 20:38

https://www.winuae.net/files/b/winuae.7z

Config file entry "genlock_effects=<numbers separated by comma>". number = color palette index that has genlock transparency bit set. p<number> = plane <number> is genlock mask. Both are ECS Denise new genlock features. (Originally genlock could only replace color 0). This feature "simply" reuses them.

For example "genlock_effects=3,15" (colors 3 and 15 will get replaced with genlock image)

ECS Denise is not required but genlock must be enabled (with some side-effects due to genlock, for example most programmed custom chipset display modes are not available in WB if genlock is enabled). Emulated genlock requirement probably will be gone in future update.

john4p 23 September 2022 21:18

Thanks a bunch Toni! :great

john4p 23 September 2022 22:45

https://s4.gifyu.com/images/t1copper.gif

Works pretty well (my png isn't optimal yet), but there's a problem with the main character:

https://up.picr.de/44407234rj.png

If someone else wants to try this, genlock_effects=5 is the right palette index for Turrican.

(I'm away tomorrow, will try again on Sunday.)

Toni Wilen 24 September 2022 12:39

Fixed some sprite related genlock color selection bugs. Possibly fixes above problem.

rothers 24 September 2022 15:40

I feel adding these backgrounds is legit as the system supported it.


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

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.

Page generated in 0.04961 seconds with 11 queries