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

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
Something for today,
Got War of Aero - Project MEIOU's background music in proper working order.

Trying to get the sound in Air Duel working, though - this one is a bit tricky, but I think I'm on to something :)

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
I'm afraid I gotsome bad news, I've been debugging-about all day with Air Duel (irem d_m72) and I can't get the music working.  Oh well...

best regards,
- dink

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
..And now for some good news this time!
Today I fixed the corrupted & out-of-place sounds in Gundhara and EightForces & improved the music a bit (it was only coming out the left side).

EDIT: Fixed the samples in Blandia as well :)

For FBA Quality Assurance - I Played MadShark to the end, to make sure the fixes I made to it the other day didn't affect anything or cause any new bugs - things are looking & sounding good!  :biggrin:

EDIT: FBA Quality Assurance part 2: Played Gundhara a few times, eventually beat it (the last and 2nd to last boss is a b*tch), everything checks out 100% :)
This game is awesome - definitely one for fans of Heavy Barrel, Midnight Resistance, Contra.

best regards,
- dink
« Last Edit: May 15, 2014, 04:38:51 AM by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
(For those that use savestates - read on)
I started working on a linear savestate mechanism, which is great for gaming from a gamepad w/o the need to reach for the keyboard to select different slots while in-game.

Basically, it works like this: every time you save a state, it will save a backup of the last 10 savestates - instead of just overwriting the last one. A new "undo" function will go back through the backups, in a reverse of the order you saved them.  It also works nicely with the current slot system - each slot will have 10 backups each.  I've used this method a lot with BlueMSX (MSX & Colecovision emulator) and VICE (C64 emulator), and really miss it in FB Alpha.  Its really handy for practicing ultra-fast-paced/frenetic games and shoot-em-ups alike.

Doesn't seem interesting?  Well, how about... Have you ever saved a state at the wrong time and overwrote your excellent gaming progress with the title screen? This will be the solution for this as well  ;p

best regards,
- dink

Offline iq_132

  • Administrator
  • *****
  • Posts: 3626
  • Karma: +385/-0
  • Bare Knuckle!
    • NeoSource
(For those that use savestates - read on)
I started working on a linear savestate mechanism, which is great for gaming from a gamepad w/o the need to reach for the keyboard to select different slots while in-game.

Basically, it works like this: every time you save a state, it will save a backup of the last 10 savestates - instead of just overwriting the last one. A new "undo" function will go back through the backups, in a reverse of the order you saved them.  It also works nicely with the current slot system - each slot will have 10 backups each.  I've used this method a lot with BlueMSX (MSX & Colecovision emulator) and VICE (C64 emulator), and really miss it in FB Alpha.  Its really handy for practicing ultra-fast-paced/frenetic games and shoot-em-ups alike.

Doesn't seem interesting?  Well, how about... Have you ever saved a state at the wrong time and overwrote your excellent gaming progress with the title screen? This will be the solution for this as well  ;p

best regards,
- dink
Sounds pretty interesting! Do keep in mind that FBA compresses save states.  This can be pretty cpu-intensive for a pile of save states. It takes FOREVER for games with large areas of ram. I've been wanting to re-write the save state system for a while, ripping out the compression and getting these to be endian and 32->64 bit safe. As of right now, states from a 32-bit build of fba won't work on a 64-bit usually. It's pretty nasty.


kev

  • Guest
The rom loading could do with a rewrite whilst your at it :p

In all seriousness libzip gives pretty good performance in another project I work on but not sure how useful it will be on a save state front.

Offline iq_132

  • Administrator
  • *****
  • Posts: 3626
  • Karma: +385/-0
  • Bare Knuckle!
    • NeoSource
The rom loading could do with a rewrite whilst your at it :p
What are you thinking? This may be something I invest some time into.

Quote
In all seriousness libzip gives pretty good performance in another project I work on but not sure how useful it will be on a save state front.
I honestly don't see the point of compressing save states at all. Hard drive space is nearly limitless, the MAME set eats your hard drives with impunity.


Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
Sounds pretty interesting! Do keep in mind that FBA compresses save states.  This can be pretty cpu-intensive for a pile of save states. It takes FOREVER for games with large areas of ram. I've been wanting to re-write the save state system for a while, ripping out the compression and getting these to be endian and 32->64 bit safe. As of right now, states from a 32-bit build of fba won't work on a 64-bit usually. It's pretty nasty.

I realize the compression is pretty slow with games that use large amounts of ram, but this feature will take no longer than usual - all it does is: instead of overwriting the last savestate, it renames it to a backup file, up to 10 of them, the 11th always gets deleted.  To break it down visually:
hit savestate once, you get:
game slot 1.fs
hit savestate button again
game slot 1.fs
game slot 1.fs.backup0 (from the first time you hit savestate
hit it again:
game slot 1.fs
game slot 1.fs.backup0
game slot 1.fs.backup1 (from the first time you hit savestate)

now, if you hit the new "savestate undo" button, this will happen:
game slot 1.fs.backup0 -> game slot 1.fs
game slot 1.fs.backup1 -> game slot 1.fs.backup0
hit it again:
game slot 1.fs.backup0 -> game slot 1.fs

Nothing else needs to be changed re: savestates (IMO) :)

