Welcome!

Final Burn Neo => FBN Development => Topic started by: Barry Harris on June 09, 2008, 11:12:10 AM

Title: Some testing
Post by: Barry Harris on June 09, 2008, 11:12:10 AM
If anyone has some time I could do with some help in testing something. I've made the following changes to the CPS code;

Quote
- Lagged the sprite palette in all CPS-2 games - fixes issue in ssf2 attract
- Tidied up the CPS-2 split graphics rom loading
- Properly fixed the qadj ninja sprite bug without resorting to hacks

The one I need help testing is the first one - the sprite palette lagging in CPS-2 games. This was previously only enabled in Gigawing but it does resolve the bug posted here (http://www.ojko.com/phpbb/viewtopic.php?f=4&t=3199). The "zorro mask" is actually drawn by MAME if you enable the debugger and run it slow enough so the issue isn't the fact that it shouldn't be drawn - I believe the issue to be that caused by not lagging the palette with the sprites and this pans out due to the fact that this fixes the issue.

From the little testing I've done it doesn't cause any problems in other CPS-2 games but it would be nice if somebody had the time to compile in the attached changes and do some good testing on all CPS-2 games to look for any problems that weren't there before.

Thanks for anyone that finds the time.
Title: Re: Some testing
Post by: Barry Harris on June 09, 2008, 11:14:43 AM
P.S. I got another cave game going. Time to look at the missing fighters next.

Title: Re: Some testing
Post by: BisonSAS on June 09, 2008, 11:59:25 PM
The binary for testing: http://forumawp.googlepages.com/fba_cps2_test.rar

Very nice Cave screenshot Barry! :biggrin: :biggrin: :biggrin:
Title: Re: Some testing
Post by: JacKc on June 11, 2008, 05:11:59 PM
Start some test with the set beginning with 1

Some bugs in the intro for 19XX - The War against destiny (951207 USA)

Title: Re: Some testing
Post by: BisonSAS on June 11, 2008, 11:47:14 PM
Start some test with the set beginning with 1

Some bugs in the intro for 19XX - The War against destiny (951207 USA)
The driver need BDF_16BIT_ONLY.

New binary for testing: http://forumawp.googlepages.com/fba_cps2_test2.rar
Title: Re: Some testing
Post by: Barry Harris on June 12, 2008, 03:26:41 AM
Hmm, I don't repro that bug on my build - and to be honest it wouldn't make sense that lagging the sprite palette would cause that!

Oh, and the driver doesn't need BDF_16BIT_ONLY. It supports all colour depths in it's rendering.
Title: Re: Some testing
Post by: JacKc on June 12, 2008, 05:58:39 PM
I've seen bugs for Alien Vs Predator and Armored Warriros (only Euro Versions :confused:)

Test made with fba_cps_test2
Title: Re: Some testing
Post by: BisonSAS on June 12, 2008, 11:41:18 PM
Hmm, I don't repro that bug on my build - and to be honest it wouldn't make sense that lagging the sprite palette would cause that!

Oh, and the driver doesn't need BDF_16BIT_ONLY. It supports all colour depths in it's rendering.
I'm using your source and gets this bugs in 32 bits... ;p
Bug in the blitters:
Basic and SoftFX
Enhanced work fine.


I've seen bugs for Alien Vs Predator and Armored Warriros (only Euro Versions :confused:)

Test made with fba_cps_test2
Missing BDF_16BIT_ONLY in this drives. :p I forgot to add this. :biggrin:
Title: Re: Some testing
Post by: kev on June 14, 2008, 06:09:36 AM
I'm using your source and gets this bugs in 32 bits... ;p
Bug in the blitters:
Basic and SoftFX
Enhanced work fine.

Missing BDF_16BIT_ONLY in this drives. :p I forgot to add this. :biggrin:

There seems to be a bug in some of the rendering code as I have the same problem on a laptop here. What graphics chipset are you using? I might get chance to take a look this week.
Title: Re: Some testing
Post by: Barry Harris on June 14, 2008, 07:31:53 AM
There seems to be a bug in some of the rendering code as I have the same problem on a laptop here. What graphics chipset are you using? I might get chance to take a look this week.

Hmm, I think I'll flag CPS drivers as BDF_16BIT_ONLY then. I wonder how long this has existed? I use 32-bit depth on both my desktop (nVidia 8800) and my laptop (ATI) and none of those problems repro. I wonder if it's a GCC vc VC thing? I'm testing with GCC.
Title: Re: Some testing
Post by: Barry Harris on June 14, 2008, 07:35:35 AM
VC builds work fine here (on my desktop) so that's not the issue. :)
Title: Re: Some testing
Post by: Barry Harris on June 14, 2008, 07:38:19 AM
Just tested the build Bison posted and the issue does exist when I use that one. Not sure what happened but it's in that build. :)
Title: Re: Some testing
Post by: Barry Harris on June 14, 2008, 07:42:24 AM
Scratch all that - it's a blitter issue as previously described. :)
Title: Re: Some testing
Post by: kev on June 14, 2008, 03:40:31 PM
Seems to be worse with the scanlines enabled on my media centre PC. Crashes FBA with a memory leak for some reason. Can't run visual studio on it tho so trying to remember how to use gbd and failing. :)
Title: Re: Some testing
Post by: BisonSAS on June 15, 2008, 10:22:48 AM
What graphics chipset are you using?
GeForce FX 5200 :p
Title: Re: Some testing
Post by: Barry Harris on July 01, 2008, 07:00:03 AM
Bug was entirely my fault. The clearing code assumed a 16-bit colour depth. This code should work for all blitters and colour depths - just replace the CpsClearScreen function with this one.

Code: [Select]
void CpsClearScreen()
{
if (Cps == 1) {
switch (nBurnBpp) {
case 4: {
unsigned int* pClear = (unsigned int*)pBurnDraw;
unsigned int nColour = CpsPal[0xbff ^ 15];
for (int i = 0; i < 384 * 224 / 8; i++) {
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
}
break;
}

case 3: {
unsigned char* pClear = pBurnDraw;
unsigned char r = CpsPal[0xbff ^ 15];
unsigned char g = (r >> 8) & 0xFF;
unsigned char b = (r >> 16) & 0xFF;
r &= 0xFF;
for (int i = 0; i < 384 * 224; i++) {
*pClear++ = r;
*pClear++ = g;
*pClear++ = b;
}
break;
}

case 2: {
unsigned int* pClear = (unsigned int*)pBurnDraw;
unsigned int nColour = CpsPal[0xbff ^ 15] | CpsPal[0xbff ^ 15] << 16;
for (int i = 0; i < 384 * 224 / 16; i++) {
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
*pClear++ = nColour;
}
break;
}
}
} else {
memset(pBurnDraw, 0, 384 * 224 * nBurnBpp);
}
}
Title: Re: Some testing
Post by: nonete on July 01, 2008, 10:51:44 AM
Very thanks for correct the bug in Basic and SoftFX blitters, I also have graphics bugs with this blitters in megadrive, this code corrects this bugs? Megadrive and cps works fine with Enhanced blitters, but ussually I use Basic and softfx.Anyway, excelent work, waiting for a new version to test!!!!


Regards,
Title: Re: Some testing
Post by: Barry Harris on July 01, 2008, 11:46:21 AM
Megadrive is easy - drivers need marking as 16-bit only rendering.

Open d_megadrive.cpp and do a search and replace of;
Code: [Select]
, 2, HARDWAREto
Code: [Select]
| BDF_16BIT_ONLY, 2, HARDWARE
That should get them all. :)
Title: Re: Some testing
Post by: nonete on July 01, 2008, 06:25:08 PM
Very Thanks for the code Treble Winner, I do all modifications on original source of FB Alpha 0.2.96.85 Release, In cps2 also in megadrive all graphics problems are gone!!! ;) (at least all test I do, I donĀ“t test every megadrive game).I attach some images, the bad graphics ones are with original FB Alpha 0.2.96.85 Release, the good graphics ones are with a compiled by me version using FB Alpha 0.2.96.85 Release source code.

Seens that graphic problems with Basic and SoftFX blitters are gone!!! in a few minuts I upload a fba executable with this modifications for people testing!.

A quick question for Treble Winner, will you add this corrections for future releases of FBA?

Sorry for my english but my native language is spanish.

Treble Winner, again, Excelent work, congratulations!!! and very thanks for the code and for a quick reply.
Title: Re: Some testing
Post by: Barry Harris on July 02, 2008, 03:25:52 AM
A quick question for Treble Winner, will you add this corrections for future releases of FBA?

It's all already in my code. Will be in the next release.