I want to render this scene:
I've watched the Super NES Features playlist on youtube by Retro Game Mechanics Explained, so I have a good high-level idea on how to accomplish this.
These are all the colors I use in the scene:
The entire scene can be made with exactly 20 8x8 tiles and 24 16x16 tiles for a total of 44 tiles. I have all the tiles individually saved as colormapped (indexed) PNG files with transparency.
The background modes seemed kinda complicated, so I figured the easiest thing to do would be to use a constant color background and then just have everything else be a sprite. I have the precise x and y coordinates that all the sprites should be. I checked to make sure that no more than 32 objects are on any given scanline. There's also fewer than 128 objects on the screen in total.
I've also thought about how to animate each object:
However, I'm not sure how to proceed from here...
Sorry for all these questions, but all the resources I've come across don't seem to drive these points home. And while they might cover the theory of the inner workings fairly well, they don't really talk about how to actually start showing stuff on the screen from a practical standpoint. Overall I just feel very lost...
I've watched the Super NES Features playlist on youtube by Retro Game Mechanics Explained, so I have a good high-level idea on how to accomplish this.
These are all the colors I use in the scene:
The entire scene can be made with exactly 20 8x8 tiles and 24 16x16 tiles for a total of 44 tiles. I have all the tiles individually saved as colormapped (indexed) PNG files with transparency.
The background modes seemed kinda complicated, so I figured the easiest thing to do would be to use a constant color background and then just have everything else be a sprite. I have the precise x and y coordinates that all the sprites should be. I checked to make sure that no more than 32 objects are on any given scanline. There's also fewer than 128 objects on the screen in total.
I've also thought about how to animate each object:
- 1. The flame for the candle is animated by simply flipping it back and forth horizontally (i.e. by using a simple EOR instruction).
2. The shadows simply consist of a big shadow sprite covering a small one, and to toggle back and forth, I can just move the big sprite on and off the screen by toggling the MSb of the x coordinate (again with a simple EOR instruction).
3. The balloons will be a bit more involved, but I think the easiest way would be for each balloon to maintain some dy value set to a constant, say 5. Every frame, I just toggle dy by doing dy = dy * -1. Then all I need to do to move the balloons appropriately is do ballonX += dy
4. The confetti are simply animated by toggling the various tiles horizontally or vertically. I've got it worked out which ones are toggled which way.
However, I'm not sure how to proceed from here...
- 1. How do I combine all these resources into a single ROM?
2. How do I turn my colors into a color pallette and then get that into CGRAM?
3. How do I initialize OAM? It holds data for all sprites, so do I have to "zero-initialize" the whole thing so it doesn't take any junk memory values and turn them into sprites?
4. If I just want a plain background, do I still need to mess with background modes and make a background tile map and stuff?
5. If I update the sprite info in OAM, do I need to do anything with VRAM and the DMA to get the sprites to update on the screen? Or does the PPU read OAM directly?
6. What exactly is DMA used for during the VBlank period? The playlist I linked says it can be used to move large amounts of data to/from memory, but what exactly are we moving, and why? Would I need it?
7. How do I get my tiles into VRAM to look like this:
Sorry for all these questions, but all the resources I've come across don't seem to drive these points home. And while they might cover the theory of the inner workings fairly well, they don't really talk about how to actually start showing stuff on the screen from a practical standpoint. Overall I just feel very lost...