Jump to content
IGNORED

Error in sprite creation process


Tjemeu

Recommended Posts

Hi guys,

 

I'm new to this forum and also new to Atari Lynx development. I didn't expect that there was such a vivid community of Atari Lynx fans, awesome!

With the amazing Lynx development tutorial and a lot of trial and error I was able to setup my Macbook to write and compile Lynx code that I can run in Handy. I wrote a very simple program where I can move a circle around and make it jump up and down. Last night I tried to create a sprite based on a windows bmp file, but I got stuck on an error and got no search hits on the web whatsoever. So I was hoping you would have an answer or direction to search in.

 

I'm using Lynx Sprite Packer Ver 1.98 and initially I got some errors on the file format but after some changes it created the player.pal and player.spr files. The next step in the make file is where I'm getting errors:

 

ca65 -t lynx -o enemy.o enemy.s

player.s(2): Error: String constant expected
player.s(3): Error: String constant expected
player.s(3): Error: '.SPR' is not a recognized control command

 

The contents of player.s are:

.global _

.segment RODATA

_: .incbin player.spr

 

Which makes sense based on what is in the make file, but I'm not sure if this is correct:

.bmp.o:
    $(SPRPCK) -t6 -p2 $<
    $(ECHO) .global _$(*B) > $*.s
    $(ECHO) .segment "$(RODATA_SEGMENT)" >> $*.s
    $(ECHO) _$(*B): .incbin "$*.spr" >> $*.s
    $(AS) -t lynx -o $@ $(AFLAGS) $*.s
    $(RM) $*.s
    $(RM) $*.pal
    $(RM) $*.spr

 

Any ideas? Thanks in advance!

Link to comment
Share on other sites

Thanks for your reply man! I've cloned your repository (sounds like a fun project!) and tried to run "make all", but I think I might have a different version of CC65 because I get the following error: 

cc65: Unknown option: -O3

 

The rest all seems to compile ok.

 

I also attached the zip of my project, but would really like to get your game working. Sounds like something I can learn a lot of.

 

Thanks

 

lynx1.zip

Link to comment
Share on other sites

The right CC65 version is the one maintained by @karri (https://bitbucket.org/atarilynx/lynx/src/master/).

 

Anyway you can change -O3 in -O2.

 

The one on github doesn't have the last things developed on this forum and there are rumors that the cart filesystem doesn't work (don't know if it is true).

 

I'm checking your code right now.

 

EDIT: the attached file should solve your problem

lynxcc65.mak

Edited by Nop90
  • Thanks 1
Link to comment
Share on other sites

Thanks a million man! The bmp is converted to a sprite now. I've tried again to compile your game, but I get other errors like this now:

Call to undefined function 'JOY_BTN_FIRE'

 

I use JOY_BTN_1 in my code for this. Must be because I'm using outdated tools. I will update everything tomorrow and see if I can get it working.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...