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

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
dink's FBN 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: July 10, 2019, 08:07:55 AM by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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: 3732
  • Karma: +411/-0
  • Definitely not Dink!
    • 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 Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • 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: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Handybo: thanks :)

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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 Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
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.
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 dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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 Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
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. :)
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 dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
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 »