Skip navigation
NintendoAge
Welcome, Guest! Please Login or Join
Loading...

answering frequently asked questions about SNES programming

Nov 20, 2013 at 10:06:24 PM
Aaendi (0)

(Andy Koenigs) < Eggplant Wizard >
Posts: 332 - Joined: 05/31/2012
United States
Profile
Q) Is the SNES really that much difficult to program compared to the NES?

A) For games that look like NES games with more colors, not really. The 65816 is backwards compatible with the 6502, so most ASM code can be used for both systems. Sprites and tiles work almost the same way, you just need to upload the CHR data to VRAM at startup for any graphics to be displayed, and write to PPU regs to define the VRAM addresses of the sprite pattern table, BG pattern table, and BG map table. The SPC700 APU is the only thing that would be difficult for an NES programmer to use but an NES APU could easily be emulated. Now if you want a 32meg game that really takes advantage of the SNES PPU, it takes a lot more effort than a simpler NES-style game.

Q) Do I need to put in a lot of effort optimizing code in order to have it run efficiently.

A) No. As long as your code has efficient structure to begin with, you don't need to put in much effort optimizing code.

Q) Can anyone give me an ask code that just puts a sprite onscreen?

A) Depends on what exactly you mean. If you want a demo that displays a sprite onscreen, and nothing else, then yes, it is possible for there to be one big chunk of code to do the job. If you are also doing other things like scrolling a background, then no. It takes several routines, that have to be done separately. You need a routine to upload the sprite pattern table and color palette to be executed at start up, a routine to update the oam to be executed during vblank, and a routine that puts the sprite on the oam buffer, that can be executed many times during active display. You'd also need a routine that places all the unused sprites off screen, and processes the extra 32 bytes of "hioam" at the end of the main loop.

I am busy so I'll finish this OP later.


Edited: 11/21/2013 at 01:20 AM by Aaendi

Nov 20, 2013 at 11:43:08 PM
Oddzball (6)

< Meka Chicken >
Posts: 816 - Joined: 11/07/2013
Profile
Nice. I like this. Please continue

Nov 21, 2013 at 8:38:43 AM
DoNotWant (1)

(Ham Sammich) < Eggplant Wizard >
Posts: 441 - Joined: 12/08/2011
Sweden
Profile
Originally posted by: Oddzball

Nice. I like this. Please continue
I'm with this guy. Here is a somewhat related question for you Aaendi; When are we going to see some updates about that Gunstar Heroes port of yours?



-------------------------
 

Nov 21, 2013 at 10:54:07 AM
Aaendi (0)

(Andy Koenigs) < Eggplant Wizard >
Posts: 332 - Joined: 05/31/2012
United States
Profile
I am over with my haitus. I'll try to get something finished over the weekend.

Nov 21, 2013 at 11:02:04 AM
Piko (51)
This user has been banned -- click for more information.
< King Solomon >
Posts: 3185 - Joined: 12/29/2011
New Hampshire
Profile
Originally posted by: Aaendi

Q) Is the SNES really that much difficult to program compared to the NES? A) For games that look like NES games with more colors, not really. The 65816 is backwards compatible with the 6502, so most ASM code can be used for both systems. Sprites and tiles work almost the same way, you just need to upload the CHR data to VRAM at startup for any graphics to be displayed, and write to PPU regs to define the VRAM addresses of the sprite pattern table, BG pattern table, and BG map table. The SPC700 APU is the only thing that would be difficult for an NES programmer to use but an NES APU could easily be emulated. Now if you want a 32meg game that really takes advantage of the SNES PPU, it takes a lot more effort than a simpler NES-style game. 

So you mean, that If NES source code provided, it can be somewhat easily ported to SNES?


-------------------------

 

 


Nov 21, 2013 at 11:45:16 AM
DoNotWant (1)

(Ham Sammich) < Eggplant Wizard >
Posts: 441 - Joined: 12/08/2011
Sweden
Profile
Originally posted by: pichichi010

