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

Offline Barry Harris

  • dontbeabarry
  • *
  • Posts: 1785
  • Karma: +0/-65535
  • I'm Barry Harris and I like to f*** people over
Midnight Resistance should be fixed now. :)
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!
Treble Winner,
Thank you! very much - my friend! :)
Today is a good day :)

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Its always good to do some proper playtesting to thoroughly test the driver, right? :biggrin:

Well, it took me half the night, and many tries, but I finally beat Midnight Resistance - and I couldn't have done it without the excellent Tile/layer fix from Treble Winner, and the groovy rotator code I wrote the other day for Heavy Barrel ( & Transplanted to Midnight Resistance)
p.s. my changes will get checked in after I test the 2player mode tomorow with a friend.

best regards,
- dink

« Last Edit: April 13, 2014, 03:45:14 AM by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Today I uncovered an issue in SN76496Scan(), if 1 SN76496 was initted, it wouldn't scan anything, but if 2 were initted, it would only scan the first one.  Nothing too exciting :)

best regards,
- dink

Offline BritneysPAIRS

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +4/-52
dink PM me if you want anything for the control of TNKIII Midnight Res Heavy Barrel Forgotten Worlds Calibar 50 and others ive pached these many ways....so they fire the way you are pointing....or so they fire in the direction of the second joystick when you press it in a direction...a few little quirks but makes them nice to play

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Thanks for the offer, but how I got it now is the way I'd like to keep it.  Games like Midnight Resistance need to be able to shoot backwards while running forward in certain parts.  I also playtested the new code quite a bit and there aren't any quirks :)

best regards,
- dink

Offline BritneysPAIRS

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +4/-52
No worries...yes midnight res is the worst game for point and shoot...but is alot better for ikari warriors...g war...time soldiers...etc...

good work though...just pm if you want the code ill send it to you...

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Hi guys,
Here's what I'm working on today:
*actually started on this the other day, but didn't make any progress*
While playing Willow or Strider (Capcom CPS1 games), after a couple savestate save/load's, the sound - both sfx and music - hangs.  A simple F3 reset then load the state will bring things back to normal, so that (probably most-likely) means that nothing is getting corrupted in the savestate itself.  Right now I'm just scratching my head and taking a break, hopefully something will turn up :)

best regards,
- dink

Offline destronger

  • Newbies
  • *
  • Posts: 43
  • Karma: +7/-3
nice work dink, well done!

 :smilie:
+ T +: Every time you mention Midway games in Final Burn, iq_132 kills a kitten!

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
thanks destronger :)


Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
I don't have a solution yet, but I did find out some more info regarding the sound hang in Strider/Willow (cps1) games that use the ym2151. 
The sound/music will hang if the savestate is saved right after drvYM2151IRQHandler has been called with nStatus=1 or if its loaded before the handler is called with nStatus=0
At this point no more read/select calls (PsndZWrite()) to the YM come in.
A reset with F3 then load the savestate will fix the sound/music.

An easy way to trigger the bug without playing the game and casually save/loading the states - after inserting a coin and hitting start, press save / loadstate repeatedly (every second or so) during the cut-scene glider-fly-in on Strider.
If it doesn't bug after 2 tries, close/reload fba and try again.

thats all I have for now,
best regards,
- dink
« Last Edit: April 16, 2014, 03:51:57 AM by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
Something else thats on the todo list is to figure out why Double Dragon I and II don't work 2-player over kaillera - the remote fba can't control the player.  Though the good news is Demon Front works fine this way, so when I get some time later today I'll try to figure out what is going on with the inputs differently in DD1/2 compared to Demon Front.

EDIT: Figured it out - if the controlls for the P1 block have P2 controls in them, for example:
P1 Coin
P1 Start
P2 Coin
P2 Start
P1 Up
P1 Down
It thinks that the P1 block of controlls is just the first 2, because as soon as it sees the P2 controls, it thinks the P1 block of controls has ended.   Thats easy enough to fix :)

Unfortunately theres a bigger problem in Double Dragon (Japan) (ddragon.zip).  Upon winning the game, its supposed to play a cut scene where they free the girl, the game just locks up and the graphics get corrupted pretty badly at this point.  :(
Any ideas? :)

Best regards,
- dink
« Last Edit: April 16, 2014, 06:28:17 PM by dink »

Offline Arcadez

  • Expert
  • *****
  • Posts: 558
  • Karma: +15/-0
  • Arcade Addict
Unfortunately theres a bigger problem in Double Dragon (Japan) (ddragon.zip).  Upon winning the game, its supposed to play a cut scene where they free the girl, the game just locks up and the graphics get corrupted pretty badly at this point.  :(
Any ideas? :)

Best regards,
- dink

The issue you mention was fixed in MAME maybe the same fix is required in FBA??

Quote
- 0.103u2: Bryan McPhail fixed Double Dragon crashed sometimes at the very end of the game.

- 8th January 2006: Bryan McPhail - Double Dragon Has a crash Which Occurs sometimes at the very end of the game (right before the final animation sequence). It Occurs Because of a jump look up table: BAD3: LDY # $ BADD; BAD7: JSR [A, Y]. At the point of the crash A is 0x3E Which causes a jump to 0x3401 (background tile ram) Which obviously does Contain proper code and causes a crash. The jump table Has 32 entries, and only the last contains an invalid jump vector. A is Set to 0x3E as a result of code at 0x625f - it reads from the shared spriteram (0x2049 in main CPU memory space), copies the value to 0x523 (main ram) where it is later fetched and shifted to make 0x3E. So. It's not clear where the error is - the 0x1f value is actually written to RAM shared by the main CPU - Perhaps the MCU Should modify it before the main CPU reads it back? Perhaps 0x1f Should never be written at all? If you want to trace this further Top please submit a proper fix! In The Meantime I have patched the error by making sure the invalid jump is never taken - this fixes the crash (see ddragon_spriteram_r).
« Last Edit: April 16, 2014, 07:08:23 PM by gamez fan »

Offline dink

  • Administrator
  • *****
  • Posts: 5151
  • Karma: +461/-1
  • pie? I nearly bought one!
gamez fan, thank you very much for the information!  I will add this fix to the FBA code :)

EDIT: it turns out that FBA already has this crash fix, so tonight I played the game through to the end by myself, and the ending showed perfectly.  So what gives?  Does the crash fix only fix 1player mode? Luckily I used savestates throughout the last level, so I went back and added the second player, but the computer figured out that the 2nd player was idle, and the ending chose a different path.  Ugg..
I feel like I'm at yet another dead-end.  All sorts of debugging & testing yet nothing positive has been gained, kinda makes me feel bad. 

Heres my current FBA Failure roster:
1: Neogeo (any game) crashes after saving/loading several savestates - no fixFIXED!
2: CPS1 (Strider, Willow, etc) games lose sound after saving/loading several savestates - no fix, but workaround - hit reset then load savestateFIXED
3: OutZone (Toaplan) - if you save a state, then close and reload FBA, load the game then the state and move your character, there will be a stuck sprite of your character on the screen OR sometimes just playing the game with casual save/loadstates will cause a stuck sprite on the screen - no fix FIXED!!!
4: Ash n joe / Success Joe crash on SS - no fixFIXED (iq_132)
5: Maze of Flott - crash on SS - no fixFIXED
6: GunNail - all of the sounds are kind of messed up, tried to fix this by comparing to mame sources (which works fine), no luckFIXED!!!!!!!!!
7: Clicking the hardware check to clear everything below it - forgot to check it in, Treble Winner got it though.
8: Double Dragon - possible crash at the end of a 2player game - looking into it..no issue, played several more 2p games w/o a problem.
 :eek:  :p
Perhaps a little break is in order...

best regards,
- dink
« Last Edit: September 02, 2014, 02:04:03 AM by dink »

Offline destronger

  • Newbies
  • *
  • Posts: 43
  • Karma: +7/-3
when in doubt, take a nap.  :biggrin:
+ T +: Every time you mention Midway games in Final Burn, iq_132 kills a kitten!