Jump to content
IGNORED

Making Programming the Lynx a little Easier


Turbo Laser Lynx

Recommended Posts

*Edit: Added list of tools here: http://atariage.com/forums/topic/256753-atari-lynx-programming-tools-and-tutorials-wip/

 

Actually I've been thinking again if there would be some ways I could help making the Lynx development process a little bit easier (together with the people here preferrably) for tinkerers, artists and musicians / (knuckleheads like me), not being a great programmer or engineer myself. With the goal to get more fun games and demos onto the Lynx.

 

I've been following the AtariAge Lynx forum for 13 years now and I've seen quite a few people interested in Lynx programming and Lynx music come and go, probably because it's fairly hard to get everything needed for a game done on the Lynx.

 

I guess it might be blasphemous to some not wanting to (or being able to) understand every detail of the Lynx hardware, learning to code low level C or assembler etc. I know that's the interresting part for many that are programming in their spare time, but there's a charm too if you just can pick something up and start creating a game/demo. I got all fired up creating something for the Lynx again (and a little bit envious too) when I found this fun and simple, yet super inspiring fantasy console pico-8. It's such a fun package, sprites, maps, music, sfx and programming ready when you turn the thing on. Just look at how many fun games they already have going on:
I mean we have all that for the Lynx too because many talented persons have contributed to the Lynx scene, but all the documentation and all the tools are so spread out. Just bringing the stuff more together could help. LX.NET's tutorial is really great and detailed but still very technical. I also read that the pocketchip-hardware isn't that great for playing the games so making something for a real old-school console with kick-ass hardware (the Lynx) is obvioulsy more exciting.
I was thinking of starting a thread here in the programming forum to bring all the tools and compilers and stuff together in an as simple as possible manner to understand and get going. Maybe just for setting things up for creating small game demos (if even only 64k ram games for starters). I had a really great time creating a bunch of mini-games/demos some ten years ago, pretty much only caring about the main game loop and creating some music and sfx with abc-music, everything conveniently in one or two files! ;D
*Disclaimer: I'm not asking for you, the talented programmers to give us, the tinkerers the fish without learning how to fish at all, just an idea of collecting everything to display in a simple manner and perhaps building some super awesome Lynx programming starter kit / template. :grin:
**One thing that also could be really helpful for non-engineers to learn is how to react to change. For example personally I've had to learn everything from scratch everytime I've wanted to program something for the Lynx probably because of some small changes and updates in the compiler etc. I don't know how to compile some of my old demo games anymore or how to conform them to the newest version of cc65. Are the only ways to do this to compare old and new code and reading the code for the compiler and tools, or is there some simpler "official" way to following up on updates? I mean it's easy for modern stuff where you can just google everything but...
P.S. As a curiosity I found the Panther IDE for lynx by laurens simonsis from 1998 when I was digging in my old Lynx files, I wonder how far he got on that, and what you could do with it? Did anyone try it out back then?
P.S.S.
Do I have this right:
BLL - Behind Lynx Lines for assembler
newCC65 - the first version of CC65 for the Lynx
CC65 - Karri's/the newest version of CC65 (Should this version be named something specific so you don't always have to wonder which version someone is talking about?)
P.S.S.S. Does someone know if it's possible to edit posts/threads indefinitely? (Needed for tools/tutorial list-thread).
P.S.S.S.S. @sage Please don't reply "Sound good. Please reserve some for me." haha :grin:
Edited by Turbo Laser Lynx
  • Like 1
Link to comment
Share on other sites

Thanks for the effort, it's definitely tough to get started. I'm still trying to wrap my head around some of the concepts too (as well as becoming accustomed to C), so I'm right there with you. I felt the same where LX.net's tutorials are a life saver, but at the same time seems to be missing some things that tie it all together. I'm not sure I'm in any position to help, but definitely willing.

Edited by pixelperfect
Link to comment
Share on other sites

I've been thinking about (and doing a little) Lynx programming all these years, and gotten a lot of help from the nice community here, so I thought I'd try to help some too, but yeah, it's harder to know how to help when not knowing dat low level coding.

 

Also I realised that top post was a lot of rambling but didn't really specify any goal haha. I think a quickstart tutorial that encompasses everything a game needs would be really useful for starters, maybe even simpler setups would be possible in the future. An automagic installer of all the stuff or something.

 

Basic quickstart guide:

- installing cc65 (win/linux) and / or newcc65 (win)

- empty game template with introscreen (image), game (moving a sprite around), (maybe game over).

- Music.

- adding one more image (enemy?) to the game and compiling.

(- cart memory segment loading)

 

