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

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #60 on: January 03, 2008, 06:56:47 PM »
@ BisonSAS: Hi man, I have some questions regarding the functionality of the DIPswitches, since you have experience working with them, why could some DIPs values not appear ? I made that question because I have the DIPs working for some CPS3 drivers but there are others that are not showing any value in the DIPs window, just blank =(

here is some of my DIPs code (Its not final and some regions must be verified)

Quote

// WORKING ...
static struct BurnDIPInfo jojoDIPList[] = {
   // Defaults
   {0x1a,   0xFF, 0xFF,   0x08, NULL},

   // DIP 1
   {0,      0xFE, 0,   8,      "Region"      },
   {0x1a,   0x01, 0x0f, 0x06,   "BRAZIL"      },
   {0x1a,   0x01, 0x0f, 0x05,   "HISPANIC"      },
   {0x1a,   0x01, 0x0f, 0x04,   "USA"         },
   {0x1a,   0x01, 0x0f, 0x03,   "EURO"         },
   {0x1a,   0x01, 0x0f, 0x02,   "ASIA (NCD)"   },
   {0x1a,   0x01, 0x0f, 0x01,   "JAPAN"         },
   {0x1a,   0x01, 0x0f, 0x00,   "XXXXXX"      },
   {0x1a,   0x01, 0x0f, 0x07,   "OCEANIA"      },   
};

STDDIPINFO(jojo);

//  NOT WORKING ...
static struct BurnDIPInfo jojobaDIPList[] = {
   // Defaults
   {0x1a,   0xFF, 0xFF,   0x08, NULL},

   // DIP 1
   {0,      0xFE, 0,   8,      "Region"      },
   {0x1a,   0x01, 0x0f, 0x06,   "JAPAN"         },
   {0x1a,   0x01, 0x0f, 0x05,   "ASIA"         },
   {0x1a,   0x01, 0x0f, 0x04,   "EURO"         },
   {0x1a,   0x01, 0x0f, 0x03,   "USA"         },
   {0x1a,   0x01, 0x0f, 0x02,   "HISPANIC"      },
   {0x1a,   0x01, 0x0f, 0x01,   "BRAZIL"      },
   {0x1a,   0x01, 0x0f, 0x00,   "OCEANIA"      },
   {0x1a,   0x01, 0x0f, 0x05,   "ASIA (NO CD)"   },   
};

STDDIPINFO(jojoba);

// NOT WORKING ...
static struct BurnDIPInfo jojobaneDIPList[] = {
   // Defaults
   {0x1a,   0xFF, 0xFF,   0x08, NULL},

   // DIP 1
   {0,      0xFE, 0,   8,      "Region"      },
   {0x1a,   0x01, 0x0f, 0x06,   "JAPAN"         },
   {0x1a,   0x01, 0x0f, 0x05,   "ASIA"         },
   {0x1a,   0x01, 0x0f, 0x04,   "EURO"         },
   {0x1a,   0x01, 0x0f, 0x03,   "USA"         },
   {0x1a,   0x01, 0x0f, 0x02,   "HISPANIC"      },
   {0x1a,   0x01, 0x0f, 0x01,   "BRAZIL"      },
   {0x1a,   0x01, 0x0f, 0x00,   "OCEANIA"      },
   {0x1a,   0x01, 0x0f, 0x05,   "ASIA (NO CD)"   },   
};

STDDIPINFO(jojobane);


The first one is working the other two not, they show a blank DIPs in the windows, nothing is shown. If I can make the remaining dips to work the CPS3 driver will be almost complete, there are some issues with gfx in Red Earth (like the second health bar is not shown) and the CD-ROM not supported for now, but everything else is going pretty nice.

btw, I have implemented a little tweak in my build to made it posible to Enable or Disable both 'FastBoot' and 'SpeedHack' for CPS-3  :smilie: I attached some pictures including one that shows all verified romsets.

SeeYaa!
 :biggrin:

Offline OopsWare

  • Expert
  • *****
  • Posts: 38
  • Karma: +31/-0
Re: CPS-III driver preview
« Reply #61 on: January 03, 2008, 08:26:06 PM »
remove dip config ???.ini file in \config\games can solve it .
maybe u set the region value to 7 and not exists in your new DIPList,
the burner can't show. is this a small bug ??

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #62 on: January 03, 2008, 09:45:36 PM »
remove dip config ???.ini file in \config\games can solve it .
maybe u set the region value to 7 and not exists in your new DIPList,
the burner can't show. is this a small bug ??

That fixed it ^^ I didnt delete the old configs  :p, btw, I fixed some other issues too and now all games have the DIPs working fine with or without the 'fastboot' / 'speedhack' options ^^

Im doing some cleaning to release the updated files  :smilie:

SeeYaa!
 :biggrin:

Offline nganiere

  • Newbies
  • *
  • Posts: 37
  • Karma: +0/-4
Re: CPS-III driver preview
« Reply #63 on: January 03, 2008, 09:59:18 PM »
way to go CaptainCPS-X.....can't wait to try your updated drivers.....

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #64 on: January 04, 2008, 12:41:14 AM »
OopsWare here I bring my updated 'cps3run.cpp' & 'd_cps3.cpp' , I organized everything in 'd_cps3.cpp' and added Functions macros / DIPs / Comments & added all CPS3 drivers (there are no more fake clones like I call them  :p)...

In 'cps3run.cpp' there are some modifications including the implementation of bool's for the conditions of 'fastboot' and 'speedhacks' , they are the following:

- bFastBoot;
- bSpeedHack;

and removed the other build-conditioned 'FAST_BOOT' and 'SPEED_HACK'.

Here you have instructions on how to add the 'CPS-III Settings' to the FBA Menu like in my build  :wink: :


In 'src/burn/burn.h' look for this:

Quote
extern bool bBurnUseMMX;

Add this before:

Quote
extern bool bFastBoot, bSpeedHack;

In 'src/burner/win32/scrn.cpp' look for:

Quote
case MENU_SNAPFACT:

Add this before:

Quote
      // CPS-3: SET FAST BOOT
      case MENU_CPS3_FASTBOOT:
      {
         if(!bFastBoot) {
            bFastBoot = true;
         } else {
            bFastBoot = false;
         }
         MessageBox(hScrnWnd, _T("Enabling / Disabling 'FastBoot' requires at least a Reset to be applied."), _T("FB Alpha Enhanced Info"), MB_OK | MB_ICONINFORMATION);
         POST_INITIALISE_MESSAGE;
         break;
      }

      // CPS-3: SET SPEED HACK
      case MENU_CPS3_SPEEDHACK:
      {
         if(!bSpeedHack) {
            bSpeedHack = true;
         } else {
            bSpeedHack = false;
         }
         MessageBox(hScrnWnd, _T("Enabling / Disabling 'SpeedHack' requires the game to be Reloaded to be applied.\nNote: Reseting the game won't apply the feature."), _T("FB Alpha Enhanced Info"), MB_OK | MB_ICONINFORMATION);
         POST_INITIALISE_MESSAGE;
         break;
      }

In 'src/burner/win32/menu.cpp' look for:

Quote
CheckMenuRadioItem(hMenu, MENU_ASPECTNORMAL, MENU_ASPECTWIDE, var, MF_BYCOMMAND);

Add this before:

Quote
   // CPS-III Settings
   CheckMenuItem(hMenu, MENU_CPS3_FASTBOOT, !bFastBoot ? MF_UNCHECKED : MF_CHECKED);
   CheckMenuItem(hMenu, MENU_CPS3_SPEEDHACK, !bSpeedHack ? MF_UNCHECKED : MF_CHECKED);

In 'src/burner/win32/cona.cpp' look for:

Quote
      // Sound
      VAR(nAudSampleRate);

Add this before:

Quote
      // CPS3 Settings
      VAR(bFastBoot);
      VAR(bSpeedHack);

In same  'cona.cpp' look for this:

Quote
   _ftprintf(h, _T("\n// If non-zero, load and save all ram (the state)\n"));
   VAR(bDrvSaveAll);

Add this before:

Quote
   _ftprintf(h, _T("\n// CPS-3 -> Enable FastBoot [0 = disabled, 1 = enabled] \n"));
   VAR(bFastBoot);
   _ftprintf(h, _T("\n// CPS-3 -> Enable SpeedHack [0 = disabled, 1 = enabled]\n"));
   VAR(bSpeedHack);

In 'src/burner/win32/resource.h' add these on top:

Quote
#define MENU_CPS3_FASTBOOT            20205
#define MENU_CPS3_SPEEDHACK            20206

In 'src/burner/win32/app.rc' look for:

Quote
        MENUITEM "Set dipswitches...\tCtrl+F5",            MENU_DIPSW, GRAYED

Add this After:

Quote
   MENUITEM SEPARATOR
   POPUP "CPS-III Settings..."
   BEGIN
      MENUITEM "Enable FastBoot",            MENU_CPS3_FASTBOOT
      MENUITEM "Enable SpeedHacks",            MENU_CPS3_SPEEDHACK
   END

That's All! ^^ , now you can get my updated files from the attachment  :wink:

I hope this help you with your progress, btw this will not affect CHD drivers in any way, when run, they are expecting the CD-ROM normally so if you make the feature you can use my modified files. It doen't matter if you activate the 'fastboot' or 'speedhack' they will work fine without a crash =).

SeeYaa!
 :biggrin:

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #65 on: January 04, 2008, 01:56:09 AM »
I forgot to say how to add the CPS3 Mask so if you plan to add the CPS3 checkbox to your build you must have
this:

in src/burn/burn.h

Quote
#define HARDWARE_PUBLIC_MASK      (0xFFFF0000)
#define HARDWARE_PREFIX_MISC      (0x00000000)
#define HARDWARE_PREFIX_CAPCOM      (0x01000000)
#define HARDWARE_PREFIX_SEGA      (0x02000000)
#define HARDWARE_PREFIX_KONAMI      (0x03000000)
#define HARDWARE_PREFIX_TOAPLAN      (0x04000000)
#define HARDWARE_PREFIX_SNK         (0x05000000)
#define HARDWARE_PREFIX_CAVE      (0x06000000)
#define HARDWARE_PREFIX_CPS2      (0x07000000)
#define HARDWARE_PREFIX_IGS_PGM      (0x08000000)
#define HARDWARE_PREFIX_CPS3      (0x09000000)

and at the bottom:

Quote
#define HARDWARE_IGS_PGM      (HARDWARE_PREFIX_IGS_PGM)
#define HARDWARE_IGS_USE_ARM_CPU   (0x0001)

#define HARDWARE_CAPCOM_CPS3   (HARDWARE_PREFIX_CPS3)

in src/burner/win32/resource.h you must have this added:

Quote
#define IDC_CHECKCPS3               20198

In src/burner/win32/sel.cpp you must have this:

Quote
#define MASKCPS      (1 << (HARDWARE_PREFIX_CAPCOM   >> 24))
#define MASKCPS2   (1 << (HARDWARE_PREFIX_CPS2      >> 24))
#define MASKCPS3   (1 << (HARDWARE_PREFIX_CPS3      >> 24))
#define MASKNEOGEO   (1 << (HARDWARE_PREFIX_SNK      >> 24))
#define MASKSEGA   (1 << (HARDWARE_PREFIX_SEGA      >> 24))
#define MASKTOAPLAN (1 << (HARDWARE_PREFIX_TOAPLAN   >> 24))
#define MASKCAVE   (1 << (HARDWARE_PREFIX_CAVE      >> 24))
#define MASKMISC   (1 << (HARDWARE_PREFIX_MISC      >> 24))
#define MASKPGM      (1 << (HARDWARE_PREFIX_IGS_PGM   >> 24))
#define MASKALL      (MASKCPS | MASKCPS2 | MASKCPS3 | MASKNEOGEO | MASKSEGA | MASKTOAPLAN | MASKCAVE | MASKPGM | MASKMISC)

In the same file you must have this part too:

Quote
   CheckDlgButton(hSelDlg, IDC_CHECKCPS1, nLoadMenuShowX & MASKCPS ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKCPS2, nLoadMenuShowX & MASKCPS2 ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKCPS3, nLoadMenuShowX & MASKCPS3 ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKNEOGEO, nLoadMenuShowX & MASKNEOGEO ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKSEGA, nLoadMenuShowX & MASKSEGA ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKTOAPLAN, nLoadMenuShowX & MASKTOAPLAN ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKCAVE, nLoadMenuShowX & MASKCAVE ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKMISC, nLoadMenuShowX & MASKMISC ? BST_UNCHECKED : BST_CHECKED);
   CheckDlgButton(hSelDlg, IDC_CHECKPGM, nLoadMenuShowX & MASKPGM ? BST_UNCHECKED : BST_CHECKED);

This too:

Quote
            case IDC_CHECKCPS1:
               nLoadMenuShowX ^= MASKCPS;
               RebuildEverything();
               break;
            case IDC_CHECKCPS2:
               nLoadMenuShowX ^= MASKCPS2;
               RebuildEverything();
               break;
            case IDC_CHECKCPS3:
               nLoadMenuShowX ^= MASKCPS3;
               RebuildEverything();
               break;


Now in src/burner/win32/app.rc search for this:

Quote
IDD_SELNEW DIALOGEX
...

That dialog must be updated with a new Checkbox control + resize the dialog dimensions too, you may want to copy one of the current Checkboxes and rename it to "IDC_CHECKCPS3", for example:

Quote
CONTROL         "CPS3",IDC_CHECKCPS3,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,9,255,90,8,WS_EX_TRANSPARENT

The numbers in red are the coord's of the checkbox control and you must edit them especially for your dialog.

I hope that helps some to get the checkbox.

NOTE!: You can save all this if you dont want a checkbox and replace all "HARDWARE_CAPCOM_CPS3" located in 'd_cps3.cpp' with "HARDWARE_MISC_MISC" and they will be displayed in the Misc gamelist

SeeYaa!
 :biggrin:

Offline rush1477

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
Re: CPS-III driver preview
« Reply #66 on: January 04, 2008, 04:37:20 AM »
Wow, Cool! CAPtain  :cool:

Thanks for your explanation.
Updated files and 'CPS-III Settings' are so useful stuffs.

Oh, Thank you OopsWare  ;p

Offline nganiere

  • Newbies
  • *
  • Posts: 37
  • Karma: +0/-4
Re: CPS-III driver preview
« Reply #67 on: January 04, 2008, 05:57:46 AM »
complains about not enough memory for the pcb or about the cd-rom on all the drivers.....I think this needs to be fixed


UPDATE:........you need to add the fastboot code to get this to work posted above I am guessing because I just tested FBA Enhanced by CaptainCPS-X and the drivers didn't work until I enabled it.....just a thought everyone...



*edit 1*
Wanna also report that some of the dips are wrong....NO CD dips are character check version regions......and some of the default dips are wrong....asia default dumps are jap on some of the games....otherwise great job and keep up the good work guys....

*edit 2*
trying to add the CPS-3 checkbox, but the checkboxes are off.......run into one another, filters window needs to be resized....whish I could figure that out...oh well, maybe later


USE THE EDIT BUTTON AND DO NOT DOUBLE POST. -IQ
« Last Edit: January 04, 2008, 06:06:00 AM by nganiere »

Offline Aquashark

  • Newbies
  • *
  • Posts: 48
  • Karma: +0/-0
Re: CPS-III driver preview
« Reply #68 on: January 04, 2008, 06:44:40 AM »
hi! i was lurking this forum until i couldn't resist and registered to thank you, CaptainCPS-X & OopsWare, for your awesome efforts.

i know this is a WIP and i'm not complaining
just wanted to report that sound seems to have low quality (even though samplerate is set to 44100Hz)
and also the Service function acts like P1 Coin

Offline OopsWare

  • Expert
  • *****
  • Posts: 38
  • Karma: +31/-0
Re: CPS-III driver preview
« Reply #69 on: January 04, 2008, 10:01:32 AM »
small fix :

seems entries in the sprite table can be 0x0fff , but 0x01ff is enough .
it will fix graphics somewhere such as '3rd' or 'two hand' in sf3's intro .

int length = (RamSpr[i+0]&0x01ff0000)>>14; // how many entries in the sprite table

this problem exists in mame too : src\mame\drivers\cps3.c [line 1099]

static VIDEO_UPDATE(cps3)
  ...
  int length = (cps3_spriteram[i+0]&0x01ff0000)>>16; // how many entries in the sprite table
  ...


Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #70 on: January 04, 2008, 12:26:11 PM »
small fix :

seems entries in the sprite table can be 0x0fff , but 0x01ff is enough .
it will fix graphics somewhere such as '3rd' or 'two hand' in sf3's intro .

int length = (RamSpr[i+0]&0x01ff0000)>>14; // how many entries in the sprite table

this problem exists in mame too : src\mame\drivers\cps3.c [line 1099]

static VIDEO_UPDATE(cps3)
  ...
  int length = (cps3_spriteram[i+0]&0x01ff0000)>>16; // how many entries in the sprite table
  ...



Nice stuff OopsWare! gonna try your fix asap  :wink:  :biggrin:

SeeYaa!
 :biggrin:

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #71 on: January 04, 2008, 12:57:25 PM »
Yeah seems to be working fine in SFIII3N ^^, (ThanX for the fix OopsWare!)

SeeYaa!
 :biggrin:

Offline nganiere

  • Newbies
  • *
  • Posts: 37
  • Karma: +0/-4
Re: CPS-III driver preview
« Reply #72 on: January 05, 2008, 03:34:14 AM »
I'm having problems adding the cps-3 check box.....as you can see from the pic, I am having problems with the sel.cpp.....the misc box is not within the lines of the filter box, and the use only Latin Text box is messed up.....can someone please fix it for me and just post the fix code....thanks in advance...

UPDATE: FIXED THE LATIN TEXT BUG, UPLOADED NEW SEL.CPP.......NEED THE MISC BUG FIXED IF ANYONE CAN HELP
« Last Edit: January 05, 2008, 03:46:38 AM by nganiere »

Offline CaptainCPS

  • FBNeo Dev
  • ******
  • Posts: 1513
  • Karma: +127/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: CPS-III driver preview
« Reply #73 on: January 05, 2008, 05:24:03 AM »
I'm having problems adding the cps-3 check box.....as you can see from the pic, I am having problems with the sel.cpp.....the misc box is not within the lines of the filter box, and the use only Latin Text box is messed up.....can someone please fix it for me and just post the fix code....thanks in advance...

UPDATE: FIXED THE LATIN TEXT BUG, UPLOADED NEW SEL.CPP.......NEED THE MISC BUG FIXED IF ANYONE CAN HELP

Man......... I ..... will...... release..... my...... source....code..... pretty ...... soon.....

Help yourself to calm down man, when I post the source it should be pretty easy to add what you want, but for now please be patient. I warned you one time and consider this a second warning Nganiere , you wont even see a 3rd warning about this so stop asking to add the stuff you want all time. This is not a restaurant.

Offline nganiere

  • Newbies
  • *
  • Posts: 37
  • Karma: +0/-4
Re: CPS-III driver preview
« Reply #74 on: January 05, 2008, 06:41:23 AM »
Man......... I ..... will...... release..... my...... source....code..... pretty ...... soon.....

Help yourself to calm down man, when I post the source it should be pretty easy to add what you want, but for now please be patient. I warned you one time and consider this a second warning Nganiere , you wont even see a 3rd warning about this so stop asking to add the stuff you want all time. This is not a restaurant.


Ok, geez, I don't think my sel.cpp or whatever is wrong with my drivers is going to be the same.......it was added fine except the misc box is out of range of the filters box by a little bit, but it works....I don't mean to be a pain.  Just wanted someone to help me out to fix it.......noticed one person did download it, so maybe someone will give me some assistance......thanks in advance if that is the case.....and sorry about the post if you don't like them....