Previous Thread
Next Thread
Print Thread
Page 15 of 120 1 2 13 14 15 16 17 119 120
Joined: Jan 2006
Posts: 3,691
Very Senior Member
Offline
Very Senior Member
Joined: Jan 2006
Posts: 3,691
I would have bet there is need of a shift in 8bpp palette, but since this fixes more than the opposite I had probably made something wrong...

Joined: Dec 2005
Posts: 443
Senior Member
Offline
Senior Member
Joined: Dec 2005
Posts: 443
I wouldn't think so. palette RAM is 512 bytes, at 15 bits per entry.

As far as stuff broken on 8bpp, though, the palette bits in the tilemap do have a use. you can turn the palette selection and palette-ized color into a direct color mode. If I knew what was broken, I could cross-reference with some of my "known places that use this feature" lists and see. (Actraiser II for Direct Color)

Joined: Aug 2009
Posts: 1,251
Likes: 171
Kale Offline OP
Very Senior Member
OP Offline
Very Senior Member
Joined: Aug 2009
Posts: 1,251
Likes: 171
Originally Posted by Heretical_One
I wouldn't think so. palette RAM is 512 bytes, at 15 bits per entry.

512/2=256...8 bpp = 256 colors per entry

I need something that uses direct color without mode 7 anyway...

Last edited by Kale; 08/13/09 09:03 AM.
Kale #52621 08/13/09 10:12 AM
Joined: Dec 2005
Posts: 443
Senior Member
Offline
Senior Member
Joined: Dec 2005
Posts: 443
According to Overload (author of Super Sleuth):

Quote
From my lists these games uses Direct Color Mode

ActRaiser 2, Romance of the 3 Kingdoms 2, Aerobiz, Aerobiz SuperSonic, Secret of Mana

I know Secret of Mana is a world map (and you'll spend longer getting to that point than you will on the bug itself!)


According to my notes (which may not reflect newer findings):
the palette entry itself (0-255) takes the form bbgggrrr and the tilemap palette selection becomes bgr. The palette index supplies the top bits, palette select the next bit, and the rest are 0. (That is, blue = iit00, green/red are iiit0, where t is the palette selection in the tilemap, and the other is the palette index taken from the tile)

Does that match your documents?

Joined: Aug 2009
Posts: 1,251
Likes: 171
Kale Offline OP
Very Senior Member
OP Offline
Very Senior Member
Joined: Aug 2009
Posts: 1,251
Likes: 171
Originally Posted by Heretical_One
Does that match your documents?

Yes, matches, also there's a bug on color calcs even in mode 7 that I need to fix.

EDIT: calcs were right but applied on the wrong layer. And I've lost hopes to find something that uses mode 3/4 + direct colors --"

[Linked Image from mamedev.emulab.it]

[Linked Image from mamedev.emulab.it]

[Linked Image from mamedev.emulab.it]


Last edited by Kale; 08/13/09 10:42 AM.
Kale #52625 08/13/09 11:24 AM
Joined: Dec 2005
Posts: 443
Senior Member
Offline
Senior Member
Joined: Dec 2005
Posts: 443
Supposedly, Secret of Mana uses direct color + mode 3 for one of the world maps. that's a good 20+ hours of gameplay to reach, though.

It should work the same as mode 7, except that mode 7 doesn't have 3 palette bits in the tilemap.

What modes are those last two shots actually in? The first one is obviously Mode 7. The second very well could be (possible logo tricks like Actraiser pulls). The third would be... strange. That looks like a classic place to use Mode 3.

Joined: Aug 2009
Posts: 1,251
Likes: 171
Kale Offline OP
Very Senior Member
OP Offline
Very Senior Member
Joined: Aug 2009
Posts: 1,251
Likes: 171
It's mode 7 for all of three snaps, first two are Aerobiz, the third is Romance of the Three Kingdoms 2 (it uses zooming effects etc.). And, guess that I need to play Secret of Mana and at least I have an original SNES USA cart, I just need to check if I still have a valid save...

Kale #52649 08/13/09 06:38 PM
Joined: Aug 2009
Posts: 1,251
Likes: 171
Kale Offline OP
Very Senior Member
OP Offline
Very Senior Member
Joined: Aug 2009
Posts: 1,251
Likes: 171

r5426 /src/mame/video/snes.c: [SNES]: Fixed direct color gfxs in mode 3/4, also fixed color data shifting in both modes.


Many thanks to Lord Nightmare for the save file. smile

[Linked Image from mamedev.emulab.it]

Color shifting is the first thing that MESS does what other snes emus don't afaik. Ideally if you should do a color conversion to a framebuffer and you can't completely fill that framebuffer, you should fill the remaining data with the most significant bytes of the color offsets.
Comparison:

before:
[Linked Image from mamedev.emulab.it]

after:
[Linked Image from mamedev.emulab.it]

Last edited by Kale; 08/13/09 06:48 PM.
Kale #52650 08/13/09 07:06 PM
Joined: Feb 2008
Posts: 107
D
Senior Member
Offline
Senior Member
D
Joined: Feb 2008
Posts: 107
Is this "color shifting" the same as RGB channel depth promotion doing texture lookups?
Example: if the render target is 888 and the texture is 565 RGB format then the hardware will promote the bits like this:

destination R [7:0] <- source (R4, R3, R2, R1, R0, R4, R3, R2)


Joined: Aug 2009
Posts: 1,251
Likes: 171
Kale Offline OP
Very Senior Member
OP Offline
Very Senior Member
Joined: Aug 2009
Posts: 1,251
Likes: 171
Yes, exactly like that smile

Page 15 of 120 1 2 13 14 15 16 17 119 120

Link Copied to Clipboard
Who's Online Now
4 members (Golden Child, R. Belmont, MrBogi, 1 invisible), 338 guests, and 6 robots.
Key: Admin, Global Mod, Mod
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Forum Statistics
Forums9
Topics9,320
Posts121,944
Members5,074
Most Online1,283
Dec 21st, 2022
Our Sponsor
These forums are sponsored by Superior Solitaire, an ad-free card game collection for macOS and iOS. Download it today!

Superior Solitaire
Forum hosted by www.retrogamesformac.com