Originally posted by: Aaendi

Q) Is the SNES really that much difficult to program compared to the NES? A) For games that look like NES games with more colors, not really. The 65816 is backwards compatible with the 6502, so most ASM code can be used for both systems. Sprites and tiles work almost the same way, you just need to upload the CHR data to VRAM at startup for any graphics to be displayed, and write to PPU regs to define the VRAM addresses of the sprite pattern table, BG pattern table, and BG map table. The SPC700 APU is the only thing that would be difficult for an NES programmer to use but an NES APU could easily be emulated. Now if you want a 32meg game that really takes advantage of the SNES PPU, it takes a lot more effort than a simpler NES-style game. 

So you mean, that If NES source code provided, it can be somewhat easily ported to SNES?
 
Easy as in, not much to think about and plan yourself? Yes, if you are good with both the NES/SNES.
Easy as in not very time consuming? Noooooo.



-------------------------
 

Nov 21, 2013 at 1:23:45 PM
Oddzball (6)

< Meka Chicken >
Posts: 816 - Joined: 11/07/2013
Profile
So could you literally have say, SMB3 on an SNES cart? Because that would be awesome. And hell, if you could add in a save feature, like Mario adventure, it would be one of the most epic games on the SNES IMO.

Nov 21, 2013 at 1:29:41 PM
GradualGames (39)
avatar
(Derek Andrews) < El Ripper >
Posts: 1128 - Joined: 10/09/2009
Pennsylvania
Profile
Super Mario All Stars. That's all I'll say.

-------------------------
Creators of: Nomolos: Storming the CATsle, and The Legends of Owlia.

Nov 21, 2013 at 4:29:19 PM
marvelus10 (46)

( . ) Boobies ( . ) < King Solomon >
Posts: 3282 - Joined: 06/05/2007
British Columbia
Profile
Originally posted by: Oddzball

So could you literally have say, SMB3 on an SNES cart? Because that would be awesome. And hell, if you could add in a save feature, like Mario adventure, it would be one of the most epic games on the SNES IMO.


How about Mario Adventure on the SNES using SMB3 from Allstars. Hmmmmm

-------------------------




 

Nov 21, 2013 at 5:31:23 PM
Oddzball (6)

< Meka Chicken >
Posts: 816 - Joined: 11/07/2013
Profile
I actually dont like Super Mario All stars, dont like the graphic changes.

Nov 21, 2013 at 11:23:43 PM
Guntz (115)
avatar
< Master Higgins >
Posts: 8279 - Joined: 05/07/2011
Canada
Profile
What's the point then? New graphics is why SMB3 is on Super Mario All-Stars to begin with.

If you want a save feature on NES, I actually made a thread about that a while ago and someone linked to a Save hack. I have yet to try it out.

Nov 22, 2013 at 12:17:26 AM
Aaendi (0)

(Andy Koenigs) < Eggplant Wizard >
Posts: 332 - Joined: 05/31/2012
United States
Profile
Q) The SNES has 4 sprite size, but only 2 at the same time. Which combination of sizes are the best?

A) In my opinion, using 8x8s and 16x16s is the best option. It is the least likely to flicker, and keeps vram down. Using 16x16s with 32x32s have a few benefits, such as slightly better screen coverage (despite more likely to flicker) and simpler metasprites.

Nov 22, 2013 at 12:17:36 AM
Aaendi (0)

(Andy Koenigs) < Eggplant Wizard >
Posts: 332 - Joined: 05/31/2012
United States
Profile
Q) The SNES has 4 sprite size, but only 2 at the same time. Which combination of sizes are the best?

A) In my opinion, using 8x8s and 16x16s is the best option. It is the least likely to flicker, and keeps vram down. Using 16x16s with 32x32s have a few benefits, such as slightly better screen coverage (despite more likely to flicker) and simpler metasprites.