Page 1 of 1

Window color gradient with hdma?

Posted: Wed Oct 03, 2018 11:57 am
by olddb
Sorry if this topic has been touched before. Couldnt find anything with a quick search.
I'm wondering how is the hdma window color gradient is done? I'm thinking like the effect in the menus of games like ff6, chrono trigger, sd3, etc.
As I understand, color ram cant be touched mid frame.
So how is it done?

Thank you.

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 12:15 pm
by tepples
Color RAM and COLDATA can be touched during horizontal blanking.

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 12:40 pm
by olddb
Thank you.

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 12:48 pm
by Bregalad
olddb wrote:Sorry if this topic has been touched before. Couldnt find anything with a quick search.
I'm wondering how is the hdma window color gradient is done? I'm thinking like the effect in the menus of games like ff6, chrono trigger, sd3, etc.
As I understand, color ram cant be touched mid frame.
So how is it done?
In those cases it is NOT done with colour RAM, but it is done with transparency effects, using single colour add/substract (add for the top half of the window gradiant and substract for the bottom half) and using gray as the single colour. However that can also be acheived by changing colour RAM : Tales of Phantasia for instance changes backdrop colour to make a similar but different effect.

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 1:16 pm
by olddb
Bregalad wrote:However that can also be acheived by changing colour RAM : Tales of Phantasia for instance changes backdrop colour to make a similar but different effect.
I guess the down side of this type would be that there's a need for at least 2 hdma channels in order to setup the $2121 and $2122 registers separately.

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 1:18 pm
by lidnariq
HDMA has the 0,0,1,1 mode which, at the cost of a redundant write to the address register, can set the address and two data bytes.

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 1:54 pm
by olddb
lidnariq wrote:HDMA has the 0,0,1,1 mode which, at the cost of a redundant write to the address register, can set the address and two data bytes.
I need to ask questions here more often and stop trying to figure things on my own. :P

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 3:23 pm
by Drew Sebastino
That's what I did! :lol:

Re: Window color gradient with hdma?

Posted: Wed Oct 03, 2018 10:31 pm
by srg320
There are some examples of gradient (RedSpace...) and window with source codes.