Jump to content

Photo

Homebrew 2600 demo


12 replies to this topic

#1 SmileyDude OFFLINE  

SmileyDude

    Moonsweeper

  • 262 posts
  • 6502 Hacker
  • Location:Wilmington, MA

Posted Tue Jul 1, 2003 9:15 PM

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

Attached Files



#2 Pitfall Harry OFFLINE  

Pitfall Harry

    Stargunner

  • 1,993 posts
  • Location:Glendora, CA

Posted Tue Jul 1, 2003 10:46 PM

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

#3 Andrew Davie OFFLINE  

Andrew Davie

    Stargunner

  • 1,782 posts
  • Dr.Boo
  • Location:Tasmania

Posted Tue Jul 1, 2003 11:02 PM

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

#4 Alex OFFLINE  

Alex

    Stargunner

  • 1,193 posts
  • Location:Austin, Tx

Posted Wed Jul 2, 2003 12:33 AM

Very nice effect. I don't recall anything quite like it.

#5 Thomas Jentzsch OFFLINE  

Thomas Jentzsch

    Thrust, Jammed, SWOOPS!, Boulder Dash, THREE·S, Star Castle

  • 22,790 posts
  • Always left from right here!
  • Location:Düsseldorf, Germany, Europe, Earth

Posted Wed Jul 2, 2003 12:45 AM

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.

#6 Cybergoth OFFLINE  

Cybergoth

    Quadrunner

  • 8,826 posts
  • This is Sparta!
  • Location:Bavaria

Posted Wed Jul 2, 2003 1:03 AM

Hi there!

Very nice.

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


Hehe, another thing I can remove from my ToDo list :)

Greetings,
Manuel

#7 DEBRO OFFLINE  

DEBRO

    Stargunner

  • 1,931 posts
  • Location:Atlanta, GA

Posted Wed Jul 2, 2003 3:52 AM

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!

#8 rixard OFFLINE  

rixard

    Combat Commando

  • 8 posts
  • Location:Sweden

Posted Wed Jul 2, 2003 4:45 AM

darn close to or even better than a C-64 demo...great job!

#9 SmileyDude OFFLINE  

SmileyDude

    Moonsweeper

  • Topic Starter
  • 262 posts
  • 6502 Hacker
  • Location:Wilmington, MA

Posted Wed Jul 2, 2003 7:08 AM

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

#10 SmileyDude OFFLINE  

SmileyDude

    Moonsweeper

  • Topic Starter
  • 262 posts
  • 6502 Hacker
  • Location:Wilmington, MA

Posted Wed Jul 2, 2003 7:22 AM

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

#11 Zach OFFLINE  

Zach

    Stargunner

  • 1,620 posts

Posted Sat Jul 5, 2003 2:13 PM

Speaking of showing on the TV, did anyone try this on a real 2600?


Tried it with a SuperCharger on an NTSC TV, and it looks good. Well done, SmileyDude. 8)

#12 SmileyDude OFFLINE  

SmileyDude

    Moonsweeper

  • Topic Starter
  • 262 posts
  • 6502 Hacker
  • Location:Wilmington, MA

Posted Sun Jul 6, 2003 7:52 PM

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?

#13 DEBRO OFFLINE  

DEBRO

    Stargunner

  • 1,931 posts
  • Location:Atlanta, GA

Posted Sun Jul 6, 2003 9:24 PM

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.




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users