Author Topic: dink's FBA Development & Fixes thread  (Read 183909 times)

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
dink's FBA Development & Fixes thread
« on: March 28, 2014, 03:53:52 pm »
Hi guys,
Here's my first contribution to this great project.  In the attachment you'll find d_battleg.cpp (src/burn/drv/toaplan) fixed to prevent a crash issue with savestate loads.
p.s. can I get access to the FB Alpha svn? Theres a couple more drivers that I plan on fixing/clearing up issues with, and who knows what else. :)

best regards,
- dink
« Last Edit: September 06, 2015, 11:25:37 pm by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Re: Fix for Battle Garegga crash on savestate load & Scramble/Super Cobra
« Reply #1 on: March 28, 2014, 05:50:18 pm »
Here's another one :)

Problem: In Scramble! and Super Cobra, when something explodes, there is a loud clipping/distortion type noise.
Solution, in src/burn/snd/flt_rc.cpp, check for clipping after it adds the samples.  The attached file contains the fixed flt_rc.cpp.

Code: [Select]
pSoundBuf[x] += n[l/r]Sample;  is now  pSoundBuf[x] = BURN_SND_CLIP(pSoundBuf[x] + n[l/r]Sample);

best regards,
- dink
« Last Edit: March 28, 2014, 05:53:36 pm by dink »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3535
  • Karma: +368/-0
  • Just a lion with a sword
    • NeoSource
Re: Fix for Battle Garegga crash on savestate load & Scramble/Super Cobra
« Reply #2 on: March 28, 2014, 06:43:01 pm »
Excellent work! Keep it up! I'll commit these to the svn tonight.



Offline gamez fan

  • Expert
  • *****
  • Posts: 509
  • Karma: +13/-1
  • Arcade Addict
Re: Fix for Battle Garegga crash on savestate load & Scramble/Super Cobra
« Reply #3 on: March 28, 2014, 07:48:18 pm »
Some good fixes there always nice to see more people work with the FBA SRC

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Re: Fix for Battle Garegga crash on savestate load & Scramble/Super Cobra
« Reply #4 on: March 29, 2014, 02:50:11 am »
Hello FBA fans,
Here is yet another fix - this time, for the game Tengai and possibly other games (S1945) utilizing the Psikyo hardware.

Problem: when loading a savestate, the sounds sometimes get desynched.  The Psikyo driver was only scanning the YM2610 driver, even though the game uses the YMF278B.

Solution: use the updated d_psikyo.cpp (in src/burn/drv/psikyo) in the attachment.
EDIT: fixed a small buglet, make sure you have version 2 of the attachment (tengaisoundsyncfix02.zip)

best regards,
- dink
« Last Edit: March 29, 2014, 03:47:28 am by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Today I'm working again with the psikyo driver, this time the problem is with Samurai Aces.  Either the tile ram or rom is somehow getting clobbered on return from a savestate (save state load).  I spent quite a bit of time with it so far and can't see anything obvious, so later today after a nice break I'm going to dig a little deeper.  If you want to see the problem for yourself, fire up Samurai Aces, start the game and as soon as the playfield appears, save the state, then load it - you'll see a couple of the background tiles are corrupted.  It might not seem too bad at this point, but in the later levels the entire backgrounds are messed up in the same fashion.
...well, thats it for now...

best regards,
- dink
« Last Edit: March 29, 2014, 10:33:46 am by dink »

Offline Handybo

  • Newbies
  • *
  • Posts: 10
  • Karma: +0/-1
Some nice fixes there, dink.

Personally, i think save state support should be scrapped from FBA as it causes more trouble and game breaking bugs than it is worth. Real arcade games don't have saves (except for passwords like in Red Earth) so i don't see why arcade emulators need them.... but thats just my blinkered opinion. :D

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Handybo: thanks :)

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Hi Guys,
Just a little update on what I've been doing today.  I spent almost all day trying to figure out what exactly is causing the tile corruption in Samurai Aces.  I've got to the point where I've tried everything I can think of, and none of them worked.  The only thing I can do now is take a nice long break, and come back to it later....

I won't give up though!  :smilie:

best regards,
- dink

Offline Treble Winner

  • FBA Dev
  • ******
  • Posts: 1802
  • Karma: +104/-0
  • FB Alpha Team
    • http://www.barryharris.me.uk
dink,

Thanks for the fixes.

Can you register on assembla.com and let me know your username by PM or post here. Once I get your username I'll invite you to the SVN.

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Thanks Treble Winner, I sent you a PM.

Now, I'm back to figuring out what the deal is with Samurai Aces....  :S

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
I'm tired, so I'll let the pictures do the talking...  ;)

Before the fix - (after loading a savestate in Samurai Aces):


After the fix:


The fix: (see attachment - also includes the Tengai sound desync fix)

best regards,
- dink

Offline Treble Winner

  • FBA Dev
  • ******
  • Posts: 1802
  • Karma: +104/-0
  • FB Alpha Team
    • http://www.barryharris.me.uk
Thanks Treble Winner, I sent you a PM.

Now, I'm back to figuring out what the deal is with Samurai Aces....  :S

Dink - invitation sent. :)

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Thanks Treble Winner, I'll commit my patches as soon as I get the Irem M62 savestates working better.  I got the sound fixed for Youjyuden after savestate load, but sometimes it will reset to the title screen on savestate load when the state was saved mid-game.  And also if a sample was playing in Kung-fu master while a savestate was saved/loaded, will cause some strange issues, which also uses the m62 hardware.

Thats it for now,
best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 2556
  • Karma: +216/-0
  • summer is here!
Hello friends,
Just an update - some good and some bad news..
First the good news, Implemented savestates in the Irem M72 hardware driver (Dragon breed, R-Type I and II, Mr. Heli, X-Multiply) and they seem to be working just fine. I played X-Multiply to stage 5 and the first 2 stages of R-Type I and Mr. Heli using nearly a hundred of savestate / loadstates while testing, and it seems solid :)

The bad news, Irem M62 hardware driver (Kung Fu Master, Kid Niki, Youjyuden) savestates are still messed up, I had to put working on them aside for now, I spent more time with this driver than all my work on FB Alpha combined and I seem to be getting nowhere :(  Maybe I'll come back to this one somewhere down the line, maybe with some help/suggestions from other dev's?  I thought it might have been a banking problem, so I saved the bank information and restored it on savestate load, as well as all the variables I could find - no go..  What really makes this one interesting, is that after a reset, loading the savestate will work sometimes, and sometimes not, which leads me to thinking that perhaps an irq is getting hung up.

best regards,
- dink
« Last Edit: March 31, 2014, 03:41:39 am by dink »