KMFDManic / mame2003-xtreme

Optimized & Updated 2019 version of MAME 2003 for lower spec hardware platform devices, with a sprinkling of added game support & tweaks...geared for speed & performance on the Mini Classics. Huge & personal tremendous thanks to the consistent and collaborative efforts of arcadez2003, grant2258, & gpstar, for their dedication!
10 stars 7 forks source link

Street Fighter II Custom OST WIP!:) #16

Closed KMFDManic closed 4 years ago

KMFDManic commented 4 years ago

Hello, @grant2258 and @arcadez2003 and @gpstar81 ! You ready for the biggest, baddest, best addition to MAME 2003 Plus/Xtreme, to date:) How about Custom OST Support for Street Fighter II, the venerable Arcade Classic...that I know we all played hundreds of hours on, be it Arcade or Home Ports! Big Blue Frontend worked this in, and was nice enough to try to get things fixed up so we can have a better chance of this working out well on the Mini Classics! Example Test Video of it in action:

https://www.youtube.com/watch?v=134slPc0Sug

I would like to do a few variants, so people can swap out the OSTs, as I would like to have THIS song for Ken's Stage!

https://www.youtube.com/watch?v=v9tvzw3E5tw&t=25s

gpstar81 also suggested I use a music remix of Mighty Wings, as an alternative that people might enjoy more. I will do it both ways!

I will test these changes on the Mini Classics, whereas, you guys, if interested, can help verify they work on PC! Once you confirm you are interested, I will give temporary link to the fixed up source files, so you can grab them. Then, once everything is said and done and cleaned up, will commit them to the normal source commits!

Kyland:)

ghost commented 4 years ago

I have a fork of xtreme on my repo so no problems testing it after youve done your rounds of testing on the pc at all. happy new year to you all!

KMFDManic commented 4 years ago

@grant2258 Will temporarily post the files here, and you and/or @arcadez2003 can confirm you've grabbed them. Want them to be properly implemented before committing officially. Note, the "Additional Refactoring Files" are meant to help with dual usage of ffight.zip and sf2.zip

https://we.tl/t-Lzvdqu2tsK

ghost commented 4 years ago

you want this tested on extrem or plus ?

KMFDManic commented 4 years ago

@grant2258 I would actually like this to be implemented for both. Gpstar is helping, as well. We should be able to find a median to have a solid set-up for SFII between the two Cores. I think this will be incredibly fun to test and play and showcase:)

ghost commented 4 years ago

im not sure which source file i should be using here there are three can you give me some background into it i can just test if each sorce file is working if you prefer that

KMFDManic commented 4 years ago

I didn't get a good chance to dig too deep into them yet, @grant2258 Had been working additional hours due to the Holidays. Let me know where you stand, and we will continue from there. You did a friggin' fantastic job helping clear up the Samples and other issues in the past. MAME 2003 Xtreme/Plus will always have your "quality seal" on them, period.

KMFDManic commented 4 years ago

@grant2258 @gpstar81 went into overdrive, and was able to convert from c++ to mame c code, and this should work out better for us on MAME 2003 Plus/Xtreme!

https://github.com/gpstar81/mame2003-xtreme/commit/92c6daf89bf3a9e6daf0116416488a8bd7b85811

I am gonna test things now. Let me know how things turn out on your end, then we can try to work this into Plus/Xtreme for realz:)

I am very much hoping our other recent additions do not conflict with any of this, of course! But, here we have, the coolest, biggest, baddest Custom OST, yet!:)

ghost commented 4 years ago

One note i will say im not sure who implemented the sample_stop(a); loop but we are only using two channels sample_stop(0); and sample_stop(1); will stop the samples

gpstar81 commented 4 years ago

you are right. it's been changed on my repo to sample_stop(0) and sample_stop(1).

KMFDManic commented 4 years ago

@grant2258 this is exactly why I absolutely value your final say in this. You and arcadez2003 and markwkidd have all been amazing with me in the past. This WIP will be very nice once you add your TLC to it:)

ghost commented 4 years ago

i do appoligize for the stopall the samples where merging your way is a lot better! great work you two guys as usual!

ghost commented 4 years ago

Ok little update first of all the volume is so much more pleasing. The normal sounds are also playing samples arent there. The slow sound is cutting out sometimes. Usually starts on the first fight on round two sometimes it comes back on or it just stays off until the fast music comes on

gpstar81 commented 4 years ago

What system are you testing on? PC? ARM build for a SNES classic or equivalent ?

ghost commented 4 years ago

can do all 3 linux windows and arm I was testing on windows

gpstar81 commented 4 years ago

What happens if you build from my repo and use the module from that?

I couldn’t get KMFDManics repo to build on my system, and I didn’t want to spend the time debugging the issue so I worked off my old source from a year ago. His was giving me the following problems when linking:

Undefined symbols for architecture x86_64: "_osd_get_mastervolume", referenced from: _onscrd_volume in usrintrf.o "_osd_set_mastervolume", referenced from: _onscrd_volume in usrintrf.o "_osd_sound_enable", referenced from: _mame_pause in mame.o _handle_user_interface in usrintrf.o ld: symbol(s) not found for architecture x86_64

ghost commented 4 years ago

I havent tried builing his repo will give it a try now

do this in his repo git fetch origin git reset --hard origin/master

make clean make -j8

edit his repo builds fine for me

gpstar81 commented 4 years ago

Same problem again with his. I'm building on a mac btw.

I'll try building yours.

gpstar81 commented 4 years ago

Your's built fine on my system.

ghost commented 4 years ago

i already have your commits in

gpstar81 commented 4 years ago

Ah anyways, I ran yours, no issues with the samples on my end.

ghost commented 4 years ago

play a few rounds it took a while for me the first time try win really quick it happened with ehonda and zangief blanka as well. Ill try a clean compile tomorrow cause i was already compiled just recompiled the driver mame can be funny if you dont do a clean build at times. Will update you when i do this

gpstar81 commented 4 years ago

I’ve done several play throughs no problem.

Which rom are you using? sf2 or sf2ce? Can you do a video when the problem happens?

KMFDManic commented 4 years ago

@gpstar81 @grant2258 Funny bug, if you have infinite health on, in my video. Not worried about it, though! Game runs great, will get more recent commits added. But, here is the end result! Thanks, guys! And, thanks Big Blue Frontend, too!

https://www.youtube.com/watch?v=ooURAXmKY60

ghost commented 4 years ago

ive done a test video where this happens its happening on windows and linux for me this was recorded in linux dont know how to record it on windows im a video recorder n00b. ill add a link when its uploaded

https://drive.google.com/open?id=1LlOdWaOeUP_Vmomn4ENYdOmV7euqd-XZ

need to get some sleep for worked glanced at the code maybe add a condition for

else if(sample_playing(0) == 0 && sample_playing(1) == 0 && fadingMusic ) fadingMusic = false;

edit:

traced this a bit the fading

https://github.com/grant2258/mame2003-xtreme/blob/26f432554bc580d1b0584e660cddec51edafebd1/src/drivers/cps1.c#L975-L976

commenting this out just makes a small gap then the music starts maybe intentional or the game timing is off?

anyway to get this to reproduce i start the game put three credits in choose ehonda first fight is chungli then blanks and it tiggers

KMFDManic commented 4 years ago

@grant2258 @gpstar81 Try these "better" samples, which are complete and have FM Towns, and crucial 3DO tracks. Thanks, both of you, as well as Big Blue Frontend, for doing a great job with the original c++ coding and samples and hooks!

https://archive.org/download/bjjvh/sf2.zip

Unless anything is changing, I will get things committed for the Next Release:)

arcadez2003 commented 4 years ago

@KMFDManic @grant2258

Hey fellas hope ya had a good new year, could ya's do me a quick favour.?? just boot Dig Dug and lemmie know if it works for ya's, as a dev i know called Madmab has had trouble getting it to work on the genesis mini when using the MAME2003+ core.

He's gonna try it on the SNES Classic next so i thought it might be good to hear back from more than one person whether it's good or not.

Cheers!!

ghost commented 4 years ago

ill compile the latest for pi havent used it in a while so will be an older version i have installed for arm. It works fine in windows. I tested the digdug set.

edit working fine on the pi as well mate.

arcadez2003 commented 4 years ago

Thanks for trying it out cheers, might be one of those platform specific issues then maybe.

ghost commented 4 years ago

@arcadez2003 one little thing to keep in mind it could be his rom is bad the set was changed in the namco80s update we done. I get a feeling that could be the issue shoot him the plus rom to test with.

edit notice you done a gng 4way update is a lot better this way i changed my sanwa to 4way and i found the game a lot easier even playing with the 4way emulation on helped it leaps n bounds

arcadez2003 commented 4 years ago

Aye i told him as much but he was using the xbox MAME rom for Dig Dug which i knew would have been correct for the Namco update, anyway he's got it working now by uninstalling then reinstalling the RA cores on his SNES mini.

So we never broke it doin the Namco update which is all i wanted to know :)

arcadez2003 commented 4 years ago

Some fella requested it, so i changed both Ghosts n Goblins and Ghouls N Ghosts over to 4-way it wont make the ladders any easier i dont think which was his main reason for wanting the switch.

You gotta have the knack for em ;)

ghost commented 4 years ago

it makes a big difference for me on 8 way if you go diagonal you player just stops that shouldnt happen at all. Im still crap at it but not as bad on a 4way lol

ghost commented 4 years ago

@KMFDManic there is an issue with your having two branches not sure which one we are using.

https://github.com/KMFDManic/mame2003-xtreme.git has missing commits

https://github.com/KMFDManic-Cores/mame2003-xtreme.git not checked that one not sure what one we are using

KMFDManic commented 4 years ago

@grant2258 ignore the Core one. I did the pull request on this Repo, and didn't have any noticeable issues. Custom OSTs ran great for me, with sfii running even better. If you feel any additional commits need added, they can go to this one. I will be posting a Release tomorrow. Thanks for looking out, mate! Keep me posted if u want anything else done:)

ghost commented 4 years ago

Well im having issues with it just see how users get on the commit history seems kinda messed up on your branch. Ive sent updates to you and gp start if you want then. Just let it go in the wild if other people get the same problems ill commit it.

The changes that fixed it for me are here just do a wget https://github.com/grant2258/mame2003-xtreme/raw/ost_update/src/drivers/cps1.c if people are having issues big man

KMFDManic commented 4 years ago

@grant2258 so much appreciated! I will be releasing tomorrow with a nice shout out to you.

ghost commented 4 years ago

ok one more thing my good man there is a buildfix pull request you will need to pull. I have put a pull request in for gpstar repo we should all be synced up now makes it easier to work on things that way in the future.

arcadez2003 commented 4 years ago

@KMFDManic If you want this supported on the MAME2003+ branch just create a pull sometime and i'll make sure to merge it in.

On a seperate note someone added support for the Cyclone and Drz80 versions of the M68k and Z80 CPU's, i dunno much about em TBH but i assume this is to boost the performance with certain games on certain hardware.??

I dunno if it's of any use to the platforms that this core targets but i thought i'd mention it anyway.

ghost commented 4 years ago

ive already done s sf2 for plus needs some things added atm that ive added to xtreme. ill update it soon here https://github.com/grant2258/mame2003-plus-barcade/commits/sf2_ost ill remove the dat update else it wont merge. Ill probably be better off redoing let me know if you want it done or you can do it yourself

arcadez2003 commented 4 years ago

Aye i know you've got it done but you cant push to the main branch hence i tagged @KMFDManic as i assume he still can, but hey it's no bother @grant2258 if you wanna send it my way.......

https://github.com/arcadez2003/mame2003-plus-libretro

And i should hopefully be able to merge it into the main branch from there, no hurry for this BTW i really only only posted up to let ya's know im interested in these nice sound sample additions for Street Fighter and would like to see em supported in the main core.

Also that i wasn't blanking ya's as i was tagged and never responded as i was busy with other stuff is all

