So much for the super nes I still have just a study mode 7 and sound.
In mode 7, I know use but does not include calculations to do.
I can possibly copy source code but without understanding I could not use (or source code easy for me to make rotations).
I know that:
|X2 | = | A B | X1 - X0 | + | X0 |
|Y2 | = | C D | Y1 - Y0 | + | Y0 |
A = cos theta
B = sin theta
C = -sin theta
D = cos theta
I find it difficult, any help is welcome.
thank you.
Mode 7 help
Moderator: Moderators
Forum rules
- For making cartridges of your Super NES games, see Reproduction.
Re: Mode 7 help
- Imagine a line of length 1 at the angle you want
- "sin theta" is the sine of that value
- "cos theta" is the cosine of that value
- Multiply those two by the amount of scaling you want*
*Not sure, may be divide. Either way, you'd figure it out because if it's wrong it'll scale the other way.
Re: Mode 7 help
OK thank you, I'll test.
Re: Mode 7 help
I can more or less do rotation.
and I have a result:

How to do this:
(I scale Y but it does not work).

and I have a result:

How to do this:
(I scale Y but it does not work).

Re: Mode 7 help
A perspective transformation like that will require the use of HDMA to change the matrix transformation registers on every scanline.
Re: Mode 7 help
And also colour addition in HDMA to make it brighter near the horizon.
Re: Mode 7 help
I don't think he's asking about the fog.
But yeah, the matrix needs to be changed every line. The background is scaled small near the horizon and scaled big near the bottom.
But yeah, the matrix needs to be changed every line. The background is scaled small near the horizon and scaled big near the bottom.
Re: Mode 7 help
Right, I did not understand how he could do this effect.But yeah, the matrix needs to be changed every line. The background is scaled small near the horizon and scaled big near the bottom.
Thank you, I'll have to work on the HDMA.