Jump to content
IGNORED

Homebrew 2600 demo


Recommended Posts

Dunno if this is the right spot, but I'm posting a little demo I wrote for the 2600 :) It's a fairly basic rotating copper bar demo. In fact, it's an adaptation of a program that I played around with on the GBA. This is my first 2600 program of any substance, so please be gentle :) I mainly wanted to release it so it doesn't just rot away on my hard drive :D Hopefully, someone can get some use out of it...

 

Binary and source are included -- enjoy :)

3dcopper.zip

Link to comment
Share on other sites

Wow! That's a pretty cool 3D effect. Great work, SmileyDude. :)

 

I like the way the bars are translucent so you can see the background text (Atari) through them. Are you doing some sort of fancy pixel merging at run time, or is each display of a color bar (with partial text showing through) something you've laboriously pre-calculated and then fed into your lookup tables? I guess what I want to know is: Can the program be easily adapted to display other text behind the rotating color bars besides Atari?

 

It's cool. Very, very cool.

 

Ben

Link to comment
Share on other sites

Very nice.

Yup, we definitely need more cool demo stuff like this one. :thumbsup:

 

Can you get the bars to go in front of and behind the text, as appropriate?

IMO that should be possible, though it probably will require some heavy kernel redesign.

 

I think you would have to switch between positive and negative PF-patterns to get the desired effect.

Link to comment
Share on other sites

Dunno if this is the right spot, but I'm posting a little demo I wrote for the 2600 :)  It's a fairly basic rotating copper bar demo.  In fact, it's an adaptation of a program that I played around with on the GBA.

 

Congratualtions! You got Stella to do something. I like it. It's a really cool effect.

This is my first 2600 program of any substance, so please be gentle :)

 

Of course...just some suggestions.

 

Your demo is producing 259 scan lines. This is okay and will show on the TV fine. To get 262 scan lines...

1) change your overscan wait timer to 35 (i.e. 30 scan lines * 76 cycles / 64 = 35.625 ~ 35)

2) just before starting VSYNC do WSYNC to end the last scan line and make sure VSYNC happens at the beginning of the scan line

3) set your VBLANK wait time outside of VSYNC

 

Points 2 and 3 are just safety precautions to make sure the demo works on sensitive 2600 jrs. No one has been able to nail down why some jrs. have problems but doing points 2 and 3 seem to guarentee it works on all 2600 models.

 

I mainly wanted to release it so it doesn't just rot away on my hard drive :D

One word...StellaList...or is that two :roll:

 

:thumbsup: Great demo!

Link to comment
Share on other sites

Can the program be easily adapted to display other text behind the rotating color bars besides Atari?

 

Besides Atari??? :o Heh, yes -- it's fairly easy to replace the graphics. There are 6 tables at the end of the cart that contain the values for PF0, PF1, and PF2 for both the left and right side of the screen. All that would need to be done is to generate some new values for the tables :)

 

Can you get the bars to go in front of and behind the text, as appropriate?

 

Should be possible, but it would require a big kernel redesign. It would also likely require some changes to the way I calculate bar-colors and positions as well... I have some ideas on how to change this, but I'll have to play with it to see if I can pull them off :)

 

Your demo is producing 259 scan lines. This is okay and will show on the TV fine. To get 262 scan lines...

 

Thank you for the suggestions... as soon as I get the chance, I'll implement the changes :)

 

Speaking of showing on the TV, did anyone try this on a real 2600? I don't have the necessary equipment, so everything was done with Stella (and later tested with z26)... I'd be real interested in seeing in on the real thing :)

Link to comment
Share on other sites

While I'm thinking of it, I thought I might explain a bit of the magic :)

 

I'm only using two colors per line -- the background color and the playfield color. I have a table of colors stored in RAM (eek :!: ) that I use in the kernel to set the registers. I cheat a bit, and set the background color with the low bit set -- since the TIA only displays 128 colors, it ignores this bit. But, I can simply do an INX and get the next luminance for the playfield color :)

 

So, after it sets the colors, it simply sets the PFx registers. I was extremely lazy on this point, so for each line, I have the values for each of the PFx registers in the table. For the text that I'm displaying, this is extremely wasteful. But, someone could use the extra vertical resolution if they wanted to with no code modifications.

 

Offscreen, I simply update the positions of all the bars and 'redraw' the bars by setting the colors in the RAM table. I sort the bars first, so that the bar that's on top get's 'drawn' last.

 

There are two tables for the rotation -- a depth table that says how big each bar will be drawn -- and a position table that has the top line of the bar. These are both indexed off the angle, and for simplicity, I made the index go from 0-255. Makes it really easy to rotate, since all I have to do is keep doing a INC for the angle on each bar :)

 

I wanted to use the other parts of the screen for something else, but considering that I've used up most of the RAM right now, I would have to seriously think about how to reduce some of that usage.

 

I still might try my hand at putting some music in there... :)

 

Now that I've explained it, the mystique will probably be gone -- but I did put the source in there, so it's not like I was trying to hide it :) I would love to see someone take this and make something really cool with it -- I just don't have the time to work on a full-blown 2600 project at this time. I would love to do it, but as we all know, 2600 programming doesn't put food on the table :D

Link to comment
Share on other sites

I just attached an updated version -- the only changes are the ones suggested by DEBRO.

 

BTW, how did you determine that I was only displaying 259 scan lines, DEBRO? I'm assuming that you used an emulator -- if so, which one?

Link to comment
Share on other sites

BTW, how did you determine that I was only displaying 259 scan lines, DEBRO?  I'm assuming that you used an emulator -- if so, which one?

 

Yeah, I use Z26 for Window! The -n option will display the number scan lines produced. Z26 also has a nice trace option (-t) that will dump a trace of your program while it's running. This makes it easier to find programming bugs. It's helped me plenty of times.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...