Gandor Posted May 12, 2012 Share Posted May 12, 2012 Hi, Has anybody been able to compile the tgidemo from the cc65 samples? Installed cc65 according to http://atarilynxdeve...nt-environment/ According to the README file it should be supported for lynx but I haven't been able to compile it successfully. I'm trying to compile this from a cygwin window with the gnu make installed. $ make -v GNU Make 3.82.90 Built for i686-pc-cygwin Copyright © 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. I made the following changes to the Makefile: SYS = lynx EXELIST = tgidemo $ make tgidemo.c Unresolved external `_close' referenced in: tgi_load_driver.s(22) Unresolved external `_open' referenced in: tgi_load_driver.s(21) Unresolved external `_read' referenced in: tgi_load_driver.s(20) Unresolved external `_tgi_mode_table' referenced in: tgi_stddrv.s(9) Unresolved external `_write' referenced in: fwrite.s(10) ld65.exe: Error: 5 unresolved external(s) found - cannot create output file Makefile:67: recipe for target `tgidemo' failed make: *** [tgidemo] Error 255 Any help/info would be welcome. Quote Link to comment Share on other sites More sharing options...
Ninjabba Posted May 14, 2012 Share Posted May 14, 2012 what compiler version are u using? the peg solitaire source compiles out of the box for quite some cc65 versions. The only thing that should be modified are the paths to the tgi driver and the joystick driver in the makefile in the resident folder. I've compiled it with cygwin Quote Link to comment Share on other sites More sharing options...
Gandor Posted May 15, 2012 Author Share Posted May 15, 2012 (edited) what compiler version are u using? the peg solitaire source compiles out of the box for quite some cc65 versions. The only thing that should be modified are the paths to the tgi driver and the joystick driver in the makefile in the resident folder. I've compiled it with cygwin $ cc65 --version cc65 V2.13.3 SVN version: 5495 Uncompressed the solitaire source and was able to compile and run it without problems (only had to override sprpck with sprpck.exe) make -C resident make[1]: Entering directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/resident' cp "D:\Development\cc65\include/../joy/lynx-stdjoy.joy" . co65 --code-label _lynxjoy lynx-stdjoy.joy cp "D:\Development\cc65\include/../tgi/lynx-160-102-16.tgi" . co65 --code-label _lynxtgi lynx-160-102-16.tgi cc65 -t lynx -Oirs resident.c make[1]: Leaving directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/resident' make -C intro make[1]: Entering directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/intro' cc65 -t lynx -Oirs --code-name INTRO_CODE \ --rodata-name INTRO_RODATA \ --bss-name INTRO_BSS \ --data-name INTRO_DATA intro.c ../sprpck -t6 -p0 -a000000 bg.bmp --------------------------- Lynx Sprite Packer Ver 1.98 © 1997,1998 42Bastian Schick Matthias Domin --------------------------- echo .global _bg > bg.s echo .segment \"INTRO_RODATA\" >> bg.s echo _bg: .incbin \"bg.spr\" >> bg.s ca65 -t lynx -o bg.o bg.s ../sprpck -t6 -p2 -a000000 title.bmp --------------------------- Lynx Sprite Packer Ver 1.98 © 1997,1998 42Bastian Schick Matthias Domin --------------------------- echo .global _title > title.s echo .segment \"INTRO_RODATA\" >> title.s echo _title: .incbin \"title.spr\" >> title.s ca65 -t lynx -o title.o title.s make[1]: Leaving directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/intro' make -C pegsolitaire make[1]: Entering directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/pegsolitaire' ../sprpck -t6 -p2 -r005002 -S010010 bd.bmp --------------------------- Lynx Sprite Packer Ver 1.98 © 1997,1998 42Bastian Schick Matthias Domin --------------------------- echo .global _bd000000 > bd.s echo .global _bd001000 >> bd.s echo .global _bd000001 >> bd.s echo .global _bd001001 >> bd.s echo .global _bd000002 >> bd.s echo .global _bd001002 >> bd.s echo .global _bd000003 >> bd.s echo .global _bd001003 >> bd.s echo .global _bd000004 >> bd.s echo .global _bd001004 >> bd.s echo .segment \"PEGSOLITAIRE_RODATA\" >> bd.s echo _bd000000: .incbin \"bd000000.spr\" >> bd.s echo _bd001000: .incbin \"bd001000.spr\" >> bd.s echo _bd000001: .incbin \"bd000001.spr\" >> bd.s echo _bd001001: .incbin \"bd001001.spr\" >> bd.s echo _bd000002: .incbin \"bd000002.spr\" >> bd.s echo _bd001002: .incbin \"bd001002.spr\" >> bd.s echo _bd000003: .incbin \"bd000003.spr\" >> bd.s echo _bd001003: .incbin \"bd001003.spr\" >> bd.s echo _bd000004: .incbin \"bd000004.spr\" >> bd.s echo _bd001004: .incbin \"bd001004.spr\" >> bd.s ca65 -t lynx -o bd.o bd.s ../sprpck -t6 -p2 -a000000 bga.bmp --------------------------- Lynx Sprite Packer Ver 1.98 © 1997,1998 42Bastian Schick Matthias Domin --------------------------- echo .global _bga > bga.s echo .segment \"PEGSOLITAIRE_RODATA\" >> bga.s echo _bga: .incbin \"bga.spr\" >> bga.s ca65 -t lynx -o bga.o bga.s ../sprpck -t6 -p2 -a000000 bgb.bmp --------------------------- Lynx Sprite Packer Ver 1.98 © 1997,1998 42Bastian Schick Matthias Domin --------------------------- echo .global _bgb > bgb.s echo .segment \"PEGSOLITAIRE_RODATA\" >> bgb.s echo _bgb: .incbin \"bgb.spr\" >> bgb.s ca65 -t lynx -o bgb.o bgb.s make[1]: Leaving directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/pegsolitaire' make -C cart make[1]: Entering directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/cart' ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o lnxhdr.o lnxhdr.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o encrypt1024.o encrypt1024.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o directory.o directory.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o title.o title.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/resident.o ../resident/resident.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/lynx-stdjoy.o ../resident/lynx-stdjoy.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/lynx-160-102-16.o ../resident/lynx-160-102-16.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/fileexec.o ../resident/fileexec.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/fileload.o ../resident/fileload.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/filedir.o ../resident/filedir.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/filehelp.o ../resident/filehelp.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/abcmusic.o ../resident/abcmusic.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/vbl.o ../resident/vbl.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/irq.o ../resident/irq.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/fadein.o ../resident/fadein.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/fadeout.o ../resident/fadeout.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../resident/soundbs.o ../resident/soundbs.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../intro/intro.o ../intro/intro.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../pegsolitaire/pegsolitaire.o ../pegsolitaire/pegsolitaire.s ca65 -t lynx -I "D:\Development\cc65\include/../asminc" -l -o ../pegsolitaire/track2.o ../pegsolitaire/track2.s make -C ../resident make[2]: Entering directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/resident' make[2]: `all' is up to date. make[2]: Leaving directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/resident' make -C ../intro make[2]: Entering directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/intro' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/intro' make -C ../pegsolitaire make[2]: Entering directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/pegsolitaire' make[2]: Nothing to be done for `all'. make[2]: Leaving directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/pegsolitaire' cl65 -t lynx -Oirs -o cart.lnx -m cart.map -C lynxcart.cfg lnxhdr.o encrypt1024.o directory.o title.o ../resident/resident.o ../resident/lynx-stdjoy.o ../resident/lynx-160-102-16.o ../resident/fileexec.o ../resident/fileload.o ../resident/filedir.o ../resident/filehelp.o ../resident/abcmusic.o ../resident/vbl.o ../resident/irq.o ../resident/fadein.o ../resident/fadeout.o ../resident/soundbs.o ../intro/intro.o ../intro/bg.o ../intro/title.o ../pegsolitaire/pegsolitaire.o ../pegsolitaire/bd.o ../pegsolitaire/bga.o ../pegsolitaire/track2.o ../pegsolitaire/bgb.o lynx.lib make[1]: Leaving directory `/cygdrive/d/development/cc65/samples/PegSolitaireV1.2/cart' cp cart/cart.lnx . Edited May 15, 2012 by Gandor Quote Link to comment Share on other sites More sharing options...
LX.NET Posted May 17, 2012 Share Posted May 17, 2012 I've checked the code of tgidemo and wonder why it's being marked as compatible for the Lynx. It contains several constructs that I believe are not supported by the Lynx and its driver. E.g. printf and inputing characters is not available, as is the driver loading (Lynx games with TGI statically link the driver). I've nearly completed a working version of the code for the Lynx. Stay tuned. Quote Link to comment Share on other sites More sharing options...
LX.NET Posted May 17, 2012 Share Posted May 17, 2012 Attached is a refactored version of the tgidemo program, which should compile for the lynx target. Changes that I have made: Removed all calls to printf Removed CheckError and DoWarning (Lynx program do not load TGI driver, but only installs it) Removed calls to cgetc and added while (!kbhit()) ; wait loops Made the screens loop around instead of exit after one round Changed TGI driver loading Fixed indentation (or broke it) Changed TGI_COLOR_ORANGE to RED Added #include <lynx.h> You can run the ROM image tgidemo.lnx (remove .txt extension) and go to the next screen by pressing Option 1 or 2 (or any other right-side key combination, such as pause, reset or flip). Some screenshots: Have fun. Let me know if you can compile it as well tgidemo.c.txt tgidemo.lnx.txt 1 Quote Link to comment Share on other sites More sharing options...
Gandor Posted May 18, 2012 Author Share Posted May 18, 2012 Awesome, thanks Quote Link to comment Share on other sites More sharing options...
+karri Posted May 18, 2012 Share Posted May 18, 2012 Nice work to get it running. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.