NES programming

Talk about anything else you want

Moderator: BigEvilCorporation

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

NES programming

Post by evildragon » Wed Apr 25, 2007 7:17 am

Well, I'm sorta known on the net for being the first to give the NES an optical drive, a DVD-ROM drive exactly.. (video overlay, to play movies, and using simple API to control the drives ESS Video Drive decoder onboard..)

I was going to port Sonic 2 onto the NES, and make it as authentic as possible, and so far my planning is going good.. (even with the limited sound and graphics)..

BUT, I have NO idea how the heck im going to do the special stage! How do I even begin to simulate 3D like that on the NES? Remember, it needs to be authentic as possible..

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Wed Apr 25, 2007 7:30 am

Maybe set up pattern table and do bank switches on CROM ? Can we see your work somewhere ?
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Wed Apr 25, 2007 3:05 pm

TmEE co.(TM) wrote:Maybe set up pattern table and do bank switches on CROM ? Can we see your work somewhere ?
i haven't had a website created showcasing my stuff........yet.. one of my friends have offered to do it for me, i just have to get off my lazy butt and compile pictures and information..

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Re: NES programming

Post by Shiru » Wed Apr 25, 2007 5:33 pm

evildragon wrote:How do I even begin to simulate 3D like that on the NES?
If you skilled enough to make NES game, you must easily see what there is no any 3D in special stage of Sonic 2, it's just animation with low framerate. And it's not hard to implement on NES, of course.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Re: NES programming

Post by evildragon » Wed Apr 25, 2007 6:25 pm

Shiru wrote:
evildragon wrote:How do I even begin to simulate 3D like that on the NES?
If you skilled enough to make NES game, you must easily see what there is no any 3D in special stage of Sonic 2, it's just animation with low framerate. And it's not hard to implement on NES, of course.
yea, i know it's just animated stuff, but the problem i am seeing, is, is the NES even fast enough to switch graphics like that? don't forget when the rings come closer, they get bigger too...

i've never been able to get the NES to transfer fast enough to do something close like that..

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed Apr 25, 2007 6:40 pm

You must use simple compression for background, and update only tiles which changes from previous frame. If your animation will be looks like SMD special stage (many flat-shaded areas), you'll be able to update screen fast enough. In best case you'll even not need to update tileset, only nametable.

About rings, it's not sprite scaling, just sprites with same size, but with different size of rings inside sprite. And they move by precalculated trajectories (X,Y,sprite number), depending from current part of background animation.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Wed Apr 25, 2007 6:44 pm

yea, i knew that about the rings, as the genesis didn't have scaling and rotation.. what i meant was i didn't know if the NES could load the multiple ring sprites quick enough..

i'm going to have to see how much CPU usage i even have to work with.. i might have to drop Tails from the game...

i already know how im gonna alocate the NES sound channels:

Square 1: Music
Square 2: Sound Effects
Noise: Sound Effects
Triangle: Sound Effects / Music

(The Triangle sound is undecided.. im debating between sound effects or music for it.. for music it could add some bass..

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Wed Apr 25, 2007 7:13 pm

evildragon wrote:i already know how im gonna alocate the NES sound channels:
Most of games uses all channels for music, and take one of it when sfx need to play. But seems you have your very own way with 1-ch music;)

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Wed Apr 25, 2007 7:18 pm

yea, well, in real life, i can only play one note at a time, even on a guitar.. ;) part of my autism, i can't handle producing more than one note at a single time... and my programming will show it...

since the product was already started, game engine concerned, here's some screens.. notice the horrible colors in EHZ, it sucks badly.. the greens are more like "neon"--ish colored..

http://blackevilweredragon.spymac.com/sonicNES1.jpg
http://blackevilweredragon.spymac.com/sonicNES2.jpg

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Thu Apr 26, 2007 6:25 am

evildragon wrote:yea, well, in real life, i can only play one note at a time, even on a guitar.. ;) part of my autism, i can't handle producing more than one note at a single time... and my programming will show it...

since the product was already started, game engine concerned, here's some screens.. notice the horrible colors in EHZ, it sucks badly.. the greens are more like "neon"--ish colored..

http://blackevilweredragon.spymac.com/sonicNES1.jpg
http://blackevilweredragon.spymac.com/sonicNES2.jpg
Do you mean these are real NES screenshots ???
To be honest i'm very septic since in severals parts the image seems to overpast the 4 colors tile limitation (specially the sonic sprite) and even with sprite overdraw it would be quite difficult to achieve a so good result.
So far if you're really getting this result on NES, i'm *very* impressed, probably one of the best looking NES game i've ever seen !

