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

Problem building Snes.swf from Snes.as using mxmlc -- what am I missing? #1

Open
markoflexo opened this issue Jan 28, 2012 · 4 comments

Comments

@markoflexo
Copy link

Hello!

Thanks for a very cool project!

I'm trying to compile FlashSNES and have encountered some problems:

This is what I tried:

git clone git://github.com/emcmanus/flashsnes.git
cd flashsnes/src/as3/src
mkdir cmodule
cp ../generated_as3/libSNES9x.as cmodule/
mv snes.as Snes.as
mxmlc Snes.as

And I'm getting the following error message:

.../flashsnes/src/as3/src/core/Emulator.as(44): col: 23 Error: Type was not found or was not a compile-time constant: CLibInit.

    private var cLoader:CLibInit;
                        ^

.../flashsnes/src/as3/src/core/Emulator.as(68): col: 18 Error: Call to a possibly undefined method CLibInit.

        cLoader = new CLibInit();
                      ^

.../flashsnes/src/as3/src/core/Emulator.as(3): col: 26 Error: Definition cmodule.libSNES9x:CLibInit could not be found.

import cmodule.libSNES9x.CLibInit;

I guess I'm missing something basic :-) What am I doing wrong?

@markoflexo
Copy link
Author

I've now succeeded in building the the Snes.swf file using the following commands:

git clone git://github.com/emcmanus/flashsnes.git
cd flashsnes/src/as3/generated_as3/
cp libSNES9x.as libSNES9x.as.orig
cat ../src/Profiler.as libSNES9x.as.orig > libSNES9x.as
alc-on
alc-asc libSNES9x.as libSNES9x.swc
alc-off
cp libSNES9x.swc ../src/
cd ../src/
mv snes.as Snes.as
mxmlc -static-link-runtime-shared-libraries=true -library-path+=libSNES9x.swc -output=Snes.swf -swf-version=10 Snes.as

However, the resulting Snes.swf file is only 965 kb compared to the 1097 kb Snes.swf (https://s3.amazonaws.com/flashsnes/Snes.swf).

Furthermore, the Snes.swf I compiled myself does only give a blank black screen when being run whereas the Snes.swf on S3 loads the game.

I'm probably doing something wrong but I don't know why. Any clues? :-)

@ray11
Copy link

ray11 commented Aug 2, 2012

im also having this problem as you do. all i really want to do is change the controlls setup. then the emulator would be fine.

but i get same black screen as you do with no game running. if anyone has figured how to make this work right . then please do help me.

@renelima
Copy link

alc-asc Command not found....

@digdug82
Copy link

I'm having the same problem, I believe libSNES9x.as has errors or missing something that's why it's not working after building the project.

@digdug82 digdug82 mentioned this issue Apr 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants