Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can the MESS and MAME helpers be unified? #90

Open
vitorio opened this issue Jun 26, 2014 · 10 comments
Open

Can the MESS and MAME helpers be unified? #90

vitorio opened this issue Jun 26, 2014 · 10 comments
Labels

Comments

@vitorio
Copy link
Contributor

vitorio commented Jun 26, 2014

Apparently JSMAME "just works," at least for the one system @textfiles tried it on:

12:40 AM <•SketchCow> Sir, ALL I did was make a directory called "mamehelpers". And changed in your scripts, everywhere it said helpers, I made it mamehelpers, and the 2-3 places it said "mess64", and "build mess", I made it mame.

Does a separate "mame64" executable have to be built? Is there a way to generate all object files and a unified set of helpers? What's the real difference between the two sets of helpers and the object files and the executables?

@DopefishJustin
Copy link
Member

The 'ume' target in the mame/mess makefile allows a combined build to be created. That will take forever though.

@vitorio
Copy link
Contributor Author

vitorio commented Jun 26, 2014

Does building MAME go faster if there are object files around from a previous MESS build? Is there any overlap?

@DopefishJustin
Copy link
Member

Yes there is a great deal of overlap.

@textfiles
Copy link
Contributor

It will not be surprising to know the changes I did to make it do MAME instead of MESS were trivial. For GENHELPERS, I did this:

root@teamarchive0:/1/JSMESS/jsmess# diff -btw mamehelpers/genhelpers.sh helpers/genhelpers.sh
33c33
< make TARGET=mame SYMBOLS=1 -j4
---
> make TARGET=mess SYMBOLS=1 -j4
41c41
< mv mame64 ../../mamehelpers/
---
> mv mess64 ../../helpers/
82,84c82,84
< mv mangled-all-resolved.txt ../../../../mamehelpers/
< mv mangled-all-unresolved.txt ../../../../mamehelpers/
< mv all-resolved.txt ../../../../mamehelpers/
---
> mv mangled-all-resolved.txt ../../../../helpers/
> mv mangled-all-unresolved.txt ../../../../helpers/
> mv all-resolved.txt ../../../../helpers/
89c89
< cd ../../mamehelpers
---
> cd ../../helpers

And for STARTMAKE, I did:

7c7
<         echo "Generates MAME tiny makefiles given a system name."
---
>         echo "Generates MESS tiny makefiles given a system name."
21c21
< MESS64NAME=mame64
---
> MESS64NAME=mess64
65c65
<    echo "MAME may have provided some suggestions, try those?"
---
>    echo "MESS may have provided some suggestions, try those?"

@textfiles
Copy link
Contributor

Someday I'll understand Github's way to pre-format. Regardless, the most glaring and specific differece is the building of MAME64 instead of MESS64, and running all the checks and changes against that. You could easily have a script that makes two sub-directories for each set of .txt files, and ultimately, you could combine the two .txt files since ultimately, it would be pulling from them.

I don't know how important it is to do this, with the ability to say "build an atari 800" and then turning around and saying "now build me a joust". But I can definitely say the scripts all work fine, when given the two runtimes. Oh, and as a bonus, building those two runtimes will double that initial compile work.

@balr0g
Copy link

balr0g commented Jun 26, 2014

Just surround a code block with ```` (in its own line) as explained at https://help.github.com/articles/github-flavored-markdown .

@textfiles
Copy link
Contributor

Thanks. Fixed.

@textfiles
Copy link
Contributor

The MAMEHELPERS directory is now part of the build, with the related copies of the files now in their own directories.

The problems are notable but not insurmountable with things like building except that if we ever get a driver collision, we're sad. For the moment, I happen to think this situation is quite fine. With two *HELPERS directories, I can swap between them and build into the same environment with no pain. (I've been doing it.)

@DopefishJustin
Copy link
Member

MAME and MESS are already enforcing that no drivers be named the same anyway because of Haze's UME stuff.

@textfiles
Copy link
Contributor

One notable discovery I made while doing a "build smallest memory footprint" matrix build - it appears if you run something in one "helper" that is only in the other "helper", it will wipe out said machine's makefile. So that's one argument for unification. Maybe if it uses the binary to see if something even exists, and based on which binary, it "does the right thing"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants