Jump to content
IGNORED

Just Finished My First Real 2600 Project


JeremiahK

Recommended Posts

A couple months ago I made a USA flag kernel for the Atari 2600 using the playfield to draw the stripes. It was intentionally an extremely simple project so that I could finish it and actually draw a picture with the 2600 for the first time.

Since then I have been busy and haven't had much free time to spend programming, but this weekend I had time, so I managed to make my first complete program with moving animated sprites. It's a DVD-player style screensaver using animated Blinky graphics. It's still very simple, but definitely way more complex than drawing a flag. I focused on making the code as readable as possible (it's probably not the most efficient way to do it, but since it doesn't have to be, I don't care).

blinky.bin

blinky.asm

  • Like 4
Link to comment
Share on other sites

If this Is one of your first, I'm impressed. I tried just basic when I was a kid and just didn't have the concentration. Better than anything I can do.icon_wink.gif

 

Keep going! The only way the older stuff can really be appreciated, is when somebody learns whats it's capable of.

  • Like 1
Link to comment
Share on other sites

Thank you! BASIC was actually my first computer language. I learned it on the Vtech PreComputer 1000 (a toy computer from the 80s with a built-in BASIC environment). My mom had found it at a garage sale, and thankfully she ordered a manual for it. The thing had under 2K of RAM, and you couldn't save files (the current program was stored in RAM). Very limiting, but that made it fun. I found out every little way to squeeze a little more out of it.

Link to comment
Share on other sites

Thank you! BASIC was actually my first computer language. I learned it on the Vtech PreComputer 1000 (a toy computer from the 80s with a built-in BASIC environment). My mom had found it at a garage sale, and thankfully she ordered a manual for it. The thing had under 2K of RAM, and you couldn't save files (the current program was stored in RAM). Very limiting, but that made it fun. I found out every little way to squeeze a little more out of it.

I think I had something like that. It had like a 20 or 40 character wide screen by like four rows high. Mine was maybe a Vtech precomupter power pad? Like 1995?

 

My first computer was an Atari 65 or 130, got for free in first/2nd grade 91-92.

That took a dump after a couple months - wished I still had it.

Didn't have anything till the power pad.

Then ended up getting a couple of Apple llc's and had a lle (wished i still had the iie too.)

First "modern" computer was a 386 from goodwill in 96?

Then got a Mac Performa 475 WITH CD-ROM - tray style - for my birthday

After that, was able to convince my dad that we needed a real computer, but it would be cheaper to build one.

So from 97 to like 2002, I went to those computer parts sales/shows at the state fair grounds / local dog racing track and built / upgraded every year.

 

When I was in 7th grade (97),my middle school library still had stuff (card catalog etc) on some old apple IIc and the other kids found it very weird that anyone knew how to use something that old.icon_ponder.gif

 

I probably would have gotten more into programing if some of the books that i had told how to do more than just word games or bit art. But I was mostly using apples then and from what I found later on, Atari and commodore were a little better at that.

Like poke commands and etc. I was a little to young for the class, but I remember taking a community ed kids class that had the Lego technic that were controlled by an apple II using LOGO (I would almost kill to have one those sets now!).

My school in first grade taught the kids LOGO and I remember trying it again years later, so that probably the language I have the most experience with. Its the least practical , but it's pretty fun because graphic were a little easier to do.

  • Like 1
Link to comment
Share on other sites

