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

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
of craziness and trashed function pointers...
Spent from 2:30pm to 5:10pm today trying to figure out why my level 5 savestate of Star Fighter (v1)(SunA), was crashing - but not only crashing: it was executing functions in other parts of FBA totally unrelated to the game -- and crashing there. Not only that(++), it was crashing 20 seconds after the state loaded and the game continued as normal during those 20 seconds... 
Well, it turns out the pointers for the port handler functions in the ay8910 were getting trashed, and they play the pcm samples for the game - so when a certain sound triggered 20 seconds into the game after the state loaded, blammo!  Due to the intricacies of this event, it took nearly 3 hours to track down.  Near the end, there was almost more debug code in the SunA driver than there was code to emulate the game  :eek:

It might seem a bit daunting, but I enjoy these things  ;p  All for a better FBA!

best regards,
- dink
« Last Edit: January 17, 2015, 07:46:10 PM by dink »

Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Well done dink tracking down the bug sounded like a pesky one for sure

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
thanks gamez fan, it sure was :)

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
Another new addition to FBA - Here's a newly discovered game which is based on the Snow Bros. code: Come Back Toto...


Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Nice one dink another new game for FBA!!
« Last Edit: January 18, 2015, 10:11:19 PM by gamez fan »

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
The other day I came across a game called Garyo Retsuden, a DataEast Dec8 game...
This is the kinda game I immediately fell in love with, but unfortunately there were some issues with the FBA emulation of it - such as: sprite flickering, FBA crashing on exit after the game(sometimes, not all), savestates worked but sometimes caused severe corruption (turned out to be a banking issue).  The good news: all the problems are now cleared up :)
Even better: after testing some other games in the driver, such as Shackled, The Real Ghostbusters, The Last Mission - I found even more bugs - and squashed them.  These older games need some love, too :)

best regards,
- dink

Offline WILOWAR

  • Member
  • ***
  • Posts: 150
  • Karma: +11/-19
Hi Dink. Can you fix Line of Fire Sega arcade game, it's has several problems with emulation:  broken sound and slowndows.

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
WILOWAR: I improved the sounds a bit: the machine gun was only coming from the left side.  can you tell me where the slowdowns are?  I played it a bit, and it seems OK here.  Also, make sure your soundrate is 44100hz (recommended) in audio -> plugin options, and try increasing your audio buffers to 8.

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
Today I played Karnov to the end & did a few driver improvements/tweaks to improve its' emulation a bit.  One of the biggest problems was sounds getting stuck, but in 2 completely different ways..  In level 3 there is this weird worm-like thing (made of circles) and after it was killed, the irritating noise it made would keep going for the entire rest of the game, a couple other sounds would get stuck on like that, too - boosting the interleave to tighten up the sync between the 2 cpus solved that one.  Another issue: if a savestate was made while getting a powerup or dieing (or other PSG sounds/sfx being made), sometimes the ym2203 would get in a weird state and that sound would get stuck on forever.  Luckily, the ym2203 is only being used for its PSG, and resetting it on savestate load not only solves the problem, but doesn't cause any audible side effects.  Its an ugly way of doing things, but it works (and I tried everything else I could think of)....  Theres a couple other little improvements that aren't so noticable, and probably aren't worth mentioning, too.  :)

Been meaning to do this one for a while now, glad to have it done!

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
Kinda a team effort between gamezfan and me, Birdie Try is now part of FBA!  Its a nice golf game which was only released in Japan on Dataeast's dec0 hardware.
« Last Edit: January 26, 2015, 10:54:30 PM by iq_132 »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3724
  • Karma: +411/-0
  • Definitely not Dink!
    • NeoSource
Nice work guys! :D Another missing game added.


Offline csmart

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +1/-0
Awesome job guys.

Offline dink

  • Administrator
  • *****
  • Posts: 5023
  • Karma: +449/-1
  • pie? I nearly bought one!
woohoo!! Solved the problem in VaporTrail where the music tempo goes up/fluctuates when firing!!  The game is now perfect in FBA (and possibly MAME too, soon) :)

Offline csmart

  • Jr. Member
  • **
  • Posts: 58
  • Karma: +1/-0
Dink you are a all-star

Offline Haze

  • MAME Devs
  • *****
  • Posts: 184
  • Karma: +47/-0
there are a LOT of bugs that can be fixed quite easily in MAME by fudging the clocks.

such chances simply won't be accepted vs. actual measured values unless you can prove them to be correct tho, the end result isn't proof in this case, other things could be slowing the CPU down (waitstates on RAM/ROM, ready lines on sound chips etc.)

that said I'm not 100% sure the clocks are properly verified in vaportra.c

crude buster, which uses the same sound system (and apparnetly suffers from the same problem in places) has the clock 'verified' at 6Mhz (derived from the main crystal, not the 32.2 one, which is apparently only used for the actual sound chips)  that's still some way off what you're suggesting tho, so you'd really need to prove there was an internal divider we're missing via CPU documentation or similar.