Obviously PegSolitaire already does most of this (and also loads segments) but I think even a more basic one would also be good to have.

 

I'm working on a new demogame now, I've taken out most stuff from pegsolitaire and from that I'm going to try to put together an empty game template and put together that "quickstart" guide for cc65 (and maybe newcc65 too) These would focus on fun and easy just so anyone can set everything up fast and start programming high level C in the game loop and create some small games.

 

Thanks for joining in! :) I agree that LX.NET's tutorial is fantastic and one big piece of the Lynx programming puzzle that was missing before.

 

I found quite a lot of stuff in an older thread that I had forgotten about. I think the idea that Karri mentioned in one thread would be really good, that there's one frozen stable version for "ordinary programmers" as he kindly puts it. :-D I think most of this has already come to realization.

 

From the thread "Porting ComLynx Epyx Redeye code to cc65" http://atariage.com/forums/topic/229015-porting-comlynx-epyx-redeye-code-to-cc65/?hl=+redeye

True. The problem is just that separate files get lost during the years. It would be nice to have a special fork of cc65, bll, sprpck, lyxass, fonts, handymusic, chipper, redeye, docs, tutorials, games and forums in one place. Somewhere to be easily found.

 

 

 

The most important thing would be a git repository that could be accessed like

git clone https://git.atariage.com/lynx/redeye.git
cd redeye
# Start working on the project

 

And then we add new tools to the pinned LX.NET Programming tutorial page.

Stable set of tools for developers

 

Stable release 2014:

C-compiler (cc65 linux) (cc65 windows) (cc65 source package)

Extra fonts (cc65 sources)

Redeye packet communications for ComLynx (cc65 sources)