arcadez2003 commented 4 years ago

I had to revert with regards to the SF samples as i got some build errors..........

https://github.com/libretro/mame2003-plus-libretro/commit/60df6b3b4b4121a6afffd27d41a12a8cb9e40144#comments

KMFDManic commented 4 years ago

@arcadez2003 I am fairly certain @grant2258 will be able to make the magic happen with Plus:)

@gpstar81 Remember when we thought there was a limit to sample size? The actual issue at hand is running out of memory on unload! On PSC, which has exponentially more Ram to work with, the samples run fine, nearly no matter what the size. On MD/SNES/NES Mini Classics, however, they run out of memory after 80 MB. BUT, I will post a fix for this Next Update, which will simply use a page swap file on USB, 512 MB, as additional Ram, and the larger samples will work fine! sfii, even at 112 MB won't work without the Swap File. But, all good now:) This also fixes a half dozen other things that limited Ram effects on the lesser spec Minis.

I think an awesome choice for another Custom OST would be either Castlevania Vs with MESEN HD OST or Afterburner with FM Towns OST (which is exceptionally cool). So many options!

Also, @grant2258 In your opinion, something we previously discussed...how difficult would it be to add Analog Controls and Options to Toggle them On/Off like with Plus, to Xtreme? Just curious. Plus has better overall compatibility on the Mini Classics, but Xtreme still maintains the slightly better performance/speed, which goes a huge way with games like Alien 3 and Jurassic Park. This is where analog controls may really benefit Xtreme.

gpstar81 commented 4 years ago

Yes I know about the sample size limitations is a memory problem. Mame is loading the entire sample pack for a rom into the system memory when it loads the rom by default. You can really notice this on the snes mini as it can take awhile for the game to initially load. Anyways, so systems with small amounts of ram like the snes mini obviously can not load 500mb worth of samples into the system memory, where as a PC normally would not have that problem.

That is when I did the compromise and modified the system to only preload small samples (less than 10mb) into memory (prevents game stuttering when the system reads and loads a sample, such as sound effect samples) while large samples (most likely music) get loaded when required and removed from memory when no longer used. So in theory, aside from really strange sample setups (a single 500mb sample file for example), large samples should mostly be ok for those small ram systems.

If you make each music sample larger than that 10mb limit I put in, the custom ost games should load much faster as the sample file will only be loaded on demand when requested vs loading everything at the initial loading of the rom which can take time on slow systems like the snes mini. There can be tradeoffs to this, for example with Street Fighter II, the sample music changes during the low health of a character, so there may be a loading pause/stutter if the fast music sequence is a large file that is not preloaded into memory, so using smaller sample sizes might be better for that example.

Refer to: /src/common.c and /src/common.h for more information.

ghost commented 4 years ago

@arcadez2003 i think this is more a makefile.common issue than anything else try changing all the .c in there to .o this is a symptom of why the video drivers and machine drivers needed renamed. Well we need .o and to clear duplicates out of the object files as well if there is any specially for static builds

@KMFDManic analog controls can be done yes. I remeber discussing hard drivin with you and how i was hesitant to add it. It can be done eaier for the user right now than it is in plus at the moment.

The complication in the plus port is RA wants to set controls is simply cant coupe with mapping wise and from its menus. If you forget about retropad and use the tab menu like normal mame078 you wont have any issues. No more than you would in mame 078 anyway. That was the bain for me working in this port perfectly working stuff was ripped out like the osd menu to set volumes. The game information screen that tells you a game isint working. Ive restored some osd on the barcade version i make for myself to use. I will eventually return mame like it was in its native form just so much was ripped out and half working ra solutions where put into place maybe mark will finish them one day. I always maintained it should have been disabled by default until it was fixed no we have a cluster of complications for users.

The biggest issue we have is mame by default expects an analog controller. Problems is hats and analog both map to u/d/l/r/ so for all games to work you have to choose a type of controller if you dont have analog you need to specify digital in input->general and map every analog control to digital hat and override the analog default thats set by mame for analog games

KMFDManic commented 4 years ago