Edit :
After taking better attention, it just cannot be NES screenshot.
Futhermore you're strangly got the same 'bottom line bug' than genesis version.

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Thu Apr 26, 2007 6:39 am

Stef wrote:
evildragon wrote:yea, well, in real life, i can only play one note at a time, even on a guitar.. ;) part of my autism, i can't handle producing more than one note at a single time... and my programming will show it...

since the product was already started, game engine concerned, here's some screens.. notice the horrible colors in EHZ, it sucks badly.. the greens are more like "neon"--ish colored..

http://blackevilweredragon.spymac.com/sonicNES1.jpg
http://blackevilweredragon.spymac.com/sonicNES2.jpg
Do you mean these are real NES screenshots ???
To be honest i'm very septic since in severals parts the image seems to overpast the 4 colors tile limitation (specially the sonic sprite) and even with sprite overdraw it would be quite difficult to achieve a so good result.
So far if you're really getting this result on NES, i'm *very* impressed, probably one of the best looking NES game i've ever seen !

Edit :
After taking better attention, it just cannot be exactly at it is on a real NES.
Futhermore you're strangly got the same 'bottom line bug' than genesis version.
yea, those are real shots.. crappy RF is all I had at the time to take them... (i couldn't find my composite cables)...

it has the same bottom line bug as I directly ported the main code from the Genesis version (minus some code that really took down the 6502)... I couldn't find what causes it, and why it's only on emerald hill zone...

the color limitation i did take into consideration.. how i got around it really takes penalty on the NES, but my optical drives on-board memory comes in for this.. There's multiple tiles each with their own palette.. Not very easy to pull off, and really causes Sonics animation to be very poor.. I'll try and record a video tomorrow if i can... (however. most of the color boosting is strictly dithering, and the extra colors come from NTSC's "flaws" ;) you can see a slight colored band on sonics hand, from the dithering, it's like a greenish color)

(PS: I can't find any code in Sonic 2 to actually use all 240 lines on the NES. It seems Sonic 2 was made 224 line only, even on PAL..)

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Thu Apr 26, 2007 6:47 am

here's a comparision.. you can see there was pallette loss, AND detail loss.. The gras lost the "sparkle", the colors got pretty "dull", and the sky, well, that hole layer is non-existant... (there's no way i can get the NES to do that, as far as I see)...

http://blackevilweredragon.spymac.com/soniccomp.png

Oh, and on the NES version, Sonic hangs to the right, because as the Genesis version was coded for 320 pixels width, i was lazy to correct Sonics placement on-screen.. I rushed the engine...

TmEE co.(TM)
Very interested
Posts: 2440
Joined: Tue Dec 05, 2006 1:37 pm
Location: Estonia, Rapla City
Contact:

Post by TmEE co.(TM) » Thu Apr 26, 2007 7:35 am

Its VERY awesome despite the loss in colors !!! I've played ~500 NES/FC games on real(pirate) HW and your Sonic2 version kicks most of their @$$ !!!

How easy is to program for NES compared with MD ? I'd like to take a shot on it too someday...
Mida sa loed ? Nagunii aru ei saa ;)
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen

evildragon
Very interested
Posts: 326
Joined: Mon Mar 12, 2007 1:53 am
Contact:

Post by evildragon » Thu Apr 26, 2007 4:21 pm

TmEE co.(TM) wrote:Its VERY awesome despite the loss in colors !!! I've played ~500 NES/FC games on real(pirate) HW and your Sonic2 version kicks most of their @$$ !!!

How easy is to program for NES compared with MD ? I'd like to take a shot on it too someday...
it's a little harder to program.. the main dificulty, is the lacking of scrolling diagonaly.. you have to work around that, like how Mario 3 did...

Shiru
Very interested
Posts: 786
Joined: Sat Apr 07, 2007 3:11 am
Location: Russia, Moscow
Contact:

Post by Shiru » Thu Apr 26, 2007 4:31 pm

evildragon wrote: it's a little harder to program.. the main dificulty, is the lacking of scrolling diagonaly.. you have to work around that, like how Mario 3 did...
It's nothing that many games uses 'lacking' diagonal scroll?;)

Post Reply