Neo TeAm Forum

The 9th. NEO Project for SNES => The 9th. NEO Project for SNES Dev kit. => SNES development section => Topic started by: sizeak on August 18, 2011, 07:00:23 AM

Title: snes-sdk problem (Help!)
Post by: sizeak on August 18, 2011, 07:00:23 AM
Hey,

I've built the snes-sdk on linux but when I try and build the snesc example I keep getting this error:

/usr/local/snes-sdk/bin/wla-65816 -io snesc.s snesc.obj
INCLUDE_DIRECTIVES: ROMBANKS/ROMBANKMAP wasn't defined.
make: *** [snesc.obj] Error 1

Could anyone help? I can't figure out what the problem is.
Thanks
Title: Re: snes-sdk problem (Help!)
Post by: sizeak on August 18, 2011, 07:45:44 AM
It seems that the optimisation was stripping everything resulting in 0 byte output. WTF. anyway removing -O from the provided make file works.

Now I'm having issues with:

/usr/local/snes-sdk/bin/wlalink -dvSo data.obj snesc.obj input.obj init.obj graph.obj str.obj snesc.smc
DISCARD: /usr/local/snes-sdk/lib/libm.obj:libm.asm: Section ".libm" was discarded.
DISCARD: /usr/local/snes-sdk/lib/libc.obj:libc.asm: Section ".libc_misc" was discarded.
DISCARD: /usr/local/snes-sdk/lib/libc.obj:libc.asm: Section ".libc_cstd" was discarded.
DISCARD: snesc.obj:snesc.s: Section ".text_0x0" was discarded.
DISCARD: graph.obj:graph.s: Section ".text_0x1" was discarded.
DISCARD: graph.obj:graph.s: Section ".text_0x2" was discarded.
/usr/local/snes-sdk/lib/crt0_snes.obj:crt0_snes.asm:284: FIX_REFERENCES: Reference to an unknown label "__malloc_init".
make: *** [snesc.smc] Error 1

Help appreciated, thanks
Title: Re: snes-sdk problem (Help!)
Post by: mic_ on August 18, 2011, 01:23:44 PM
__malloc_init should be in  /usr/local/snes-sdk/lib/libc.obj  unless something went wrong when you built the libs.
Title: Re: snes-sdk problem (Help!)
Post by: sizeak on August 18, 2011, 07:43:05 PM
__malloc_init should be in  /usr/local/snes-sdk/lib/libc.obj  unless something went wrong when you built the libs.

They seem to build fine and it definitely exists in the source file. I guess I could try dumping the obj to see
Title: Re: snes-sdk problem (Help!)
Post by: ChillyWilly on August 21, 2011, 02:44:34 PM
Did you remember to build and install mic's lib from the svn repo, or are you trying to use the libs from the snes-sdk? Mic's libs are in the svn repo on the google code page at the same level as the menu.
Title: Re: snes-sdk problem (Help!)
Post by: sizeak on August 29, 2011, 09:54:29 PM
No, I'm not building the menu. The problem was caused by the python optimisation script. It was stripping everything out leaving empty binaries