Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for transparency in icons #1

Closed
DeadlySystem opened this issue Oct 8, 2014 · 3 comments
Closed

Support for transparency in icons #1

DeadlySystem opened this issue Oct 8, 2014 · 3 comments
Assignees

Comments

@DeadlySystem
Copy link

The icons of savegames can have transparency. This is for example the case with the icons for Spyro games. The transparency effect can be seen in the memory card manager in the BIOS. More information can be found in the Noca$h documentation: http://problemkaputt.de/psx-spx.htm#memorycarddataformat
It says:

Icon Frame(s) (Block 1..15, Frame 1..3) (in first block of file only)
00h-7Fh Icon Bitmap (16x16 pixels, 4bit color depth)
Note: The icons are shown in the BIOS bootmenu (which appears when starting the PlayStation without a CDROM inserted). The icons are drawn via GP0(2Ch) command, ie. as Textured four-point polygon, opaque, with texture-blending, whereas the 24bit blending color is 808080h (so it's quite the same as raw texture without blending). As semi-transparency is disabled, Palette/CLUT values can be 0000h=FullyTransparent, or 8000h=SolidBlack (the icons are usually shown on a black background, so it doesn't make much of a difference).

I am not 100% sure what this means, but it seems that a palette color that is 0x0000 is transparent while 0x8000 is black. For other colors, the MSB does not seem to matter. Memcardrex should support this kind of transparency.

Note that I'm not sure why it says the icons are usually shown on a black background - in my BIOS, the background is bluish:
screeny

@ShendoXT ShendoXT self-assigned this Oct 15, 2014
@ShendoXT
Copy link
Owner

Some BIOSes have different interfaces. There are ones with black background color
where this transparency doesn't matter much.
More info here, http://www.emutalk.net/threads/15115-PSOne-BIOS-SCPH101-Shots

As for transparency issue, I hope this will sufice.
mcrxicnfix

@DeadlySystem
Copy link
Author

Thanks for caring! While it does fix the issue with Spyro, I don't think it's a correct solution. It probably makes things worse in many other cases. As I said in the report, I think a color is only transparent if the palette entry is all-0, i.e. in the loop check if saveData[slotNumber, byteCount + 96] == 0 && saveData[slotNumber, byteCount + 97] == 0, and only then set THAT color to Color.Transparent. Ideally, you could draw an icon with first palette color = black and check if it's really black in the BIOS I'm showing above, I think it's SCPH1001 (BTW, this is an NTSC BIOS. The PAL BIOS has the black background. The guy from Nocash is German, so he probably tested with a PAL BIOS). But I think it will appear all-black, not completely transparent. Also, I'm not sure about the mapping of colors from the editor. You can't draw in transparent right now. But that's a more complex issue and probably less relevant. I'm just worried about preserving the original colors.

@ShendoXT
Copy link
Owner

Thanks for the heads up, It should work properly for all icons now.

Also, as PS1 BIOS backgrounds aren't consistent i added option to change it in the
preferences dialog.
mcrexdialog
mcrexspyro

I also added you to the "Thanks to" list in the application for the suggestion :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants