You are not logged in.

Read the FAQ and Knowledge Base before posting.
WiFi not emulated and not supported!!
We won't make a 3DS/2DS emulator.



#1 2007-06-11 20:44:23

Mollusk
Member
Registered: 2007-06-11
Posts: 3

[Bug] 16bit Sprites and 16bit texture transparency

Hi,

Great job on the latest versions ! Speed-wise and compatibility-wise (only tested my hombrews though ^^) DeSmuME has grown really impressively lately...

I have 2 minor bugs to reports :

1. 16bit sprites don't display correctly. Seems that whereas it should be using the sprite width for the image width in VRAM, it's using 128 pixels (or 256 ?). I recall seeing a registry entry (probably bits 5 and 6 in DISPCNT, not sure though).

The result is the following :
image2.png
See how the timer/clock looks ? It should be showing only 1 number (vertically, of about 24 pixels tall), not 4 ^^


2. Quick little bug with 16bit textures in ortho mode : looks like the black is removed from the image and set as transparent smile

image1.png

On this image, all the smileys should be filled with black instead of transparency smile

Thanks again for the work you've done on DeSmuME, keep it up guys big_smile

Offline

#2 2007-06-11 21:24:10

shash
Administrator
Registered: 2007-03-17
Posts: 897

Re: [Bug] 16bit Sprites and 16bit texture transparency

I don't know the exact bug with the 16bit sprites, but I can explain the bug with the 3D. Currently, the 3D core reads from the rendered openGL frame buffer, and uses it's result to layer it with the other backgrounds. The main problem with that implementation, is that if you ONLY read from the openGL framebuffer, you've no direct way to know which pixels were written and which weren't.

As a BIG FAT HACK, instead of using the stencil buffer or the depth buffer as a mask, I just decided that black was worthless tongue So basically, pure black pixels are discarded when using the BG0 as a normal layer. This gives problems with at least one game (Ouendan), and it's an ugly implementation. In the future, I'll use either the depth buffer or the stencil buffer (probably the second) to mask the framebuffer from openGL.

Thanks for the bug report smile

Offline

#3 2007-06-11 21:30:27

Mollusk
Member
Registered: 2007-06-11
Posts: 3

Re: [Bug] 16bit Sprites and 16bit texture transparency

Wow, fast answer smile  Thanks for explaining, that's what I thought (without the technical info ^^). I guess it's ok for the vast majority of games (as it's really not a problem here) smile 

As for the 2D Sprites, guess I'll wait some more ^^

Offline

#4 2007-06-11 21:54:54

shash
Administrator
Registered: 2007-03-17
Posts: 897

Re: [Bug] 16bit Sprites and 16bit texture transparency

Is that homebrew released ? Because I can check it and fix it if I'm able to do it, and I'll check how much would reading the stencil buffer affect perfomance, so I can fix a bit the 3D core.

Having coded a bit for the DS (just a quake3 bsp renderer), I know how handy is to have a tool to test before hardware, so as much as I can help, I'll do smile

EDIT: Well, I've already done the implementation using the stencil as a mask, and works perfectly, atleast with the games that gave problems before. It'll (hopefully) committed tomorrow smile

Offline

#5 2007-06-12 07:13:15

Mollusk
Member
Registered: 2007-06-11
Posts: 3

Re: [Bug] 16bit Sprites and 16bit texture transparency

Sorry, thought I had given the link :s

Download here

Offline

Board footer

Powered by FluxBB