Author Topic: CPS-III driver preview  (Read 112611 times)

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #90 on: January 07, 2008, 10:36:49 AM »
ThanX for the fix OopsWare!!  Sean stage is going good here too :biggrin:

SeeYaa!
 :biggrin:


Offline OopsWare

  • Expert
  • *****
  • Posts: 38
  • Karma: +31/-0
Re: CPS-III driver preview
« Reply #91 on: January 08, 2008, 11:45:54 PM »
important fix for line scroll effect of super arts background .

it's my mistake that waste cpu time to render whole tiles.
some code i doesn't observed when i port it .

      //clip.min_x = cliprect->min_x;
      //clip.max_x = cliprect->max_x;
      //clip.min_y = drawline;
      //clip.max_y = drawline;

now it can be full speed without frameskip on a P4 1.x  :biggrin:

Code: [Select]
static void cps3_drawgfxzoom_1(unsigned int code, unsigned int pal, int flipx, int flipy, int x, int y, int drawline)
{
unsigned int * dst = RamScreen;
unsigned char * src = (unsigned char *) RamCRam;
dst += (drawline * 1024 + x);

#if BE_GFX

if ( flipy ) {
src += code * 256 + 16 * (15 - (drawline - y));
if ( flipx ) {
if ( src[ 0] ) dst[15] = src[ 0] | pal;
if ( src[ 1] ) dst[14] = src[ 1] | pal;
if ( src[ 2] ) dst[13] = src[ 2] | pal;
if ( src[ 3] ) dst[12] = src[ 3] | pal;
if ( src[ 4] ) dst[11] = src[ 4] | pal;
if ( src[ 5] ) dst[10] = src[ 5] | pal;
if ( src[ 6] ) dst[ 9] = src[ 6] | pal;
if ( src[ 7] ) dst[ 8] = src[ 7] | pal;
if ( src[ 8] ) dst[ 7] = src[ 8] | pal;
if ( src[ 9] ) dst[ 6] = src[ 9] | pal;
if ( src[10] ) dst[ 5] = src[10] | pal;
if ( src[11] ) dst[ 4] = src[11] | pal;
if ( src[12] ) dst[ 3] = src[12] | pal;
if ( src[13] ) dst[ 2] = src[13] | pal;
if ( src[14] ) dst[ 1] = src[14] | pal;
if ( src[15] ) dst[ 0] = src[15] | pal;
} else {
if ( src[ 0] ) dst[ 0] = src[ 0] | pal;
if ( src[ 1] ) dst[ 1] = src[ 1] | pal;
if ( src[ 2] ) dst[ 2] = src[ 2] | pal;
if ( src[ 3] ) dst[ 3] = src[ 3] | pal;
if ( src[ 4] ) dst[ 4] = src[ 4] | pal;
if ( src[ 5] ) dst[ 5] = src[ 5] | pal;
if ( src[ 6] ) dst[ 6] = src[ 6] | pal;
if ( src[ 7] ) dst[ 7] = src[ 7] | pal;
if ( src[ 8] ) dst[ 8] = src[ 8] | pal;
if ( src[ 9] ) dst[ 9] = src[ 9] | pal;
if ( src[10] ) dst[10] = src[10] | pal;
if ( src[11] ) dst[11] = src[11] | pal;
if ( src[12] ) dst[12] = src[12] | pal;
if ( src[13] ) dst[13] = src[13] | pal;
if ( src[14] ) dst[14] = src[14] | pal;
if ( src[15] ) dst[15] = src[15] | pal;
}
} else {
src += code * 256 + 16 * (drawline - y);
if ( flipx ) {
if ( src[ 0] ) dst[15] = src[ 0] | pal;
if ( src[ 1] ) dst[14] = src[ 1] | pal;
if ( src[ 2] ) dst[13] = src[ 2] | pal;
if ( src[ 3] ) dst[12] = src[ 3] | pal;
if ( src[ 4] ) dst[11] = src[ 4] | pal;
if ( src[ 5] ) dst[10] = src[ 5] | pal;
if ( src[ 6] ) dst[ 9] = src[ 6] | pal;
if ( src[ 7] ) dst[ 8] = src[ 7] | pal;
if ( src[ 8] ) dst[ 7] = src[ 8] | pal;
if ( src[ 9] ) dst[ 6] = src[ 9] | pal;
if ( src[10] ) dst[ 5] = src[10] | pal;
if ( src[11] ) dst[ 4] = src[11] | pal;
if ( src[12] ) dst[ 3] = src[12] | pal;
if ( src[13] ) dst[ 2] = src[13] | pal;
if ( src[14] ) dst[ 1] = src[14] | pal;
if ( src[15] ) dst[ 0] = src[15] | pal;
} else {
if ( src[ 0] ) dst[ 0] = src[ 0] | pal;
if ( src[ 1] ) dst[ 1] = src[ 1] | pal;
if ( src[ 2] ) dst[ 2] = src[ 2] | pal;
if ( src[ 3] ) dst[ 3] = src[ 3] | pal;
if ( src[ 4] ) dst[ 4] = src[ 4] | pal;
if ( src[ 5] ) dst[ 5] = src[ 5] | pal;
if ( src[ 6] ) dst[ 6] = src[ 6] | pal;
if ( src[ 7] ) dst[ 7] = src[ 7] | pal;
if ( src[ 8] ) dst[ 8] = src[ 8] | pal;
if ( src[ 9] ) dst[ 9] = src[ 9] | pal;
if ( src[10] ) dst[10] = src[10] | pal;
if ( src[11] ) dst[11] = src[11] | pal;
if ( src[12] ) dst[12] = src[12] | pal;
if ( src[13] ) dst[13] = src[13] | pal;
if ( src[14] ) dst[14] = src[14] | pal;
if ( src[15] ) dst[15] = src[15] | pal;
}
}

#else

if ( flipy ) {
src += code * 256 + 16 * (15 - (drawline - y));
if ( flipx ) {
if ( src[ 3] ) dst[15] = src[ 3] | pal;
if ( src[ 2] ) dst[14] = src[ 2] | pal;
if ( src[ 1] ) dst[13] = src[ 1] | pal;
if ( src[ 0] ) dst[12] = src[ 0] | pal;
if ( src[ 7] ) dst[11] = src[ 7] | pal;
if ( src[ 6] ) dst[10] = src[ 6] | pal;
if ( src[ 5] ) dst[ 9] = src[ 5] | pal;
if ( src[ 4] ) dst[ 8] = src[ 4] | pal;
if ( src[11] ) dst[ 7] = src[11] | pal;
if ( src[10] ) dst[ 6] = src[10] | pal;
if ( src[ 9] ) dst[ 5] = src[ 9] | pal;
if ( src[ 8] ) dst[ 4] = src[ 8] | pal;
if ( src[15] ) dst[ 3] = src[15] | pal;
if ( src[14] ) dst[ 2] = src[14] | pal;
if ( src[13] ) dst[ 1] = src[13] | pal;
if ( src[12] ) dst[ 0] = src[12] | pal;
} else {
if ( src[ 3] ) dst[ 0] = src[ 3] | pal;
if ( src[ 2] ) dst[ 1] = src[ 2] | pal;
if ( src[ 1] ) dst[ 2] = src[ 1] | pal;
if ( src[ 0] ) dst[ 3] = src[ 0] | pal;
if ( src[ 7] ) dst[ 4] = src[ 7] | pal;
if ( src[ 6] ) dst[ 5] = src[ 6] | pal;
if ( src[ 5] ) dst[ 6] = src[ 5] | pal;
if ( src[ 4] ) dst[ 7] = src[ 4] | pal;
if ( src[11] ) dst[ 8] = src[11] | pal;
if ( src[10] ) dst[ 9] = src[10] | pal;
if ( src[ 9] ) dst[10] = src[ 9] | pal;
if ( src[ 8] ) dst[11] = src[ 8] | pal;
if ( src[15] ) dst[12] = src[15] | pal;
if ( src[14] ) dst[13] = src[14] | pal;
if ( src[13] ) dst[14] = src[13] | pal;
if ( src[12] ) dst[15] = src[12] | pal;
}
} else {
src += code * 256 + 16 * (drawline - y);
if ( flipx ) {
if ( src[ 3] ) dst[15] = src[ 3] | pal;
if ( src[ 2] ) dst[14] = src[ 2] | pal;
if ( src[ 1] ) dst[13] = src[ 1] | pal;
if ( src[ 0] ) dst[12] = src[ 0] | pal;
if ( src[ 7] ) dst[11] = src[ 7] | pal;
if ( src[ 6] ) dst[10] = src[ 6] | pal;
if ( src[ 5] ) dst[ 9] = src[ 5] | pal;
if ( src[ 4] ) dst[ 8] = src[ 4] | pal;
if ( src[11] ) dst[ 7] = src[11] | pal;
if ( src[10] ) dst[ 6] = src[10] | pal;
if ( src[ 9] ) dst[ 5] = src[ 9] | pal;
if ( src[ 8] ) dst[ 4] = src[ 8] | pal;
if ( src[15] ) dst[ 3] = src[15] | pal;
if ( src[14] ) dst[ 2] = src[14] | pal;
if ( src[13] ) dst[ 1] = src[13] | pal;
if ( src[12] ) dst[ 0] = src[12] | pal;
} else {
if ( src[ 3] ) dst[ 0] = src[ 3] | pal;
if ( src[ 2] ) dst[ 1] = src[ 2] | pal;
if ( src[ 1] ) dst[ 2] = src[ 1] | pal;
if ( src[ 0] ) dst[ 3] = src[ 0] | pal;
if ( src[ 7] ) dst[ 4] = src[ 7] | pal;
if ( src[ 6] ) dst[ 5] = src[ 6] | pal;
if ( src[ 5] ) dst[ 6] = src[ 5] | pal;
if ( src[ 4] ) dst[ 7] = src[ 4] | pal;
if ( src[11] ) dst[ 8] = src[11] | pal;
if ( src[10] ) dst[ 9] = src[10] | pal;
if ( src[ 9] ) dst[10] = src[ 9] | pal;
if ( src[ 8] ) dst[11] = src[ 8] | pal;
if ( src[15] ) dst[12] = src[15] | pal;
if ( src[14] ) dst[13] = src[14] | pal;
if ( src[13] ) dst[14] = src[13] | pal;
if ( src[12] ) dst[15] = src[12] | pal;
}
}

#endif
}


