Jump to content

Photo

Hello, (Graphical) World!


12 replies to this topic

#1 pixelmischief OFFLINE  

pixelmischief

    Stargunner

  • 1,280 posts

Posted Wed Apr 1, 2015 11:56 PM

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.

 

Attached File  COLRCYCL.zip   2.6KB   29 downloads


Edited by pixelmischief, Wed Apr 1, 2015 11:59 PM.


#2 shazzner OFFLINE  

shazzner

    Combat Commando

  • 9 posts

Posted Thu Apr 2, 2015 10:48 AM

Very cool! Do you have any links/resources on C programming for the Atari ST?



#3 joyfulcoder OFFLINE  

joyfulcoder

    Star Raider

  • 96 posts
  • Location:Western Mass

Posted Thu Apr 2, 2015 2:21 PM

Nice job.  I will have to spend more time with Pure C.



#4 mattlacey OFFLINE  

mattlacey

    Star Raider

  • 83 posts
  • Location:Melbourne, Australia

Posted Mon Apr 27, 2015 10:51 PM

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).



#5 pixelmischief OFFLINE  

pixelmischief

    Stargunner

  • Topic Starter
  • 1,280 posts

Posted Wed May 6, 2015 1:40 PM

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 by pixelmischief, Wed May 6, 2015 1:41 PM.


#6 Justin Payne OFFLINE  

Justin Payne

    Dragonstomper

  • 860 posts
  • Busy updating XEGS Podcast website to Angular6
  • Location:Kent, Washington, USA

Posted Wed Jun 3, 2015 6:59 PM

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. :-D  I will start to work on my game and let's see what we can accomplish on our own.



#7 Justin Payne OFFLINE  

Justin Payne

    Dragonstomper

  • 860 posts
  • Busy updating XEGS Podcast website to Angular6
  • Location:Kent, Washington, USA

Posted Wed Jun 3, 2015 10:48 PM

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.

  1. I think it's good practice to free up your malloc'ed memory when finished with it. Like after the VsetScreen()
  2. 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.



#8 pixelmischief OFFLINE  

pixelmischief

    Stargunner

  • Topic Starter
  • 1,280 posts

Posted Sat Jun 6, 2015 5:09 PM

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. :-D  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.



#9 mattlacey OFFLINE  

mattlacey

    Star Raider

  • 83 posts
  • Location:Melbourne, Australia

Posted Sat Jul 25, 2015 5:58 AM

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? :)



#10 calimero OFFLINE  

calimero

    Chopper Commander

  • 237 posts

Posted Sun Aug 2, 2015 2:31 AM

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 :)

#11 Fletch OFFLINE  

Fletch

    Stargunner

  • 1,064 posts
  • Location:Pennsylvania

Posted Mon Aug 3, 2015 10:56 AM

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 :)



#12 MikeFulton OFFLINE  

MikeFulton

    Space Invader

  • 48 posts

Posted Thu Nov 19, 2015 9:12 AM

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.



#13 calimero OFFLINE  

calimero

    Chopper Commander

  • 237 posts

Posted Thu Nov 19, 2015 10:29 AM

^

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).






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users