LX.NET tutorials for programming the Lynx (eBook) (http://atarilynxdeveloper.wordpress.com/2012/04/05/programming-tutorial-part-1getting-started/)

Links for user created games with free sources that can be studied. Perhaps there coul be a git repository for contrib stuff as well

(https://git.atariage.com/lynx/contrib/Solitaire) (download lnx image)

(https://git.atariage.com/lynx/contrib/Shaken) (download lnx image)

 

At some point in time we may create a new set of stable tools. But I assume that the set stays pretty stable for a loooong time. So to Shawn, ordinary programmers need a stable tool that works for years. It is not "forked" just "frozen".

 

Stable release 2020: would then come next.

Edited by Turbo Laser Lynx
Link to comment
Share on other sites

I think the installer is a fantastic idea! It could seriously simplify things for beginners. Then they'd only need to install VS 2010 or 2012 and this custom installer. I'm thinking it would:

 

- Install latest CC65 + CC65 Tools + Unix Tools + Handy 0.9

- Add needed Environment / System variables

- New Game template (basic needed .maks + template .c file to display a simple "Hello, World")

- Sample Projects

- Documentation for CC65

- Offline PDF/HTML version of LX's tutorials

- CC65 Source code

 

And then of course some sort of Introduction / Getting Starting instruction to go along with it.

Edited by pixelperfect
  • Like 1
Link to comment
Share on other sites

Perhaps you guys can collaborate together in that Turbo creates a real idiots guide to programming and LX can go into the nitty gritty details of why, how and when. I'd love to be able to tinker with an engine and modify sprites etc but even that is quite tricky because it asks for an older version or doesn't compile etc etc. I'm sure there are lots of people like me that would like to get something running on real hardware but it's very tricky to understand at the best of times.

I'll keep my fingers crossed ?

Rgds BadPricey

Link to comment
Share on other sites

BadPricey: Sounds like you are the target audience, so it'll definitely be a big help if you go over whatever we throw together as a sanity test!

 

LX: With the installer maybe the first part of your guide can be simplified, and maybe a little more overview like Turbo was thinking. For instance, I don't think it's mentioned anywhere what CC65 actually is. I do see you give two other options on Part 2, but it might be worth explaining that it compiles C code to Assembly for you. Also, I think I remember reading you don't need the environment variables with the latest CC65, is this true or am I misremembering? I will try to find where I read that.

 

I can start putting together the installer and Visual Studio template, but I guess the next question is what version of CC65 do we go with? It may be a little painful, but maybe the best option is go with the newest and if something doesn't work then it will just have to be fixed. It doesn't seem like a great idea for the long run to use an older version, but I haven't been around enough to know why everyone is sticking with 2014 and older versions.

Edited by pixelperfect
Link to comment
Share on other sites

The newer versions of cc65 produced larger code and had too many bugs. Especially with segments. There is also lots of other interests in where to develop the graphics. Sprites are very Lynx specific things.

The changes I wanted to do were not accepted in a way that made me uncomfortable. So I just decided to stay with the last known good compiler.

You may also notice that additions like chipper sounds go to a different repository. The cc65 compiler is just frozen in time - not branched to a different direction.

If some brave soul wants to go with the latest version it is ok. But the ride may have a few bumps.

Edited by karri
Link to comment
Share on other sites

OK, understood! I can see with CC65 supporting so many platforms then Lynx gets the short end of the stick so to speak. So which version do you recommend?

 

The only problem I can see rolling with the older is problems like Jungle Jack had where the cart info is incorrect and needs fixed to work with flash cards. Would it make more sense then to branch our own official Lynx CC65 version that can be maintained? At least then you don't have to fight with them, and the community would be less fractured on what to use. If newcomers are grabbing a newer (more broken) version and the old pros are stuck back in 2004 or whatever, it kinda creates a rift where neither is benefiting from the other, and frustration and ambiguity are guaranteed to follow.

Edited by pixelperfect
Link to comment
Share on other sites

We have an open group-repository (free up to 5 developers) called atarilynx at bitbucket. My suggestion is to create new development like chipper, TailChaos music, Redeye etc into separate libraries under lynx/contrib. In that way we keep the door open for moving to a new cc65 version if they make significant improvement.

Edited by karri
Link to comment
Share on other sites

The wrong cart info is my fault. It needs to be corrected in the atarilynx repository. The 2nd bank should have blocksize as 0.

The file is in lynx/tools/cc65/libsrc/lynx/exehdr.s in case some developer with access wants to fix it.

I am playtesting the final episode of a Lynx game at the airport right now. Top secret stuff. I just completed it for the first time :) Only took 2 evenings plus most of the flight.

Edited by karri
Link to comment
Share on other sites

Nice seeing things moving, how exciting! ^^

 

@pixelperfect I think what you listed in the installer sounds perfect, but I would say that's even "the real deal" and not only a guide for beginners. Really nice of you to start trying to put it together!
I'm also in the target audience my self in many ways haha. I wanted to setup the newer CC65 on my windows machine (without visual studio) but the whole thing didn't run in a usable way, but I managed installing it on my Raspberry Pi, and then Karri also made a pre-installed raspi image with cc65 and retropie for those who joined the cart-burner kickstarter project.
There's probably a difference in how people learn these things. Personally I always need examples of the low level stuff that I can re-use and then just build my own games in high level C to create Frankenstein monsters from the puzzle pieces (I know that's not really real programming), and when bumping into problems it is now a days easier to overcome problems because of LX tutorials.
I'm slightly dumbfounded how to help in the best way at the moment since I haven't been using the visual studio setup myself. I'll need to think about learning it, because I'm pretty happy now when I got the raspi setup running. I guess it should be possible to "port" games just changing the makefiles?
Anyway I would at least want to help put together a basic "empty" action/arcade game tutorial. (Well obviously it would be based on pegsolitaire by ninjabba which is based on Karri's templates/setups, so I'm not trying to steal the credit, just want to put together something that's easy to build games from).
@Karri, do you remember on the premade pi image, is CC65 the stable version from 2014 or a newer one? Is there a big difference handling the segments in the different versions since they're very central when wanting to make complete games later on?

 

I am playtesting the final episode of a Lynx game at the airport right now. Top secret stuff. I just completed it for the first time :) Only took 2 evenings plus most of the flight.

 

Congratz! Looking forward to it.

 

Excellent work and ideas. I have soms Time This weekend and will update /expand the getting started part. Also thinking of rewriting some of the tutorial. Or expand it with missing topics. What do you guys think?

 

@LX (Since you asked) One idea would be a tutorial how to use the dev-handy emulator and what it's good for (if it is useful). Another idea would be a minimal step by step tutorial for loading segments (for completed games). I really think I got it this time when reading about the memory, segments and carts, but I haven't added a another level/game to my cart yet myself (if I understood it correctly pegSolitaire loads the intro and the game in the same memory, so I should be able to add one more part there).

 

Btw I wanted to write you a program because you've written the tutorial: :D

10 Print "THANK YOU!"
20 Goto 10
RUN
Edited by Turbo Laser Lynx
Link to comment
Share on other sites

Wookie had a very nice set of Lynx pages with small tutorials alsa. Unfortunately the pages got hacked and he took them down. I also have code for signing/decrypting carts using OpenSSL. They could also be saved in case someone wants to encrypt his cart. Not much point in it as the RSA keys were found.

Link to comment
Share on other sites

We have an open group-repository (free up to 5 developers) called atarilynx at bitbucket. My suggestion is to create new development like chipper, TailChaos music, Redeye etc into separate libraries under lynx/contrib. In that way we keep the door open for moving to a new cc65 version if they make significant improvement.

 

So, then the version of CC65 in tools/CC65 I take it is the frozen 2014 version you're using? If that's the case then it sounds like you might already be ahead of me then. I mean trust me, I'm not trying to make waves, especially as a newcomer. My only thought is if there's any hope of the community growing everyone needs to be on a similar platform where problems can be ironed out as more people give feedback, and things continuously improve.

Link to comment
Share on other sites

Yes. We had some discussions on AtariAge and agreed to use this version for now. I believe it was 2.19.4 or 6 or 9. The last snapshot that Uz made.

Anyway. At bitbucket.org there is this atarilynx repository. The compilers are at lynx/tools and the rest at lynx/contrib.

The repository is owned by the group who wants to work with it.

Edited by karri
Link to comment
Share on other sites

OK, so if its a literal snapshot nothing is being done to it if problems are found? I mean the reality is, if I make an installer over time it will probably just end up as another option that confuses and splinters things even more. I think it's a great idea to get all the main libs together in one place though - the more organization the better.

 

Honestly, I don't really feel like I know the state of things well enough to handle this. It is indeed very nuanced, and now just finding your repo makes me scratch my head on what to do even more haha..

Link to comment
Share on other sites

I got a bit confused now too haha, obviously we wouldn't want things any more fragmented, and the repo is great and in most ways already contains all that we need. But you have to understand how a real pro programmer works to use it all properly. Karri's been the one who's always helped me the most here over the years too, so I'd like to work with him. Maybe there's some good book on general linux programming workflow. I barely know what a repository is and I've seen the guys at work swear in git haha.

 

But wouldn't it be possible to have makefiles for both win and linux in the examples? Or are there other differences too? I mean then it would at least be possible to build something beginner-friendly on top of everything without causing fragmentation.

 

I wonder if Wookie could give us some offline version of the tutorials? I remember the page, but unfortunately at that point I didn't test the tutorials.

Edited by Turbo Laser Lynx
Link to comment
Share on other sites

So I had an (actual) dream the other night of the LDK - Lynx Development Kit (this hasn't been used has it? dreams are never wrong ;). It was pretty much similar to the installer described above, but reminded me of MonoGame a bit where it came in a single versioned package with everything you need and everyone worked together to continually improve it, fix bugs, create tutorials and samples, etc. I think this would remove pretty much 90% of the confusion for newcomers, and also hopefully get everyone else on the same track so to speak.

 

karri, it sounds like your bitbucket repo is the perfect solution given what I know now. I think the next step for me is figuring out how to compile the latest for Windows. The LDK could be on any platform, but my Mac machine is down right now and I'm not that familiar with Linux, so I will naturally focus on Windows first. Anyway, if this sounds like an idea people are interested in let me know..

Edited by pixelperfect
Link to comment
Share on other sites

pixelperfect, sounds like a good idea. Most Linux like targets create deb-packages of all these tools when you compile it. We could collect these packages into the Download section in bitbucket. I normally create Raspberry Pi versions and AMD64 versions. LX knows a lot about Windows. He may have some suggestions - I hope.

Link to comment
Share on other sites

Wow, seems like a bit of unexpected importantness an my part.

Well, I think a couple of things:

  • Enabling the community: whatever you devs think is needed is most valuable to provide.
  • A couple of years ago I made the decision to switch to my toolstack. That is Visual Studio and the tools accompanying it. Most noticeably it meant switching to NMake.exe instead of make.exe. As it turns out, the switch to NMake wasn't strictly necessary. It is now even limiting the cross-platform story of our CC65 tools. So, I will probably switch back to make.exe and makefile files, instead of the nmake.exe and the *.mak files. That should make the source code (cc65 files and such) editor tool agnostic again. It will allow each developer to choose his toolstack (Visual Studio 2015, Visual Studio Code, CodeBlocks or simply vi or emacs) and operating system (Windows (required for VS2015), Linux, Mac OSX).
  • How about doing a webcast to share some knowledge, insights, techniques, ask questions and so on? We could do a Skype, Google Hangouts or any other voice and screen sharing platform. I am willing to volunteer as presenter for the first session and see whether there is interest in this and if it is useful.

 

What say you, devs? :)

  • Like 2
Link to comment
Share on other sites

Sounds great!

 

I'm not super familiar with these compilers but if its cross-platform then it definitely sounds like a step in the right direction. If you can give me some directions I can try to get switched over to make.exe on my end.

 

Also, any thoughts on how to get karri's CC65 compiling for Windows?

Edited by pixelperfect
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...