static void cps3_draw_tilemapsprite_line(int drawline, unsigned int * regs )
{
.....
cps3_drawgfxzoom_1(tileno,colour,xflip,yflip,(x*16)-scrollx%16,drawline-tilesubline, drawline);
....
}



Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #92 on: January 09, 2008, 12:15:34 AM »
ThanX OopsWare!! Im going to test it asap, ThanX like always for your great work on the CPS3 driver for FBA  :biggrin:

SeeYaa!
 :biggrin:

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #93 on: January 09, 2008, 12:45:39 AM »
Working good around here  :cool: (check the attachment)

SeeYaa!
 :biggrin:

Offline DF723

  • Newbies
  • *
  • Posts: 32
  • Karma: +0/-0
Re: CPS-III driver preview
« Reply #94 on: January 09, 2008, 02:46:35 PM »
Let me post one more image from R13:




Notice the image of South American (and Africa) have the same linescrolling problem as the Super Art background, same goes for the wooden boardwalk in Ryu/Ken's stage. Oopsware, I'm going to post this in case you missed this; if you managed to fixed it already, then good  :biggrin:
« Last Edit: January 09, 2008, 02:59:40 PM by DF723 »

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #95 on: January 09, 2008, 03:04:04 PM »
Let me post one more image from R13:




Notice the image of South American (and Africa) have the same linescrolling problem as the Super Art background, same goes for the wooden boardwalk in Ryu/Ken's stage. Oopsware, I'm going to post this in case you missed this; if you managed to fixed it already, then good  :biggrin:

The release of R14 is almost finished it will include an extensive list of updates including some new updates that OopsWare sent me via MSN, so stay tuned  :wink:

(Check the Attachment)

SeeYaa!
 :biggrin:

[attachment deleted by admin]

Offline StriderSkorpion

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
Re: CPS-III driver preview
« Reply #96 on: January 09, 2008, 08:10:16 PM »
Good work on the CPS-3 driver guys. If I had know, I could've helped you out with creating the Red Earth (NOCD) BIOS as I was able to create the newer CPS-3 BIOS files for MAME. It seems Capcom was lazy as all the CPS-3 BIOS files for a game are the same except for the region and/or NOCD byte. On a side note, I wonder if Red Earth/Warzard has a NOCD byte (other than the Asia NOCD region).

Offline DF723

  • Newbies
  • *
  • Posts: 32
  • Karma: +0/-0
Re: CPS-III driver preview
« Reply #97 on: January 12, 2008, 05:14:19 PM »
This image is snapped from Build R14:



Noticed the black line at the lower part of the screen and a very small portion of Alex's stage can still be seen. Is this normal? 

Offline OopsWare

  • Expert
  • *****
  • Posts: 38
  • Karma: +31/-0
Re: CPS-III driver preview
« Reply #98 on: January 13, 2008, 10:50:10 AM »
here can fix the last line at bottom of screen in DrvDraw();
Quote
   {
      // Clear Screen Buffer
      //memset(RamScreen, 0, 512 * 448 * sizeof(int));
      unsigned int * pscr = RamScreen;
      int clrsz = (cps3_gfx_max_x + 1) * sizeof(int);
      for(int yy = 0; yy<=cps3_gfx_max_y; yy++, pscr += 512*2)
         memset(pscr, 0, clrsz);
   }

