Author Topic: CaptainCPS-X's FB Alpha Extra Stuff WIP  (Read 81092 times)

Offline Leaf

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +9/-4
Re: FB Alpha Extra Stuff
« Reply #75 on: March 07, 2007, 11:01:32 pm »
Nice GUI for change sound track, keep the nice work,CaptainCPS-X. :wink:

I modified some source to parse the sound.dat from uocaname(an unofficial build of caname).
There are so many tracks in this data, the data format support checking clone games and organize the sound to serval section (like BGM, SE, Voice..).
I hope you use this file instead of the separate data and change GUI a little. :p
(sound.dat is in the attachment, I only converted it to UTF8.)


I attach the source I modified, it is based on offical FBA 029665.
PageUp - Play previous track;
PageDown - Play next track;
Shift+PageUp - Select previous section;
Shift+PageDown - Select next section;

SeeYaa!  :biggrin:

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #76 on: March 07, 2007, 11:15:56 pm »
Ups!, I had to edit R11 version because of this...

Quote
- Added 'HARDWARE_CAPCOM_CPS1_GENERIC' and 'HARDWARE_CAPCOM_CPSCHANGER' to enable
  all standard CPS-1 games work with the Music Changer feature [ThanX IQ_132].

...was making CPS2 games unable to change Music Tracks.

So here I attach the 'tracklst.cpp' so you only have to replace it with this one.

SeeYaa!
 :biggrin:

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #77 on: March 07, 2007, 11:20:31 pm »
Nice GUI for change sound track, keep the nice work,CaptainCPS-X. :wink:

I modified some source to parse the sound.dat from uocaname(an unofficial build of caname).
There are so many tracks in this data, the data format support checking clone games and organize the sound to serval section (like BGM, SE, Voice..).
I hope you use this file instead of the separate data and change GUI a little. :p
(sound.dat is in the attachment, I only converted it to UTF8.)


I attach the source I modified, it is based on offical FBA 029665.
PageUp - Play previous track;
PageDown - Play next track;
Shift+PageUp - Select previous section;
Shift+PageDown - Select next section;

SeeYaa!  :biggrin:


ThanX for that Leaf!  :wink:, I will check it tomorrow, because now i really have to get a sleep hehe  :p :biggrin:, but really thanx a lot ^^

SeeYaa!
 :biggrin:

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #78 on: March 08, 2007, 06:10:31 pm »
Some damage done! hehe  :biggrin:, ThanX to some of the code provided by Leaf I added support for UTF-8 to the Soundtrack Changer and modified the surface on screen where the Track info appears...

here you have a screenshot of the actual WIP...

spf2t.dat (UTF-8 version) (Note: ASCII version works fine too)



Im working right now in some other nice features for the Soundtrack Changer, like... for example, when the game load it will automatically parse the default Tracklist DAT in 'tracklst/' dir, but if you want to load the 'sound.dat' (from caname) you can do it from the Tracklist Dialog (there will be a button for that)...so that will make the Music Changer feature more compatible ^^.

SeeYaa!
:biggrin:
« Last Edit: February 01, 2010, 06:39:31 am by CaptainCPS-X »

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #79 on: March 08, 2007, 06:33:07 pm »
Ummm, thinking again of it...I believe is better to import the Tracklists from caname sound.dat to the Nebula/Kawaks format.

..i really think it will be easier to manage tracklist in a separate way, like I have it actually.

SeeYaa!
 :biggrin:

Offline iq_132

  • Administrator
  • *****
  • Posts: 3565
  • Karma: +374/-0
  • Just a lion with a sword
    • NeoSource
Re: FB Alpha Extra Stuff
« Reply #80 on: March 08, 2007, 07:38:27 pm »
Nice work :)


Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #81 on: March 09, 2007, 02:21:10 pm »
Hey IQ I need some help  :redface:, I was fighting with this code but I have no success getting the hex value from the EditBox...

here is the picture of my current WIP...

Play Custom Sound Code / Track:




...and here is the basic code to get the 'Int' from the EditBox...

Code: [Select]
case IDC_TLPLAY:
{
//
TCHAR nszCustomTrack[64];

if((GetDlgItemText(hTracklstDlg,IDC_CUSTOMTRACK,nszCustomTrack,4)) != _T('\0'))
{
// Not sending a Hex just seems to be a normal integer [need help here lol]
UINT16 nCustomTrack = GetDlgItemInt(hTracklstDlg,IDC_CUSTOMTRACK,0,FALSE);
SendCustomSoundCode(nCustomTrack);
}
else
{
nTrackCnt = SendMessage(GetDlgItem(hTracklstDlg, IDC_LISTA), LB_GETCURSEL, 0, 0);
PlayCurrentTrack();
}
}
break;

...to be more specific... here is the problem...

Code: [Select]
UINT16 nCustomTrack = GetDlgItemInt(hTracklstDlg,IDC_CUSTOMTRACK,0,FALSE);
SendCustomSoundCode(nCustomTrack);

that seems to get only 'digits' from the EditBox and not Characters... there is other function called 'GetDlgItemText()'  that might be the solution to this but im not good converting from Text to Hex...

..I will keep trying to get this working but if you can help me with a method to convert Text to Hex it will be very appreciated ^^

SeeYaa!
 :biggrin:
« Last Edit: February 01, 2010, 06:40:25 am by CaptainCPS-X »

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #82 on: March 09, 2007, 04:28:32 pm »
Damage done again!!  :biggrin: found a way to get and play the custom sound code / track!! ^^

here is the way i did it ... (for learning or reference purposes  :wink:)...

