Author Topic: dink's FBN Development & Fixes thread  (Read 1320602 times)

Offline BritneysPAIRS

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +4/-52
Re: dink's FBA Development & Fixes thread
« Reply #825 on: February 24, 2016, 11:14:30 PM »
static READ16_HANDLER( forgottn_dial_0_r )
{
   const int dial_8[8]   = { 0,256,512,768,1024,1280,1536,1792 };
   int value3 = readinputport(7);

   if ((value3&0xf) == 15)
      directional = 0;
   if ((value3&0xf) == 14)
      directional = 0;
   if ((value3&0xf) == 10)
      directional = 1;
   if ((value3&0xf) == 11)
      directional = 2;
   if ((value3&0xf) == 9)
      directional = 3;
   if ((value3&0xf) == 13)
      directional = 4;
   if ((value3&0xf) == 5)
      directional = 5;
   if ((value3&0xf) == 7)
      directional = 6;
   if ((value3&0xf) == 6)
      directional = 7;

   ShootSound = ShootSound + 1;
   if (ShootSound >= 120)
   {
      ShootSound = 120;
      directional = 0;
   }

//   usrintf_showmessage("%i",ShootSound);

   return ((dial_8[directional] - dial[0]) >> (8*offset)) & 0xff;
}

static WRITE16_HANDLER( cps1_sound_command_w )
{

   if (ACCESSING_LSB)
   {
      soundlatch_w(0,data & 0xff);
      if (data == 47)
      {
         ShootSound = 0;
      }
      if ( data == 49)
      {
         ShootSound = 0;
      }
      //usrintf_showmessage("%i",data);
   }
}

Forgotten worlds example
« Last Edit: February 24, 2016, 11:16:00 PM by BritneysPAIRS »

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Re: dink's FBA Development & Fixes thread
« Reply #826 on: February 24, 2016, 11:19:22 PM »
thanks, for the tips.
I came up with a great idea - what if we monitor the ram where it holds the position of the gun?  this way it will _never_ get out of synch.  now, to find the memory locations of the gun positions for p1/2 on these games :)...

Offline BritneysPAIRS

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +4/-52
Re: dink's FBA Development & Fixes thread
« Reply #827 on: February 24, 2016, 11:33:55 PM »
yeah I couldn't find that :) that would be best cause the sound one fails on a couple of games mainly heavy barrel the others seem to work well

each of the drivers work slightly diff some don't have a zero position the driver seems to position the gun then look for turning from the point. Some seem to look at the rotation value of the stick and use that. Some are rotary some are spinners I guess.

The SNK driver I did one that always points up...when you press the right stick in a direction it point the gun that way and shoots like total carnage or robotron that worked fine as well (had to add an autofire option for when you are holding the stick down)
« Last Edit: February 24, 2016, 11:42:14 PM by BritneysPAIRS »

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Re: dink's FBA Development & Fixes thread
« Reply #828 on: February 25, 2016, 05:29:32 PM »
Mission accomplished:  The new button+joy to change the rotation direction feature is solid and working for Ikari Warriors, Victory Road, TNK3 & Guerilla War.  :D  It will never go out of sync, either...
...Coming to an FBAlpha near you :)

Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Re: dink's FBA Development & Fixes thread
« Reply #829 on: February 25, 2016, 05:50:34 PM »
@dink Well done fella told ya you'd have it done by the days end :)

Offline BritneysPAIRS

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +4/-52
Re: dink's FBA Development & Fixes thread
« Reply #830 on: February 25, 2016, 08:08:13 PM »
 :cool:

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1576
  • Karma: +37/-0
  • All games deserve to be emulated, more or less! :P
Re: dink's FBA Development & Fixes thread
« Reply #831 on: February 26, 2016, 01:06:32 AM »
Mission accomplished:  The new button+joy to change the rotation direction feature is solid and working for Ikari Warriors, Victory Road, TNK3 & Guerilla War.  :D  It will never go out of sync, either...
...Coming to an FBAlpha near you :)

Very good work! As always by your standards! ;)

PS: maybe a similar solution could be good for Capcom Forgotten Worlds too...
« Last Edit: February 26, 2016, 03:17:17 AM by Gab75 »

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Re: dink's FBA Development & Fixes thread
« Reply #832 on: February 26, 2016, 08:47:57 AM »
Gab75. Its possible for Forgotten Worlds to play perfectly in FBA without any changes to the code.  I made some nice settings for it a few months ago, but lost them and can't remember how I did it.  crap...  if I can remember how I did it, I will post the info..
On a brighter note, I plan to add the new code (from the snk driver) to Midnight Resistance & Heavy Barrel.  Since the new code is based on the rotation code from Midnight Resistance & Heavy Barrel, it will fit right in, its just a matter of finding where the game stores the p1/p2 rotation bytes.

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Re: dink's FBA Development & Fixes thread
« Reply #833 on: February 28, 2016, 12:01:13 AM »
The new rotational controls have been added to Heavy Barrel and Midnight Resistance.  never before have these games played this good in emulation.*  I'm very happy.  :biggrin:

* unless, of course, you own a rotary joystick!

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1576
  • Karma: +37/-0
  • All games deserve to be emulated, more or less! :P
Re: dink's FBA Development & Fixes thread
« Reply #834 on: February 28, 2016, 01:02:14 AM »
* unless, of course, you own a rotary joystick!

My "intuition" says that only a "negligible amount" of users have a rotary joystick! :P Great work! :)

Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Re: dink's FBA Development & Fixes thread
« Reply #835 on: February 28, 2016, 07:50:47 PM »
All i can say is this new Rotary code is fantastico  :cool:

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Re: dink's FBA Development & Fixes thread
« Reply #836 on: March 04, 2016, 07:10:33 PM »
Gradius 3 is fixed :)

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Re: dink's FBA Development & Fixes thread
« Reply #837 on: March 08, 2016, 11:22:25 PM »
Gradius 3 is running top-notch.

Tonight our cheat algo. got a massive bug-fix, it wasn't properly disabling certain cheats, and doing stupid things with memory.
I almost shot my pc over this one.  grrrr! :mad:   (I'm sorry - I love you, compy-p4! *hug*)   

couple other under-the-hood type bugfixes not worth mentioning.
« Last Edit: March 08, 2016, 11:23:28 PM by dink »

Offline Gab75

  • FBNeo Contributor
  • *****
  • Posts: 1576
  • Karma: +37/-0
  • All games deserve to be emulated, more or less! :P
Re: dink's FBA Development & Fixes thread
« Reply #838 on: March 09, 2016, 01:22:16 AM »
I almost shot my pc over this one.  grrrr! :mad:   (I'm sorry - I love you, compy-p4! *hug*)   

Please, don't "hurt" your poor pc... it has important FBA datas inside! :P

Joking aside, we really appreciate your "hard work" ! :)

Offline iq_132

  • Administrator
  • *****
  • Posts: 3732
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Re: dink's FBA Development & Fixes thread
« Reply #839 on: March 10, 2016, 03:49:39 PM »
I almost shot my pc over this one.  grrrr! :mad:   (I'm sorry - I love you, compy-p4! *hug*)   
Next time I upgrade my pc you're getting my "gently used" old mobo, ram, etc.
Sorry about your luck and your power bill.