but don't know whether it can fix all .

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #99 on: January 13, 2008, 12:02:49 PM »
here can fix the last line at bottom of screen in DrvDraw();
but don't know whether it can fix all .

Gonna test it asap  ;p, ThanX OopsWare! ^^

SeeYaa!
 :biggrin:

Offline OopsWare

  • Expert
  • *****
  • Posts: 38
  • Karma: +31/-0
Re: CPS-III driver preview
« Reply #100 on: January 14, 2008, 12:25:56 AM »
small fix , make the linear zoom more precise ...
effect to the intro of jojo sfiii3 redearth, and avatar select stage of redearth

Code: [Select]
if (!flipx) xpos2+=((xsizedraw2+1)/2);
else xpos2-=((xsizedraw2+1)/2);

ypos2+=((ysizedraw2+1)/2);

#if 0
if (!flipx) xpos2-= (xsize2+1)*((16*xinc)>>16);
else  xpos2+= (xsize2)*((16*xinc)>>16);

if (flipy) ypos2-= ysize2*((16*yinc)>>16);
#else
if (!flipx) xpos2-= (((xsize2+1)*16*xinc)>>16);
else  xpos2+= (((xsize2)*16*xinc)>>16);

if (flipy) ypos2-= ((ysize2*16*yinc)>>16);
#endif
{
count = 0;
for (xx=0;xx<xsize2+1;xx++) {
int current_xpos;

#if 0
if (!flipx) current_xpos = (xpos+xpos2+xx*((16*xinc)>>16)  );
else current_xpos = (xpos+xpos2-xx*((16*xinc)>>16));
#else
if (!flipx) current_xpos = (xpos+xpos2+((xx*16*xinc)>>16)  );
else current_xpos = (xpos+xpos2-((xx*16*xinc)>>16));
#endif
//current_xpos +=  rand()&0x3ff;
current_xpos += gscrollx;
current_xpos += 1;
current_xpos &=0x3ff;
if (current_xpos&0x200) current_xpos-=0x400;

for (yy=0;yy<ysize2+1;yy++) {
int current_ypos;
int actualpal;
#if 0
if (flipy) current_ypos = (ypos+ypos2+yy*((16*yinc)>>16));
else current_ypos = (ypos+ypos2-yy*((16*yinc)>>16));
#else
if (flipy) current_ypos = (ypos+ypos2+((yy*16*yinc)>>16));
else current_ypos = (ypos+ypos2-((yy*16*yinc)>>16));
#endif
current_ypos += gscrolly;
current_ypos = 0x3ff-current_ypos;
current_ypos -= 17;
current_ypos &=0x3ff;

Offline iq_132

  • Administrator
  • *****
  • Posts: 3725
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: CPS-III driver preview
« Reply #101 on: January 14, 2008, 12:54:28 AM »
Excellent :)  It's really nice to see you putting so much work into this driver Oopsware.  You're really making
a good effort to make FBA the best cps3 emulator.


Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #102 on: January 14, 2008, 01:19:33 AM »
ThanX OopsWare! Im adding the fix right now ^^, gonna test it asap!

SeeYaa!
 :biggrin:

Offline gine

  • New Member
  • *
  • Posts: 5
  • Karma: +0/-0
Re: CPS-III driver preview
« Reply #103 on: January 20, 2008, 09:29:10 AM »
As for two JoJo games (jojo, jojoba) ,There seems still some alingnment problems in some scenes

1 pixel off (just see black gap in the right side)


http://i31.tinypic.com/1zxta11.jpg


btw, i hope you could submit your CPS3 improvements to MAME as well...

thanks millions


« Last Edit: January 20, 2008, 09:42:20 AM by gine »

Offline KingHanco

  • Sr. Member
  • ****
  • Posts: 401
  • Karma: +0/-4
  • "Special " Member
Re: CPS-III driver preview
« Reply #104 on: January 21, 2008, 04:40:41 AM »
Now this is cool to see. Anyone got MAME Team to see this yet?
« Last Edit: January 21, 2008, 04:42:15 AM by KingHanco »