Code: [Select]
case IDC_TLPLAY:
{
//
TCHAR nszCustomTrack[128];

if((GetDlgItemText(hTracklstDlg,IDC_CUSTOMTRACK,nszCustomTrack,5)) != _T('\0'))
{
UINT16 nCustomTrack;

_stscanf(nszCustomTrack, _T("%X"), &nCustomTrack);
SendCustomSoundCode(nCustomTrack);
}
else
{
nTrackCnt = SendMessage(GetDlgItem(hTracklstDlg, IDC_LISTA), LB_GETCURSEL, 0, 0);
PlayCurrentTrack();
}
}
break;

with that fixed now im gonna work on some little adjustments and i will release the code  :smilie:

SeeYaa!
 :biggrin:
« Last Edit: March 09, 2007, 05:20:27 pm by CaptainCPS-X »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3565
  • Karma: +374/-0
  • Just a lion with a sword
    • NeoSource
Re: FB Alpha Extra Stuff
« Reply #83 on: March 09, 2007, 05:10:48 pm »
Absolutely fantastic work on that small feature request :)  Thanks!


Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #84 on: March 09, 2007, 11:17:11 pm »
Finally! FBA Extras R12 is here!

Hi there all!, here i bring the new version of the FBA Extras, I hope everything its working allright and that you all like the latest features ^^

Some pics first ^^...









btw, you can use the custom track feature to play soundtracks from games that does'nt have a Tracklist DAT file in the 'tracklst/' dir, just write the track in the editbox and click Play!  :smilie:

Quote

*R12

- Modified 'cps_rw.cpp', now CPS1 Games dont seem to have problems with the Tracklist Window.
- Modified 'neo_run.cpp', now changing soundtracks in NEOGEO Games works better.
- Added support for UTF-8 Tracklists DATs [ThanX to Leaf].
- Modified the way Soundtrack Titles appear on screen based on Leaf's code.
- Added some extra buttons and controls to the Tracklist Window.
- Added volume slider control to the Tracklist Window (Not working right now).

ThanX to IQ_132 & Leaf for the constant help + recommendations =).

Note!: When changing NeoGeo Soundtracks dont change them too fast because the sound CPU will
      'freak' and you will have to reset the game.



Download the reloaded R12 version here:

fba_src_029665_ex_R12.7z [~258KB]

EDIT* Attached a sample Tracklist DAT with utf-8 encoding for spf2t  :wink:

SeeYaa!
:biggrin:
« Last Edit: February 01, 2010, 06:42:01 am by CaptainCPS-X »

Offline Leaf

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +9/-4
Re: FB Alpha Extra Stuff
« Reply #85 on: March 10, 2007, 12:28:30 am »
Really nice work. Thanks for the new code for writing soundcode to cps1 and neogeo systems.  :wink:
And I have done my GUI for parsing sound.dat of caname.
SeeYaa! :biggrin:

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #86 on: March 11, 2007, 03:39:50 am »
Hi all! here I bring... FBA Extras R13!  :biggrin:, here is a sshot of the main change in this release...

Volume Trackbar (Working!)



..and here are all changes ^^...

Quote

*R13

- Modified the volume section in 'run.cpp' and now if the game is paused and you press Alt+'+' or Alt+'-'
  it will redraw the screen with the new volume value. (Modified the Soundtrack Changer feature too, so if
  it's paused and you change a track, the screen will redraw with the new Title message).
- Added new code in 'tracklst.cpp' and now the Volume Control in the Tracklist Window it's working.
- Fixed some probs with the Soundtrack Title font & area sizes, the new values should work fine with
  larger soundtrack titles.
- Cleaned the 'tracklst.cpp' and removed some commented code.



Download the R13 here:

fba_src_029665_ex_R13.7z [~256KB]

I hope all have some fun time using the Soundtrack Changer hehe! ^^... (maybe tomorrow I will import the current 'sound log' function to the Tracklist Window so you can start recording music or sounds from there  :biggrin:

SeeYaa!
 :biggrin:
« Last Edit: February 01, 2010, 06:42:49 am by CaptainCPS-X »

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #87 on: March 11, 2007, 10:47:15 pm »
Hi all!, ... today i was working with some GUI changes in FBA, and i came with this....

WinXP



WinClassic



but i got a little problem when a "POST_INITIALISE_MESSAGE" ocurrs...


WinXP




WinClassic



...if I get this working 100% in the future, i will release the code in the FBA Extras... :smilie:, for now im trying to understand how the menus and popups work in FBA to see if the problem can be fixed someway. If anyone knows any info on how the menus/popups work in FBA pls send me a PM, it will be very appreciated ^^.

SeeYaa!
:biggrin:
« Last Edit: February 01, 2010, 06:43:29 am by CaptainCPS-X »

Offline CaptainCPS

  • Administrator
  • *****
  • Posts: 1520
  • Karma: +126/-0
  • FB Alpha Team
    • CaptainCPS's Home
Re: FB Alpha Extra Stuff
« Reply #88 on: March 12, 2007, 12:43:45 am »
Nevermind hehe  :p, I got it working fine now ^^, there are still some minor issues like for example, the non-regular items in the menus not getting the graphical effect but maybe that can be fixed later ...



SeeYaa!
 :biggrin:
« Last Edit: February 01, 2010, 06:43:55 am by CaptainCPS-X »

Offline iq_132

  • Administrator
  • *****
  • Posts: 3565
  • Karma: +374/-0
  • Just a lion with a sword
    • NeoSource
Re: FB Alpha Extra Stuff
« Reply #89 on: March 12, 2007, 01:02:05 am »
Pretty :)