pixelmischief Posted April 2, 2015 Share Posted April 2, 2015 (edited) Recently, I started a development project on the Atari Falcon. Getting up and running was a serious challenge. Among the more difficult aspects of this challenge was figuring out how initialize the Falcon graphics hardware and push pixels onto the screen. Now that I have gotten over that hurdle, I'd like to offer my fellow beginners some guidance. Attached is a Pure C project and source file that do pretty much exactly as I described above. They set the screen up for 320x240 true color mode and cycle through the colors, painting the entire screen at each iteration. This code was compiled on Aranym and run tested on both Hatari and a real Falcon. The compiled PRG is included as well. COLRCYCL.zip Edited April 2, 2015 by pixelmischief Quote Link to comment Share on other sites More sharing options...
shazzner Posted April 2, 2015 Share Posted April 2, 2015 Very cool! Do you have any links/resources on C programming for the Atari ST? Quote Link to comment Share on other sites More sharing options...
joyfulcoder Posted April 2, 2015 Share Posted April 2, 2015 Nice job. I will have to spend more time with Pure C. Quote Link to comment Share on other sites More sharing options...
mattlacey Posted April 28, 2015 Share Posted April 28, 2015 Awesome stuff! Will have to get this onto my Falcon this week. I started coding on the machine myself last year in assembly and hit the same issues WRT to setting up the video modes etc. I hit up Laurent (Thados) and he told me he'd used the Dead Hacker's Society demo framework to sort things out for his games so I've started down that route. Will be interesting to play with the C code though. I'm trying to make a columns clone at the moment but have a bug that crashes the machine. It's getting a bit tedious because I know what code is causing the crash but can't see anything wrong with it, and so far haven't had luck getting debuggers working (though trying with Hatari ATM). Quote Link to comment Share on other sites More sharing options...
pixelmischief Posted May 6, 2015 Author Share Posted May 6, 2015 (edited) Dead Hackers' stuff and Reservoir Gods' GODLIB are both positively brilliant. And there's the problem. For a beginner, they are simply too brilliant. Learning to use those libraries as a beginner is like learning to fly the space shuttle when what you really wanted to understand was rocket propulsion. The former would be just as difficult as the latter, without actually accomplishing the objective. It sounds to me like your journey is at an advanced enough stage to benefit from library support. I look forward to being there myself. =) Edited May 6, 2015 by pixelmischief Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted June 4, 2015 Share Posted June 4, 2015 OK. You have laid down the challenge and that challenge is, get off my butt and do what you're doing. You're a great motivator. I will start to work on my game and let's see what we can accomplish on our own. Quote Link to comment Share on other sites More sharing options...
Justin Payne Posted June 4, 2015 Share Posted June 4, 2015 Couple things I thought about while looking at your code. Of course, it's a simple demo and an opportunity to learn so let's take it for what it is but a couple things came to mind. I think it's good practice to free up your malloc'ed memory when finished with it. Like after the VsetScreen() I think it's also a good idea to ensure malloc isn't null. #2 isn't really an issue since you probably have tons of RAM but since there is a chance that someone has limited RAM and has replaced the stock desktop, I know I ran out of RAM pretty quickly with my limited 4 megs. I always try to make my programs fail gracefully. Of course, my C is pretty rusty so I might be overly concerned. Quote Link to comment Share on other sites More sharing options...
pixelmischief Posted June 6, 2015 Author Share Posted June 6, 2015 OK. You have laid down the challenge and that challenge is, get off my butt and do what you're doing. You're a great motivator. I will start to work on my game and let's see what we can accomplish on our own. I am thrilled to hear it. When Albert agreed to create this programming-specific subsection, I had high hopes for encouraging activity here. Glad to see some traction. My own project has been stalled recently, but I think it is now YOU who have inspired ME. Let's keep in touch on it. Quote Link to comment Share on other sites More sharing options...
mattlacey Posted July 25, 2015 Share Posted July 25, 2015 This may work, or may fail spectacularly (I'm really struggling to find free time right now, just had a baby arrive) but maybe a joint game project would go a long way to help with motivation? Quote Link to comment Share on other sites More sharing options...
calimero Posted August 2, 2015 Share Posted August 2, 2015 Long time ago I start to make Wet game for Atari: Http://wet.atari.org I code in GFA basic and everything was smooth until I want to use Falcon hi-resolution, I try and eventualy gave up ciz GFA basic does not have built in support for Falcon resolutions. I figure out that C would bi right path but I never try it. Now, seeing that you are starting to learn and use C maybe I will give it a shoot Quote Link to comment Share on other sites More sharing options...
Fletch Posted August 3, 2015 Share Posted August 3, 2015 Long time ago I start to make Wet game for Atari: Http://wet.atari.org I code in GFA basic and everything was smooth until I want to use Falcon hi-resolution, I try and eventualy gave up ciz GFA basic does not have built in support for Falcon resolutions. I figure out that C would bi right path but I never try it. Now, seeing that you are starting to learn and use C maybe I will give it a shoot I wasn't expecting such a mature game Quote Link to comment Share on other sites More sharing options...
MikeFulton Posted November 19, 2015 Share Posted November 19, 2015 Long time ago I start to make Wet game for Atari: Http://wet.atari.org I code in GFA basic and everything was smooth until I want to use Falcon hi-resolution, I try and eventualy gave up ciz GFA basic does not have built in support for Falcon resolutions. I figure out that C would bi right path but I never try it. Now, seeing that you are starting to learn and use C maybe I will give it a shoot Reasonably, if you're doing a game where screen refresh rate is an issue, you probably don't wanna be doing it with GFA Basic. But even in C, you're probably not going to use VDI for drawing anything. You're going to want to manipulate the screen buffer directly, using the 68000 and blitter. Quote Link to comment Share on other sites More sharing options...
calimero Posted November 19, 2015 Share Posted November 19, 2015 ^ I used GFA basic routs for blitting graphics around RAM and it was reasonably smooth on ST (Wet game is manly static, there are just few sprites per screen). 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.