I focused on making the code as readable as possible (it's probably not the most efficient way to do it, but since it doesn't have to be, I don't care).

 

I think that's wise. Your code looks good. One suggestion I would make is to change how you define bit variables. Instead of using org to reset the address you can simply list multiple labels for a single DS command. You may also want to consider appending the bits that apply to that variable to make it easier to spot bugs where the wrong bits are accidentally changed.

 

This

; DIRECTION, FIRST_FRAME, and HIT_WALL are all the same location in RAM

DIRECTION	ds 1	; direction of sprite
			; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
			;   X   X   O   O   O   O   O   O
			; 7 = facing up
			; 6 = facing right

    ORG DIRECTION	; reuse DIRECTION variable with new name

FIRST_FRAME	ds 1	; whether or not this is the first frame
			; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
			;   O   O   O   O   O   O   O   X
			; 0 = only set on first frame

    ORG DIRECTION	; reuse DIRECTION variable with new name

HIT_WALL	ds 1	; bits for collision variables
			; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
			;   O   O   O   O   O   X   X   O
			; 2 = hit top or bottom wall this frame
			; 1 = hit left or right wall this frame

could become this

DIRECTION_76	; direction of sprite
HIT_WALL_21	; bits for collision variables
FIRST_FRAME_0	; whether or not this is the first frame
	ds 1	; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
		;   U   R   X   X   X   V   H   F
		; 7 = facing up
		; 6 = facing right
		; 5 = 
		; 4 = 
		; 3 = 
		; 2 = hit top or bottom wall this frame
		; 1 = hit left or right wall this frame
		; 0 = only set on first frame

Look forward to seeing what you come up with next!

  • Like 1
Link to comment
Share on other sites

I think I had something like that. It had like a 20 or 40 character wide screen by like four rows high. Mine was maybe a Vtech precomupter power pad? Like 1995?

...

 

The one I used had a single-row 20 character display. It had a built-in random number generator (which liked to pick 3 and 7 rather often), so one time I got the idea of taking quotes from movies and randomizing some of the words to make them silly.

 

...

After that, was able to convince my dad that we needed a real computer, but it would be cheaper to build one.

So from 97 to like 2002, I went to those computer parts sales/shows at the state fair grounds / local dog racing track and built / upgraded every year.

...

 

I built my own computer, too. Not when I was younger, though, our first PC was given to us by my aunt and uncle in 2000 (I would have been 4). It was a green Acer running Windows 95.

 

 

I think that's wise. Your code looks good. One suggestion I would make is to change how you define bit variables. Instead of using org to reset the address you can simply list multiple labels for a single DS command. You may also want to consider appending the bits that apply to that variable to make it easier to spot bugs where the wrong bits are accidentally changed.

 

This

; DIRECTION, FIRST_FRAME, and HIT_WALL are all the same location in RAM

DIRECTION	ds 1	; direction of sprite
			; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
			;   X   X   O   O   O   O   O   O
			; 7 = facing up
			; 6 = facing right

    ORG DIRECTION	; reuse DIRECTION variable with new name

FIRST_FRAME	ds 1	; whether or not this is the first frame
			; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
			;   O   O   O   O   O   O   O   X
			; 0 = only set on first frame

    ORG DIRECTION	; reuse DIRECTION variable with new name

HIT_WALL	ds 1	; bits for collision variables
			; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
			;   O   O   O   O   O   X   X   O
			; 2 = hit top or bottom wall this frame
			; 1 = hit left or right wall this frame

could become this

DIRECTION_76	; direction of sprite
HIT_WALL_21	; bits for collision variables
FIRST_FRAME_0	; whether or not this is the first frame
	ds 1	; | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
		;   U   R   X   X   X   V   H   F
		; 7 = facing up
		; 6 = facing right
		; 5 = 
		; 4 = 
		; 3 = 
		; 2 = hit top or bottom wall this frame
		; 1 = hit left or right wall this frame
		; 0 = only set on first frame

Look forward to seeing what you come up with next!

 

Thank you! That was a part of the code that I wasn't thrilled about, and I was hoping there was a better way. I like the way you included the bit numbers in the labels.

Since my program only uses 6 bytes of RAM, I know I could have easily just used a few more bytes of RAM and made the code simpler without all the bitmasking, but I wanted to get a feel for what you have to do in a real program where RAM is precious.

 

Cute! :D Great job finishing your first program.

 

That Blinky Sprite is really nicely done too!

 

Thanks. I did it the "clever" way, where it takes advantage of some of the symmetry in the sprite to save ROM space. It also flips the graphics on-the-fly to change the direction Blinky faces. This was all completely unneccesary because I'm pretty sure all the extra code takes up more ROM than the extra graphics would. :D

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