Jump to content

Photo

Hello World! Program- Critiques Welcome


17 replies to this topic

#1 BNE Jeff OFFLINE  

BNE Jeff

    Chopper Commander

  • 233 posts
  • Location:Virginia, USA

Posted Sat Jun 11, 2016 4:17 PM

Hi!

 

I wrote this for several of reasons.  First, to start and actually compete a program which I've never actually done- and the customary "Hello World" seemed appropriate.  Second, I wanted to be have a program I could explain to people.  So, I've avoided some of the more tedious aspects of an Atari programs if possible- such as fine-tuning the x position, or even having a y position at all.  Third, to learn, as usual.

 

I'd appreciate any helpful comments if anyone is interested.

 

Thanks!

 

Hello World Screen Shot.jpg

 

 

Attached Thumbnails

  • Hello World Screen Shot.jpg

Attached Files



#2 Tickled_Pink OFFLINE  

Tickled_Pink

    Quadrunner

  • 6,742 posts
  • Location:Llanfaethlu, Wales, UK

Posted Sat Jun 11, 2016 5:04 PM

I've been doing this kind of thing on and off for a number of years. Because I keep stopping, I forget what I learned and have to start again.

 

Spent a couple of hours today installing Eclipse, the WUDSN (?) package and running through a couple of tutorials on AA. Done plenty of 6502 in the past but the 2600 hardware is a whole different ball game. Think I'll be spending my weekends actually enjoying some old-skool coding instead of the drudge that coding has become today.



#3 RevEng OFFLINE  

RevEng

    River Patroller

  • 4,386 posts
  • Bitnik
  • Location:Canada

Posted Sat Jun 11, 2016 6:09 PM

Critique: Your "Hello World" program message is much too inclusive in this age of heightened security. ;)

Also the NMI vector isn't required/supported on the 6507, so you can skip that and save the 2 bytes of ROM.

#4 SIO2 OFFLINE  

SIO2

    Dragonstomper

  • 755 posts
  • Location:Nebraska

Posted Sat Jun 11, 2016 6:38 PM

Hello to you.

Nice program.

#5 Omegamatrix OFFLINE  

Omegamatrix

    Quadrunner

  • 6,098 posts
  • Location:Canada

Posted Sat Jun 11, 2016 8:48 PM

You need to correct your scanline count to 262 lines to be stable. To check the scanline count with Stella hold down the ALT button and press L. You will see the display.

 

 

I usually center my screen with the help of Stella by looking at the screen in the Debug colors mode (hold ALT and press comma button). The black regions at the top and bottom of the screen are where the VBLANK register is being enabled. Looking at your screen I would add 4 more lines above the "HELLO", and 4 more lines below the "WORLD". Add these lines in the kernel part of the screen.

 

HelloWorld.png



#6 BNE Jeff OFFLINE  

BNE Jeff

    Chopper Commander

  • Topic Starter
  • 233 posts
  • Location:Virginia, USA

Posted Sat Jun 11, 2016 10:10 PM

 

To check the scanline count with Stella hold down the ALT button and press L. You will see the display.

 

 

I usually center my screen with the help of Stella by looking at the screen in the Debug colors mode (hold ALT and press comma button).

 

That is cool..  Thanks!



#7 tschak909 OFFLINE  

tschak909

    Stargunner

  • 1,482 posts
  • Location:USA

Posted Sat Jun 11, 2016 11:16 PM

Good Job! :)

 

-Thom



#8 SpiceWare OFFLINE  

SpiceWare

    Quadrunner

  • 10,745 posts
  • Medieval Mayhem
  • Location:Planet Houston

Posted Sun Jun 12, 2016 9:43 AM

Good start!  Omegamatrix covered the only issue I saw.  While the line count can be an issue with some displays, it worked just fine on my C= 1084S:

IMG_7318.jpg

 

Regarding the main loop comment - at this stage of the game I wouldn't consider it a waste of time and space.  What it does is help reinforce that you, the programmer, are intimately involved with generating the display; which is unlike any other video game system.

 



#9 BNE Jeff OFFLINE  

BNE Jeff

    Chopper Commander

  • Topic Starter
  • 233 posts
  • Location:Virginia, USA