@grant2258 If you are bored and wanna try this, I can try a direct compile of your fork, if you are able to get analog introduced. It worked fine for me with Plus. So, it might be viable for Xtreme, too. Entirely up to you. Not sure if it would be a fairly quick addition, or drawn out.

@gpstar81 Thanks for the great response. I am currently able to run Samples twice as much as our limitations, via Virtual Ram, which installs 512 MB Swap File to USB/SD. I just recorded a video with it in action. So, you will want to use this if you do run SNESC again in the future. For PSC, No problems with any file size, really. I was able to easily load 160+ MB Samples on MD/SNES/NES with the 512 MB Virtual Ram Page Swap File. So, it will remain a permanent fixture in my set-up. And, get this!

Double Dragon, Custom OST, MAME 2003 Xtreme, which we obviously had some slowdown issues, which previously were fixed up with some coding fixes grant2258 helped with..It runs better than ever on my current set-up, which is combination of Zram Crash Inhibitor, which allows additional ram to be used, directly working with the kernel; Xtreme Virtual Ram (512 MB Page Swap File); Xtreme Overclock (Yes, we can overclock to 1.344 Ghz now!, and easily toggle it on/off), in conjuction with Updated RetroArch Tweaks I implemented and the updated Core with speed hacks..Double Dragon Custom OST runs smooth as butter, and is ridiculously awesome. I will link to it in action with these above outlined perimeters. It also fixes ALL the other Custom OST games to run better, too. So glad we got these on MAME 2003 Xtreme, rather than 2014! 2014 would still be running them slow as molasses!

Thanks again, guys!

ghost commented 4 years ago

@KMFDManic ill certainly get round to it at some point an we can discuss some things on implementation once its in place have a few other things in tinkering with atm.

KMFDManic commented 4 years ago

@grant2258 Don't worry about analog controls. I have things working the way we need them to be for light gun games, racing games, etc, for now:)

@gpstar81 I will be posting Virtual Ram HMOD for use with MD/SNES/NES. It will put 512 MB swap file onto hard drive/flash drive. Any file over 80 MB that can't unload properly, will work. Tested it beyond 300 MB with MAME samples, just fine. On PSC, you can do 300 MB+ fine, as long as you have enough power source. Very happy with ALL the Custom OSTs! Your technical explanation was quite helpful in understanding some of the load issues! Hope you get a chance to try more of the recent stuff out. I have put time into optimizing Amiga, too, as well as Amiga CD32. A few others have been great with that, too, such as Sonninos and RSN8887.

@arcadez2003 I need to look into Elevator Action Returns for Xtreme, as someone reported that there is a part where you shoot lights or such, and it is supposed to get dark. I need to actually play and see for myself, to know what they are talking about. Not sure if any fixes were put into Plus for that, as they mentioned the dark effect works fine on Plus. I need to also see if anything else cool should be added to Xtreme, now that I am pretty set on DOS, Amiga, etc! Loving each and everything added to Plus!

3:50 to see what works in Plus, but not Xtreme.

https://www.youtube.com/watch?v=e_DX939yGr4

arcadez2003 commented 4 years ago

@KMFDManic You simply need to add these changes.........

https://github.com/libretro/mame2003-plus-libretro/commit/181f8a8b0ac0aafe75dda23dfe433b3f04a1411c

You also might be interested in the new c-chip emulation for Operation Wolf which i hooked up in the plus core a wee while back, it adds extra enemy has found you levels and extra gameplay features.

KMFDManic commented 4 years ago

@arcadez2003 not even sure how that commit slipped past me! Thanks so much:)

arcadez2003 commented 4 years ago

@KMFDManic @grant2258

Can one of ya's do me a favour.?? i just need the MAME2003.xml dat updated so all the romsets added of late are supported inside it, i cant do it myself as i dont have the toolset i'll do the other stuff like the catver ect etc.

The main reason i want this done is im finished on the core now and i dont wanna leave it in such a state as some of the games are not supported in the docs.

i have fork here of the latest core............

https://github.com/arcadez2003/mame2003-plus-libretro

Regards