Can anyone compile Sample S_9_1?


Established Member
Hey guys,

I'm stilling trying to figure out how to display sprites on the saturn. I read through VBT's and Nescphp's source code quite a few times, I don't understand them too much.

I looked through S_9_1, the controller input example. It displays a picture of saturn controller, and it uses the files pad.cel,, and pad.pal. I replaced those pictures, but I can't get the code to compile. It also uses an array similar to one Nescphp uses in his code. I tried copying and pasting Nescphp's array into S_9_1, and that didn't work either.

Any advice? Thanks in advance.
Slinga it compiles without problem. I had only this error :

make.exe: *** No rule to make target `../../lib/sglarea.o'. Stop.

I think it was just specific to my installation on samples. sglarea.o is available in in another rep, I had just to copy it in right folder.

gcc main.c -O2 -m2 -g -c -I../../inc -o main.o

gcc scl_func.c -O2 -m2 -g -c -I../../inc -o scl_func.o

gcc scl_data.c -O2 -m2 -g -c -I../../inc -o scl_data.o

gcc spr_data.c -O2 -m2 -g -c -I../../inc -o spr_data.o

gcc -m2 -L../../lib -Xlinker -T../common/sl.lnk -Xlinker -Map -Xlinker -X

linker -e -Xlinker ___Start -nostartfiles ../common/cinit.o ../../lib/sglarea.o

main.o scl_func.o scl_data.o spr_data.o -lsgl -o sl.coff

objcopy -O binary sl.coff sl.bin

You should send the error message, it can help a lot.

gcc -m2 -L../../lib -Xlinker -T../common/sl.lnk -Xlinker -Map -Xlinker -X

linker -e -Xlinker ___Start -nostartfiles ../common/cinit.o ../../lib/sglarea.o

main.o scl_func.o scl_data.o spr_data.o -lsgl -o sl.coff

main.o: In function `ss_main':

main.c:91: undefined reference to `pad_cel'

main.c(.text+0x23c): undefined reference to `pad_map'

main.c(.text+0x248): undefined reference to `pad_pal'

make.exe: *** [sl.coff] Error 1

Can you paste your SCL_Data.C file?

#include "sgl.h"

#include "pad.cel"

#include ""

#include "pad.pal"

That's how I modified mine. All of those files are in the same directory as main.c. If I can get this to work, I'll be able to slap together something for displaying sprites.
you should check your files PAD.CEL, PAD.MAP and PAD.PAL normally they are text files and they contain tables called :

const Uint8 pad_cel[]

const Uint16 pad_map[]

const Uint16 pad_pal[]
Everything is as it should be...still doesn't work. Argh. Oh well thanks anyway VBT.