Posted Sun Jun 12, 2016 12:29 PM

Cool!  Thanks.  Yes- At this point it my belief that if I can just draw a game idea on the screen, the rest of the game logic should be relatively easy.



#10 BNE Jeff OFFLINE  

BNE Jeff

    Chopper Commander

  • Topic Starter
  • 233 posts
  • Location:Virginia, USA

Posted Sun Jun 12, 2016 1:49 PM

OK..  I corrected the number of scan lines and now its running at 60 fps.  Here's a picture of it running on the Atari for real:

 

Hello World on Atari.jpg



#11 BNE Jeff OFFLINE  

BNE Jeff

    Chopper Commander

  • Topic Starter
  • 233 posts
  • Location:Virginia, USA

Posted Tue Jun 14, 2016 6:39 AM

I guess I wasted a register here.  X and Y are doing exactly the same thing aren't they?



#12 Mr SQL OFFLINE  

Mr SQL

    Stargunner

  • 1,549 posts

Posted Tue Jun 14, 2016 6:53 AM

Cool!  Thanks.  Yes- At this point it my belief that if I can just draw a game idea on the screen, the rest of the game logic should be relatively easy.

Nice work Jeff! :)

 

Very cool you are using a SuperCharger to run your code on a real Atari and excellent attitude about the screen, I totally agree.



#13 BNE Jeff OFFLINE  

BNE Jeff

    Chopper Commander

  • Topic Starter
  • 233 posts
  • Location:Virginia, USA

Posted Wed Jun 15, 2016 7:26 AM

Yeah I don't have a Harmony cart so the Supercharger does the trick.  Its a little more complicated so I usually wait until I have something I really want to look at.



#14 LS_Dracon OFFLINE  

LS_Dracon

    Dragonstomper

  • 729 posts

Posted Wed Jun 15, 2016 7:40 AM

I guess I wasted a register here.  X and Y are doing exactly the same thing aren't they?

 

On kernel? Yes

if both are #96 and both decrement, you can use   lda HumanGfx,y instead.

And remove DEX and LDX #96, saving bytes :)



#15 alex_79 ONLINE  

alex_79

    Dragonstomper

  • 884 posts
  • Location:Italy

Posted Wed Jun 15, 2016 8:44 AM

Yeah I don't have a Harmony cart so the Supercharger does the trick.  Its a little more complicated so I usually wait until I have something I really want to look at.

You can use the CuttleCart Playbin utility, which will play your binary directly without generating a wav file. Remember to select "Supercharger" as output, else it will generate audio for the CuttleCart which won't work.

See here:
http://atariage.com/...n/#entry3414680



#16 MacrosCode OFFLINE  

MacrosCode

    Star Raider

  • 55 posts
  • Location:Europe, South of Germany

Posted Fri Jul 8, 2016 8:40 AM

Really impressed that people are programming nowadays for such an old console!

Did not expect that! :)



#17 BNE Jeff OFFLINE  

BNE Jeff

    Chopper Commander

  • Topic Starter
  • 233 posts
  • Location:Virginia, USA

Posted Mon Jul 11, 2016 9:36 AM

Try it..  Its fun!



#18 MacrosCode OFFLINE  

MacrosCode

    Star Raider

  • 55 posts
  • Location:Europe, South of Germany

Posted Thu Jul 14, 2016 6:10 AM

Try it..  Its fun!

 

First I saw the games on the 2600 and thought... oh, pretty nice for that time. Some sprites, some colors, etc. But when I then discovered how less the hardware of the 2600 offers, I was totally shocked: How the hell has those guys done this with only 2 sprites and 3 dots... and a playfield with 20 blocks??? :-o

 

Even for a simple 6-digit-highscore you have to do things the hardware was never designed for. WOW!

After that my view on the games completely changed and the more I discovered about the 2600 the more I was impressed.

 

The 2600 has the craziest video hardware I have ever seen! So think it must be fun to do the challenge.

But I also think programming on such a hardware-based level is very time consuming.

 

I wish I would have more time to play with it. So for the moment I enjoy looking at others tech demos. :)






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users