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

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1515 on: December 24, 2018, 11:52:13 PM »
fba news / aka a problem with psikyosh games (gunbird2, etc) lead to all of this nice stuff below:

couple days ago we got a report about sound being too fast in gunbird2, after fixing the ymf278b sound core to calculate the correct samplerate based on the clock frequency, it totally broke fuukifg3 games.  It turns out we were using a hack in the fuukifg3 games to get the right timing due to lack of a ymf262 core, so the ymf278b was erroneously generating the hacky timing afterwards...  After adding another hack to make the hacky hack work again, I thought that it might be a good idea to just port a ymf262 core & create an interface for it.  This way I could get rid of both hacks, add missing sounds to fuukifg3 games, and even get the soundless tecmosys driver working.  Here's a pseudo-changelog:

x ported and hooked up a ymf262 core to fuukifg3 - fixing some missing sounds in Asura Blade and Asura Buster
x hooked up ymf262 core to tecmosys, now that the soundcpu has an irq source - Deroon and tkdensho have sound. well, unfortunately there are some glitches in the audio.  after some investigation, they are actually coming from the ymz280b chip.

.. after a while ..

x tracked down the problem with the ymz280b - register 1 needs to be able to stop looped samples, but it doesn't.  now tecmosys games have perfect sound! :)

Merry X-mas everyone!
best regards,
- dink

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 412
  • Karma: +17/-1
  • lr-fbalpha developer
Re: dink's FBA Development & Fixes thread
« Reply #1516 on: December 25, 2018, 12:18:58 AM »
Nice work and merry X-mas :)

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1517 on: December 25, 2018, 12:53:31 AM »
Vantier, using the latest debug exe and the last released version (.43), the sound tempo is nearly spot on with the dark seal pcb video (the one with the Japanese guy).  I mean it almost stays in sync if I play it along with the video.  Can you tell me if its a big difference in tempo you get?  Could you make a recording from your side so I can compare against mine?  (have to start somewhere) :)

best regards,
- dink

Offline barbudreadmon

  • Administrator
  • *****
  • Posts: 412
  • Karma: +17/-1
  • lr-fbalpha developer
Re: dink's FBA Development & Fixes thread
« Reply #1518 on: December 25, 2018, 01:21:06 AM »
I just found this issue in dark seal, all pictures are truncated in the intro :


It shouldn't be the case from what i'm seeing there : https://www.youtube.com/watch?v=i2cwWIInp1w

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1519 on: December 26, 2018, 01:12:42 AM »
thanks barbudreadmon!
(fix on git tomorrow morning, its too late for review)

Offline Vantier

  • Newbies
  • *
  • Posts: 5
  • Karma: +0/-0
Re: dink's FBA Development & Fixes thread
« Reply #1520 on: December 26, 2018, 06:54:05 PM »
Hi Dink! sorry for the delay, these holidays are being crazy.
I've prepared you a rar with the differences in tempo betwen the original pcb from our korean friends and my fba. I'm using de last release (.43).
The pcb is at 60 beat per minute, the same for its original sound track. The fba version is at 55. If you are used to the game you'll notice that is something wrong with the rhythm.
Note: For the comparison I used a metronome and I integrated it.

Merry Christmas to all!

https://mega.nz/#!fAlyUIib!vqN45uc14N7_3IroluUYZK7TBfQM0LnBQvpahIoM-ws

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1521 on: December 29, 2018, 10:49:24 PM »
Vantier, thanks for the recordings - I got the tempo pretty close to the pcb recording.  Please try this test-exe and let me know what you think:
https://www.sendspace.com/file/fp7jnm

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1522 on: December 29, 2018, 11:08:34 PM »
And now, for a bit of sad news:
compy-p4 never gave up the good fight.  [insert some nice things to say about compy-p4 here] but, as all good things must come to an end, life support was removed thursday @ 7:34pm EST.  no more shall he endure the pain of full rebuilds (*ahem*.. Treblewinner...)

long live compy-p4!

