Author Topic: SNESC tile data?  (Read 1908 times)

0 Members and 1 Guest are viewing this topic.

Offline spinal

  • Coder of DSision
  • Neo MOD
  • Hero Member
  • *
  • Posts: 796
    • spinalcode
SNESC tile data?
« on: April 11, 2010, 05:40:21 PM »
Can someone give me a clue as to what I have done wrong here?

I have my tileset converted using pcx2snes, which gives me tiles.pic and tiles.clr.

my data.asm is as follows...
Quote
.include "hdr.asm"
.section ".data"  superfree
TileData:
.incbin "tiles.pic"
TilePalette:
.incbin "tiles.clr"
.ends

In my snes.c file I have...
Quote
extern unsigned char TileData[];
extern unsigned char TilePalette[];

with the following in the main() just after snesc_init();
Quote
settiles(0, TileData, 0x6000); // load tileset

But when I compile I get the following error -
snesc.obj:snesc.s:1750: PARSE_STACK: Unresolved reference to "TileData".

Am I going about this the correct way? have I missed something? ~sm-53.gif~.gif

Offline mic_

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 632
Re: SNESC tile data?
« Reply #1 on: April 11, 2010, 06:39:07 PM »
Are you sure that you're assembling data.asm and linking against data.obj?

Offline spinal

  • Coder of DSision
  • Neo MOD
  • Hero Member
  • *
  • Posts: 796
    • spinalcode
Re: SNESC tile data?
« Reply #2 on: April 11, 2010, 06:48:51 PM »
 ~sm-84.gif~.gif
Dammit, I forgot to link data.obj into my .smc

It's always good to have a second brain to think up these things :P