One thing I might add: mame's crappy savestate support is the reason I chose FB Alpha.  Every time you hit savestate (even if mapped to a joystick/gamepad button) it asks "what slot do you want to use" - and you have to reach for the keyboard to type in the slot#! [at this point, mame wont accept input from Joy2Key] What if you're sitting back in your chair with a gamepad in your hand? that sucks. also - in a lot of games "savestates aren't supported for this game".  Now that I fixed nearly every game with broken savestates in FBA, FBA is perfect in this respect. :)

Going off topic:
I agree with kev, the rom loading needs at least some macros, to rid the use of having to use memcpy and such things if data needs to be relocated.  You don't have to change the entire system - just make a couple macros to deal with things better for future drivers (what I mean is, we don't have to go back and change all the existing drivers to use the new macros - just for new drivers and/or when updating/rewriting older drivers that never worked right to begin with).

best regards,
- dink
« Last Edit: May 16, 2014, 04:13:23 AM by dink »

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
Hi guys,
Heres some good news for this Sunday -

Savestate undo has been through some very rigorous testing over the past couple days, after a few tweaks and some more testing - its golden.  Activate savestate undo with Shift-F8 - this will restore the previous savestate over the last savestate which was saved, then load the state with F9.  Savestate Undo gives 11 levels of undo on each slot  :biggrin:

Green Beret now has the right sounds.  Prior to this fix, the bgm sounded all distorted and weird.

Enabled savestates in Konami's Devastators & The Main Event.

EDIT:
In Konami's Ajax/Typhoon - the sfx would randomly change volumes, this was due to the wrong channel being specified in the volume callback.  Also some tweaks to the K007232 sound driver for savestates & games that use multiple chips.

best regards & happy gaming,
- dink
« Last Edit: May 19, 2014, 02:37:18 AM by dink »

Offline vbt

  • FBA Contributor
  • *****
  • Posts: 197
  • Karma: +9005/-0
dink, great job, i have 2 unsolved bugs on fba for saturn would you help ?

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
vbt, I can try - give me some info via pm :)
EDIT: I need to point out that I don't have a computer thats fast enough to run a Saturn emulator.
« Last Edit: May 19, 2014, 02:38:44 AM by dink »

kev

  • Guest
What are you thinking? This may be something I invest some time into.
I honestly don't see the point of compressing save states at all. Hard drive space is nearly limitless, the MAME set eats your hard drives with impunity.

Honestly nothing really concrete,.

I was thinking that bzip, whilst it does work fine, seems a bit ugly in places and I think it should be refactored to at least use ziplib. For some reason, although its not emulation related I always thought that the rom loading, including the accessing roms from within zip files should live in burn. Over the years I have argued that it might also be worth creating a extra layer between burn an burner that handles all the platform agnostic stuff as there tends to be a lot of code that gets duplicated from burner that's not win32 specific that gets copy and pasted out into new files. That's probably a fairly complicated refactoring job though.

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
Hello friends and fans of FBAlpha, heres some fix-news for the past couple days...

Added the 3rd button (special/smartbomb) to WOF: Sangokushi II

Did a tag-team fixage with iq_132 on the nmk16 driver, this fixes the hi score area on several vertical games (Task Force Harrier, Super Spacefortress Macross, Spectrum 2000 Vertical, and possibly a few others)

Fixed an occasional bad palette on savestate load with Silver Millenium.

Fixed something (scale the analogue values) with Night Striker, so its possible to reach the far edges of the screen.

And the best one so far - a fix for the stuck-sprite in Toaplan's OutZone!  This bug has eluded me for quite some time.. one which I thought would never get fixed..  so, its a good day! :D
EDIT: Some more good news, this fix actually had a side effect of solving a missing-background on savestate load issue in Vimana, Hellfire, Truxton 2 and Fire Shark/SameSameSame!

A little more than a month ago I had posted a "dink's FBA Failures" list of bugs that I couldn't fix.  I'm happy to say that almost the entire list has been crossed-out :)  http://neo-source.com/index.php?topic=2487.msg16276#msg16276

Thats it for now...
best regards,
- dink
« Last Edit: May 23, 2014, 05:31:11 PM by dink »

Offline Arcadez

  • Expert
  • *****
  • Posts: 538
  • Karma: +14/-5
  • Arcade Addict
A little more than a month ago I had posted a "dink's FBA Failures" list of bugs that I couldn't fix.  I'm happy to say that almost the entire list has been crossed-out :)  http://neo-source.com/index.php?topic=2487.msg16276#msg16276

Thats it for now...
best regards,
- dink
Nice one dink!! bet it's a crackin feeling to clear up that list :D

Offline dink

  • Administrator
  • *****
  • Posts: 3198
  • Karma: +259/-0
  • side effects: new or worsening heart failure
gamez fan, you're absolutely right - its great to finally clear some of those things up :)   

best regards,
- dink