Offline Vantier

  • Newbies
  • *
  • Posts: 5
  • Karma: +0/-0
Re: dink's FBA Development & Fixes thread
« Reply #1523 on: December 30, 2018, 10:25:59 AM »
First of all, thanks for the efforts on this subjet, Dink
I've just test the debug exe you uploaded and it's still slower than the original :/
https://www.youtube.com/watch?v=0WzahQBA1RE&t=143s
Check this from 4:11. Compare that part where beats are more recognizable with the one you built.
Very Thank you, pal. 

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1524 on: December 30, 2018, 10:46:38 AM »
First of all, thanks for the efforts on this subjet, Dink
I've just test the debug exe you uploaded and it's still slower than the original :/
https://www.youtube.com/watch?v=0WzahQBA1RE&t=143s
Check this from 4:11. Compare that part where beats are more recognizable with the one you built.
Very Thank you, pal.

Can you please tell me how to get something to count the bpm, because I personally can't perceive the tempo differences.
also can you try setting your audio rate(hz) to 48000 in fbalpha, and see if that helps at all?

best regards,
- dink

Offline Vantier

  • Newbies
  • *
  • Posts: 5
  • Karma: +0/-0
Re: dink's FBA Development & Fixes thread
« Reply #1525 on: December 30, 2018, 01:19:09 PM »
Can you please tell me how to get something to count the bpm, because I personally can't perceive the tempo differences.
also can you try setting your audio rate(hz) to 48000 in fbalpha, and see if that helps at all?

best regards,
- dink
Yes, that help. Now with 48000hz in fba settings sound exactly the same as the pcb.
Thanks a lot. Keep up the good work!

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1526 on: December 30, 2018, 06:40:19 PM »
Yes, that help. Now with 48000hz in fba settings sound exactly the same as the pcb.
Thanks a lot. Keep up the good work!

Can you please tell me the rate you had selected before? :)

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1527 on: December 31, 2018, 12:50:42 AM »
Vantier,
Here's a new test exe, now it should have the same tempo at any selected soundrate.
https://www.sendspace.com/file/qw82wm
now compiled with gcc 8.2.0 :)
& includes the eagleshot gfx fix c/o Haze (thanks!)

best regards,
- dink

Offline Vantier

  • Newbies
  • *
  • Posts: 5
  • Karma: +0/-0
Re: dink's FBA Development & Fixes thread
« Reply #1528 on: December 31, 2018, 05:10:17 AM »
Hi Dink, Yes, now it's perfect at any rates. Very thank you!

I didn't test to change the sample rates cause it's normally sound quality related and not speed.
About how can you count the bpm without complications it's very simple. You can use this:
http://www.beatsperminuteonline.com/
If you have a little sense of rhythm you can tap with space key at tempo during a minute or less and see what's showing. (start tapping when you're sure of the rythym).
For me, using the first stage song, with your last fixes is 58bpm versus 60/61 with the korean video.
I don't want to be a pain in the ass, so for me it's ok. If you want perfection, increase just a little bit the sound speed.

BTW Very thank you, man and happy new year!!   

Offline dink

  • Administrator
  • *****
  • Posts: 3038
  • Karma: +259/-0
  • feed the horse yumyum
Re: dink's FBA Development & Fixes thread
« Reply #1529 on: December 31, 2018, 09:17:17 AM »
Vantier, thanks for the info :)
I actually didn't increase the music speed at all, the problem was the ym2151 sound chip - it was using an old/buggy method to sync to the sound buffers for the timers - which is why the rate change caused the difference in tempo.   A couple other DataEast games had this issue (Caveman Ninja, Rohga IIRC).  There really is no easy/elegant way to change the speed of the music without affecting other things.  Basically the soundcpu sends a command to the ym2151 sound chip to fire the timers at a specific rate, and these timers generate irq's (for the soundcpu) at that rate which controls the tempo of the music (and other things).  What I'm trying to say is, that's as good as it can get for now. 

best regards,
- dink