Hi, I'm writting my first GB emulator, and it's already playing some commercial and demos games almost flawlessly (tetris, SML1, SML2, etc).
However, some other games, show no transparent sprites. For example, the lion king menu screen, has 8x16 sprites for the options, and for some reason they are drawn with a black background. This also happens ingame and with other games, including dr mario.
I've compared the sprites with BGB vram debugger, and the palettes, and they are exactly the same as my emu (showing those black backgrounds in the tile viewer, but showing them transparent in game). All sprites in the lion king menu have OAM attributes = 0, so no priority, x flip or y flip present.
I have no clue what's going on, or what I'm missing, since sprites in other games work as intended. Blarggs cpu instructions rom also passes the 11 tests ok.
Any ideas ?
Thanks,
sprites transparency
sprites transparency
- Attachments
-
- lionking.jpg (10.51 KiB) Viewed 4269 times
Re: sprites transparency
Only some games? o.O
Do you know if the color matters?
Do you know if the color matters?
Re: sprites transparency
Yes, it happens in games like The Lion King, Dr Mario, Agro Soar, and some others.
The game calculates the color as 11, which with pallette = 0x1B means the color is BLACK, and as I understand, white is the transparent color for sprites.
The weird thing is that BGB also shows those tiles with a black background, so I think my algorythm is correct.
The game calculates the color as 11, which with pallette = 0x1B means the color is BLACK, and as I understand, white is the transparent color for sprites.
The weird thing is that BGB also shows those tiles with a black background, so I think my algorythm is correct.
Re: sprites transparency
I thought the transparent color for sprites was color index 0 and had nothing to do with the palette. If white itself were transparent, then Mario's face in Super Mario Land 2: 6 Golden Coins would look kind of funny in most of Pumpkin Zone.
Re: sprites transparency
Pretty sure it should be index 0... In fact, note how the interior of the font is transparent. Looks like for whatever reason the wrong color ends up being 0.
Re: sprites transparency
yep, you're right, that fixed it !
thanks !
thanks !