SourMesen / Mesen

Mesen is a cross-platform (Windows & Linux) NES/Famicom emulator built in C++ and C#
https://www.mesen.ca
GNU General Public License v3.0
1.26k stars 320 forks source link

Copy Tile (HD Pack Format) under Nametable Viewer does not pick up the background color #788

Closed mkwong98 closed 4 years ago

mkwong98 commented 4 years ago

I used this function in the title screen of Super Mario Bros and was given a palette as 0F36170F. However it didn't work when I put this into hires.txt and I had to change it to 2236170F, where 22 was the color for the blue sky.

ghost commented 4 years ago

You took colors not from the sky, because 0F as black is transparent color ( and that blue of the sky is under it). If you choose (Show attribute colors only) you will take a hint about it.

This is the title screen's name (super mario bros) image

As you can see above you are taking maybe from the same spot (which is black aka transparent color for the title name)

This is the attribute colors and how they are distributed on the screen: image

If we are about to cancel black color as a transparent color it will be like this just to demonstrate:

image

Studying the game how it works will be better at first.

mkwong98 commented 4 years ago

I know all that. The point is that the HD pack builder generates 2236170F in the hires.txt and the HD pack engine expects 2236170F in the hires.txt so why would a function named "Copy Tile (HD Pack Format)" give me 0F36170F?

SourMesen commented 4 years ago

Thanks for the report! This was because the $04/$08/$12 index colors were being used, instead of using index $00 for all 4 palettes for the background color. This is fixed in the latest commit.