Author Topic: Some testing  (Read 14247 times)

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Re: Some testing
« Reply #15 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);
}
}
Account of Barry Harris; the traitor.
Send me an e-mail at barry@fbalpha.com letting me know how big of a piece of sh** I am.

Offline nonete

  • Newbies
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Some testing
« Reply #16 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,

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Re: Some testing
« Reply #17 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. :)
Account of Barry Harris; the traitor.
Send me an e-mail at barry@fbalpha.com letting me know how big of a piece of sh** I am.

Offline nonete

  • Newbies
  • *
  • Posts: 12
  • Karma: +0/-0
Re: Some testing
« Reply #18 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.

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Re: Some testing
« Reply #19 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.
Account of Barry Harris; the traitor.
Send me an e-mail at barry@fbalpha.com letting me know how big of a piece of sh** I am.