Turbo Laser Lynx Posted September 5, 2016 Share Posted September 5, 2016 (edited) Atari Lynx Game Development Tools and Tutorials (work in progress) This thread is for collecting all Atari Lynx programming tools and tutorials in one place. *Work in progress* *Please post in this thread if you want me to add something to this top post* Toolchains for Lynx programming *What are the pros and cons of the different setups? Please help me add reasons for using a specific setup - BLL (Behind Lynx Lines) kit from Bastian Schick (mostly assembler) - http://www.monlynx.de/lynx/bll.html - I think both version of CC65 still uses things from BLL - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - newCC65 (C and assembly) - Despite its name, this is the older version of cc65 for the lynx. Apparently it is a patched version of the cc65 from back in the 90s (how amazing/fun is that!), but it's still easy to set up and works just fine for creating Lynx games. - Easy to set up on Windows if you don't want to do Linux. (I've had it running on XP and 8.1) I will put up windows version somewhere. - todo: add link(s) - todo: Simple tutorial for setting up on Windows - sage has created many great tools for this version and still does. Chipper, HiColor Engine, Slideshow builder etc. http://lynxdev.atari.org - Note: sage's remarks on chipper and the BLL kit: http://atariage.com/forums/topic/256753-atari-lynx-programming-tools-and-tutorials-wip/?p=4012070 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - CC65 "Remake" / "Karri's CC65". (C and assembly optional) - https://bitbucket.org/atarilynx/lynx - One of the great things about this version are the template(s) and make files that exist for this version, they pretty much make it a small game development framework for the Lynx in C. - Another great thing about this version is that the template features a system for loading data from a Lynx cartridge (which is hard to set up). This means that you can for example add levels to your game and load them from cart, in other words build bigger games. - Mini Manual: http://atariage.com/forums/topic/277916-berzerkoids-alpha/?p=4011451 https://atarilynxdeveloper.wordpress.com/2012/04/07/programming-tutorial-part-2development-environment/ - Easy to set up on Linux / Raspberry Pi. http://atariage.com/forums/topic/256753-atari-lynx-programming-tools-and-tutorials-wip/?p=4011786 Templates for CC65 "Remake" / "Karri's CC65": Karri's newest template here: http://atariage.com/forums/topic/287147-is-10-fps-a-too-low-framerate-for-a-lynx-tile-based-game/?p=4202302 Starting point for a complete game that's loading in new parts (segments) from cart to ram Old thread: http://atariage.com/forums/topic/262927-cc65-template/ Karri's newest template with addons from Nop90: http://atariage.com/forums/topic/290138-karris-cart-template-with-some-addons/?p=4256410 About carts, memory and files from LX.net's tutorial series: https://atarilynxdeveloper.wordpress.com/2013/12/30/programming-tutorial-part-15memory-and-segments/ https://atarilynxdeveloper.wordpress.com/2014/09/10/programming-tutorial-part-18files/ - Karri among others have been updating this version and creates great tools for it. - Chipper also exports for this version of CC65 (thanks sage!) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Official up to date CC65 - Some of the guys on this forum have been using this version of CC65 too, but I'm unsure of the level of support this version has here for the Lynx. I think you have to build up a lot from scratch yourself when using this. - LX.net tutorial for setting it up on Windows with Visual studio - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 8-bit Unity - A high level cross development tool for various 8-bit systems including the Lynx. - Todo: Write more details about it. I'm not well versed about it at the moment, but it looks really fab! https://www.youtube.com/channel/UC1JehkCjK5MW0CtJe9YY-Lg/videos http://8bit-unity.com/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Graphics: - Tiny Sprite Editor for Lynx: http://atariage.com/forums/topic/273118-tiny-sprite-editor-for-lynx/?p=3911758 - Gimp seems to be really nice these days https://www.gimp.org/ works nicely for Lynx graphics. - Aseprite. Costs 14,99$ but is a joy to use for pixel art and supports indexed colours etc. https://www.aseprite.org/ - The Lynx palette is not so easy to understand if you have no experience of 12-bit indexed palette colours. Fortunately LX.net has written a nice tutorial about that too: https://atarilynxdeveloper.wordpress.com/2012/04/25/programming-tutorial-part-6colors/ - Nifty palette code generator by necrocia: https://atarigamer.com/pages/atari-lynx-palette-generator Creating music for Lynx games: - Chipper, a tracker for Lynx http://lynxdev.atari.org - Note: Chipper can export songs/code for all the usual 'tool chains': BLL LyxAss, NewCC65 and CC65 "Remake" - Chipper getting started guide: http://atariage.com/forums/topic/256753-atari-lynx-programming-tools-and-tutorials-wip/?p=4137925 - add documentation / more documentation would be needed - can convert simple mods to Lynx - abc music, ascii notation for creating Lynx music and sfx (there should be versions both for newcc65 and cc65 remake). - all versions available in the Lynx bitbucket: https://bitbucket.org/atarilynx/lynx - documentation / my notes (File attached) - HandyMusic driver http://atariage.com/forums/topic/184944-handymusic/ - Documentation and/or a tutorial needed http://www.tailchao.com/Audio/index.php#HandyMusic Hardware: Cartridges for testing your game on real Lynx Hardware: - Lynx Flashcartridge RetroHQ: - Menu for RetroHQ sd cart: http://atariage.com/forums/topic/253167-retro-hq-sd-cart-menu-14/ - Lynxman's Flashcard: http://atariage.com/forums/topic/159711-flashcard-information-and-news/ Cartridge programmer: - Karri's cart burner/programmer for producing real Lynx cartridges of your games: http://atariage.com/forums/topic/236146-programming-the-lynx-for-a-living-blank-carts/ - todo: add up to date link to 3D print for the cart Comlynx multiplayer: - Creating a Comlynx to USB cable: https://atarilynxdeveloper.wordpress.com/2013/10/21/creating-a-comlynx-to-usb-cable/ - Redeye Comlynx code: https://bitbucket.org/atarilynx/lynx Emulators for testing: - Handy 1.9x with better sound. GadgetUK fixed some of the broken sound issues on Handy, cheers! (File attached) - Note: Some remarks to handy sound: http://atariage.com/forums/topic/256753-atari-lynx-programming-tools-and-tutorials-wip/?p=4012070 - Developer Handy (a tutorial how to use it would be great). Add Link. - mednafen - A cross platform handy debugger by obschan: https://github.com/LLeny/VkHandybug Tutorials: LX.net's excellent Atari Lynx Programming Tutorial (Windows/Visual Studio) Pinned in this forum. This tutorial really covers a big area of Lynx programming: https://atarilynxdeveloper.wordpress.com/series/atarilynxprogrammingtutorial/ Atari Lynx Programming Resources on Atarigamer.com https://atarigamer.com/pages/atari-lynx-programming-resources Atari Lynx original developer documentation: Text online: http://www.monlynx.de/lynx/lynxdoc.html Scanned: https://atariage.com/Lynx/archives/developer_docs/index.html?SystemID=LYNX CC65 Tips: - CC65 coding hints https://cc65.github.io/doc/coding.html - Portable and Optimized C for 8-bit Systems https://github.com/Fabrizio-Caruso/8bitC/blob/master/8bitC_ENG.md - Advanced optimizations in CC65 - ca65 assembler and da65 disassembler compability tip: http://atariage.com/forums/topic/256753-atari-lynx-programming-tools-and-tutorials-wip/?p=4208216 --add-source switch in cc65 for looking into assembly files created by the compiler: http://atariage.com/forums/topic/256753-atari-lynx-programming-tools-and-tutorials-wip/?p=4208220 Other Links: Atari Lynx bitbucket, tools and contributions: https://bitbucket.org/atarilynx/lynx (Download repository) Sage's Lynx page: Chipper, HiColor Engine, Slideshow builder etc. http://lynxdev.atari.org *Edit 20.4.2018 - Added Raspberry Pi CC65 installing instructions - Added Karri's CC65 'Mini Manual' *Edit 21.4.2018 - Added Karri's notes on Raspi installation - Added sage's remarks on chipper, the BLL kit and Handy Sound *Edit 24.9.2018 - Added Tiny sprite editor and Aseprite under Graphics *Edit 10.10.2018 - Added Links to Atari Lynx original developer documentation *Edit 20.10.2018 - Added Chipper notes - Added Chipper getting started guide *Edit 21.1.2019 - Added link to Karri's newest cc65 game template *Edit 29.1.2019 - Added links to CC65 Tips *Edit 28.3.2019 - Added link to necrocias palette generator *Edit 14.4.2019 - Added link to Karri's newest template with addons from Nop90 *Edit 29.4.2019 - Added link to Atarigamer.com Atari Lynx Programming Resources *Edit 9.8.2020 - Misc small corrections and additions - Added links to cc65 optimisation hints - Added 8-bit unity *Edit 15.11.2023 - Added cross platform handy debugger by obschan. Handy0.971.zip Lynx abc music notation.txt Edited November 15, 2023 by Turbo Laser Lynx - Added cross platform handy debugger by obschan. 1 Quote Link to comment Share on other sites More sharing options...
LordKraken Posted September 5, 2016 Share Posted September 5, 2016 (edited) Nice! I have been lost a couple of time amongst all lynx resources and tools. This is definitely useful! Edited September 5, 2016 by LordKraken Quote Link to comment Share on other sites More sharing options...
+karri Posted September 6, 2016 Share Posted September 6, 2016 A small note about Shaken. I am continuing development on this one in the trunk. If you want to compile something playable get an earlier snapshot of it. The idea is to make a real game out of this. Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted September 6, 2016 Author Share Posted September 6, 2016 (edited) @LordKraken Thanks, I'm hoping it's going to be useful to someone. @Karri I added your note. I wanted to add it to the list because it's a good example of memory segments and loading from cart to ram. To anyone who wants to try the playable version of the game: http://atariage.com/forums/topic/223176-shaken-not-stirred/?hl=+shaken Edited September 6, 2016 by Turbo Laser Lynx Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted April 20, 2018 Author Share Posted April 20, 2018 (edited) Installing CC65 on a Raspberry Pi / (Linux) from https://bitbucket.org/atarilynx/lynx Easy as pie! git clone https://karri@bitbucket.org/atarilynx/lynx.git cd lynx/tools sudo make -f Makefile.deb The install script on Raspberry Pi compiles sp65 but it does not copy the binary to the right location /usr/local/bin so that has to be done manually. *Edit *Please Note: Continues in next post in this thread or read quote right here: The script generates installable packets. You can then distribute the resulting cc65.deb and install it with sudo dpkg -i cc65.deb You also get packages lyxass and bll. The packages can be uninstalled with sudo dpkg -r cc65 Edited April 21, 2018 by Turbo Laser Lynx 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted April 21, 2018 Share Posted April 21, 2018 (edited) The script generates installable packets. You can then distribute the resulting cc65.deb and install it with sudo dpkg -i cc65.deb You also get packages lyxass and bll. The packages can be uninstalled with sudo dpkg -r cc65 Edited April 21, 2018 by karri 1 Quote Link to comment Share on other sites More sharing options...
sage Posted April 21, 2018 Share Posted April 21, 2018 Just a remarks to handy sound: Not all sound issues are finally fixed. This would requiere to rewrite some interrupt code. It alse depends a bit on the output system of the emulators host, thus mednafen and retroarch sound better than handy even so they use exactly the same code. The main changes in hand 0.97xxx and/to 0.98 are proper stereo and attenuation as well as experimental eeprom support. as well as getting rid of the boot rom and loading plain roms (wo lnx header). Remark to chipper: Event so chipper originally was written for the BLL sound driver, it export now to a modified BLL and TailChao music driver. Remark BLL kit: What you find on my site, are updates to the bll code and tools. E.g. lyxass does not compile for 64 bit systems and makes problems with newest compilers. But its correct that example ocde is only for old cc65 and bll. 1 Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted April 21, 2018 Author Share Posted April 21, 2018 Thanks for adding info guys! Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted October 20, 2018 Author Share Posted October 20, 2018 (edited) Chipper - Getting Started Guide Download Chipper v.1.7.6 from sage's site: http://lynxdev.atari.org You might also want to download the 'HiColor Slideshow Builder' from his site, that might contain more instruments and example songs etc. - Note: Chipper can export songs/code for all the usual Lynx programming 'tool chains': BLL LyxAss, NewCC65 and CC65 "Remake" Chipper features/windows: - Tracker - Simple Instrument (Instrument/sound creation) - Sorted by wavelength (list of all possible waveforms) - Timeline - Waveform editor creator - Envelopes (tremolo, vibrato, waveform) - Effect Editor - Mod to lynx converter Quick Start: 1. Eye through some general tracker basics, for example here: http://wiki.openmpt.org/Manual:_Basics 2. In every row of every column there's three cells where you can put in: - CELL1: the number of the simple instrument you're going to use for that note. (This is really smart 'cause you can get a lot of stuff done with only four channels). - CELL2: the note or nothing (a pause) - CELL3: the part of the song in the playlist 3. The simple instrument is for creating sounds but there's already some good sounds in the insts folder if it proves difficult to create your own instruments. 4. There's some really great songs in the demosongs folder to look at too. 5. There's demosongs, instruments, tremolos, waveforms and vibratos in the data folder Note: you put in the notes with the keys of your keyboard (I was clicking aroung with the mouse for much longer than I care to admit) Note: you can copy one track (one fourth of a song-part) just by writing in the number on a new row in the playlist, in any of the four spaces, so that's the same thing as copying all of the notes in only one of the tracks. Tracker Window: Instrument creation (Simple Instrument window) notes by Karri from 'chipper sound collection' thread. - The shifter + feedback tabs control how many states the sound has before it repeats. - My understanding is that you need to choose sounds that have an equal length to keep them in tune related to each other. - You can also choose sounds where the length is a multiple of each other. - But choosing one instrument with a length of 5 and another with a length of 6 will always produce sounds out of tune. - Some of the sounds are also symmetrical (as many 0 bits ad 1 bits in the pattern) while other are not symmetrical (the sound drifts to either max or min if you choose the integration bit on). - Chipper has both tick boxes to choose the symmetrical waveforms and some indication of the length of the sound pattern Karri's instrument collection: http://atariage.com/forums/topic/266088-chipper-sound-collection/ http://whitelynx.fi/sounds/ Simple Instrument Window: Manual for the more technically minded: I attached a pdf manual I found on the internet by cTrix^disasterarea LynxChipper-0.1-ENG.pdf Edited October 20, 2018 by Turbo Laser Lynx Quote Link to comment Share on other sites More sharing options...
+karri Posted January 27, 2019 Share Posted January 27, 2019 I wonder if it would be possible to have all these amazing tutorials as some kind of eBook for a tablet. Hosting them on the web is great, but sometimes it would be cool to have everything in this thread available locally. The graphical layout is good as it is now. 2 Quote Link to comment Share on other sites More sharing options...
Greenious Posted January 28, 2019 Share Posted January 28, 2019 This might interest some of you : http://www.chibiakumas.com/6502/ Site dedicated to Learn Multi platform 6502 Assembly Programming, covering Lynx aswell as other platforms. 2 Quote Link to comment Share on other sites More sharing options...
sage Posted January 29, 2019 Share Posted January 29, 2019 yea might be a good replacement for lyxass Quote Link to comment Share on other sites More sharing options...
+karri Posted January 29, 2019 Share Posted January 29, 2019 Actually there is also ca65 - the assembler used for cc65 programs. What is interesting here that it is compatible with da65 - disassembler. Here is a small nugget of code disassembled with da65 from RoadRiot. draw_scroll_sp: ldx #$AD ; 0587 A2 AD ldy #$27 ; 0589 A0 27 lda L1277 ; 058B AD 77 12 sta VIDBASL ; 058E 8D 08 FC lda L1278 ; 0591 AD 78 12 sta VIDBASH ; 0594 8D 09 FC stz SDONEACK ; 0597 9C 90 FD draw_sp:stx SCBNEXTL ; 059A 8E 10 FC sty SCBNEXTH ; 059D 8C 11 FC lda #$01 ; 05A0 A9 01 sta SPRGO ; 05A2 8D 91 FC L05A5: lda #$01 ; 05A5 A9 01 tsb MAPCTL ; 05A7 0C F9 FF stz CPUSLEEP ; 05AA 9C 91 FD trb MAPCTL ; 05AD 1C F9 FF lda SPRSYS ; 05B0 AD 92 FC lsr a ; 05B3 4A bcs L05A5 ; 05B4 B0 EF stz SDONEACK ; 05B6 9C 90 FD rts ; 05B9 60 In order to get highly readable disassemblys of binary blobs it has a nice feature that you can feed an info file to the da65 with what you know about the code. GLOBAL { OUTPUTNAME "init.s"; INPUTNAME "file002"; STARTADDR $0400; PAGELENGTH 0; CPU "65sc02"; }; RANGE { START $0400; END $0636; TYPE Code; }; RANGE { START $0637; END $127F; TYPE ByteTable; }; RANGE { START $27B0; END $27B3; TYPE AddrTable; }; LABEL { NAME "irq_handler"; ADDR $1280; }; LABEL { NAME "blackpalette"; ADDR $05BA; }; LABEL { NAME "swap_scroll_offsets"; ADDR $0560; }; LABEL { NAME "draw_sp"; ADDR $059A; }; LABEL { NAME "draw_scroll_sp"; ADDR $0587; }; LABEL { NAME "pixelsp"; ADDR $27AD; }; LABEL { NAME "pixel"; ADDR $27BD; }; LABEL { NAME "HOFFL"; ADDR $FC04; }; LABEL { NAME "HOFFH"; ADDR $FC05; }; LABEL { NAME "VOFFL"; ADDR $FC06; }; LABEL { NAME "VOFFH"; ADDR $FC07; }; The cc65 suite is already multi-platform. It even has multi-platform graphics conversion (sp65). 1 Quote Link to comment Share on other sites More sharing options...
+karri Posted January 29, 2019 Share Posted January 29, 2019 (edited) Don't forget the switch --add-source in cc65. If you are unhappy with the speed of your code you can always look into what kind of garbage cc65 puts out of your code. cc65 -t lynx --add-source lvl01.c This will produce a file lvl01.s where all C-lines are embedded in the assembly source. ; ; if (target_saved) { ; L0A0B: lda _target_saved jeq L0A10 ; ; if (target_health) target_health--; ; lda _target_health jeq L0A10 ldx #$00 lda _target_health pha dea sta _target_health pla ; ; } ; L0A10: rts Obviously this was garbage. So I add some optimization to the compiler. cc65 -t lynx --add-source -O3 lvl01.c This simplifies the code considerably. ; ; if (target_saved) { ; L0A0B: lda _target_saved beq L0A10 ; ; if (target_health) target_health--; ; lda _target_health beq L0A10 dea sta _target_health ; ; } ; L0A10: rts Edited January 29, 2019 by karri 1 Quote Link to comment Share on other sites More sharing options...
Turbo Laser Lynx Posted January 29, 2019 Author Share Posted January 29, 2019 Hey, thanks for adding these tips! I added links to them in the first post under 'cc65 tips'. Quote Link to comment Share on other sites More sharing options...
sage Posted January 30, 2019 Share Posted January 30, 2019 I use a patched dcc6502 for disassembly. the code produced can directly reassebled with lyxass. 1 Quote Link to comment Share on other sites More sharing options...
Igor Posted January 30, 2019 Share Posted January 30, 2019 I wonder if it would be possible to have all these amazing tutorials as some kind of eBook for a tablet. Hosting them on the web is great, but sometimes it would be cool to have everything in this thread available locally. The graphical layout is good as it is now. I've talked to several people about having a consolidated Lynx programming section over at Atari Gamer and was surprisingly met with little willingness to cooperate. I might pull info from this thread into a tutorial-like series of pages though, if only for my own benefit. Still trying to figure out how to make it easier to navigate a linked collection of pages on the website so probably should solve that first. Quote Link to comment Share on other sites More sharing options...
42bs Posted February 4, 2019 Share Posted February 4, 2019 Post increment/decrement is always a bad idea: You are telling the compiler: "I want to use the original value later." ; cc65 V2.17 - Git 88d1d20c ; ; ++b; ; ldy #$00 ldx #$00 clc lda #$01 adc (sp),y sta (sp),y ; ; b++; ; ldy #$00 ldx #$00 lda (sp),y pha ina ldy #$00 sta (sp),y pla Quote Link to comment Share on other sites More sharing options...
+karri Posted February 4, 2019 Share Posted February 4, 2019 If you use the -O flag while compiling the things look a bit different and post incrementing is better .proc _increment: near .segment "CODE" ; ; ++a; ; jsr decsp1 clc lda #$01 adc (sp) sta (sp) ; ; } ; .proc _increment: near .segment "CODE" ; ; a++; ; jsr decsp1 lda (sp) ina sta (sp) ; ; } ; Quote Link to comment Share on other sites More sharing options...
jum Posted February 19, 2019 Share Posted February 19, 2019 yea might be a good replacement for lyxass The chibiakumas stuff ( http://www.chibiakumas.com/6502/6502DevTools.php) seems to use older version of BLL / lynxass. PS: Just built lynxass 0.50 for Windows console in VS - only issue was replacing strcasecmp() with stricmp(). Quote Link to comment Share on other sites More sharing options...
sage Posted February 19, 2019 Share Posted February 19, 2019 0.50? hmm... seems someone has a independent numbering scheme? Quote Link to comment Share on other sites More sharing options...
42bs Posted February 19, 2019 Share Posted February 19, 2019 The chibiakumas stuff ( http://www.chibiakumas.com/6502/6502DevTools.php) seems to use older version of BLL / lynxass. PS: Just built lynxass 0.50 for Windows console in VS - only issue was replacing strcasecmp() with stricmp(). Did you use the version from github? https://github.com/42Bastian/lyxass Quote Link to comment Share on other sites More sharing options...
42bs Posted February 19, 2019 Share Posted February 19, 2019 The chibiakumas stuff ( http://www.chibiakumas.com/6502/6502DevTools.php) seems to use older version of BLL / lynxass. And no credit. Shame on him. Quote Link to comment Share on other sites More sharing options...
jum Posted February 19, 2019 Share Posted February 19, 2019 (edited) Did you use the version from github? https://github.com/42Bastian/lyxass No, I downloaded the version from this post (from sage) on AtariAge Lynx programming: http://atariage.com/forums/topic/259067-lyxass-updated/?do=findComment&comment=4091378 (The github version seems to be 0.44/0.45) Correction: From chibiakuma's youtube videos ("keith s" on youtube), it looks like he's using VASM. However, his 6502 toolkit download also contains BLL and lynxass (in the Sources folder). (Interestingly, it also contains my Atari 5200 emulator "Jum52" And yes, no credits, but I'm not too bothered as his toolkit is "training material" and it looks like he put a lot of work into it. Edited February 19, 2019 by jum Quote Link to comment Share on other sites More sharing options...
42bs Posted February 19, 2019 Share Posted February 19, 2019 No, I downloaded the version from this post (from sage) on AtariAge Lynx programming: http://atariage.com/forums/topic/259067-lyxass-updated/?do=findComment&comment=4091378 (The github version seems to be 0.44/0.45) Not quite. Some more fixes and changes. 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.