How to convert a photo to NES format
Moderator: Moderators
Re: How to convert a photo to NES format
Yes, Mixed...Remixed...Mixed...Remixed... it was hard to find.
Re: How to convert a photo to NES format
I made a simple ROM some time ago that bankswitched both nametables and CHR ROM (and emphasis...) on every scanline to get 16x1 pixel attribute zones: viewtopic.php?p=113253#p113253
Never got around to making the analyzer to actually produce palette data for it, though...
Never got around to making the analyzer to actually produce palette data for it, though...
Re: How to convert a photo to NES format
IIRC, the MMC3 can only generate IRQs every 2 scanlines.dougeff wrote:I don't seem to be able to use scanline counting to switch nametables at every scanline
Yeah. But don't poll PPU_STATUS ($2002) for waiting for VBlank, always use NMIs. Detecting the end of VBlank isn't trivial either: one way is to use timed code from the start of VBlank, the other is to wait for the sprite 0 hit or sprite overflow flags (intentionally set during the previous frame) to be cleared.Is the timing something like this...wait for v_blank, wait till not v_blank, 114 cycles switch / 114 cycles switch / 113 cycles switch / repeat. ?
Re: How to convert a photo to NES format
This is true of MMC3A and MMC3B. MMC3B S and MMC3C can do IRQs every line, but I wouldn't recommend it because latency.tokumaru wrote:IIRC, the MMC3 can only generate IRQs every 2 scanlines.dougeff wrote:I don't seem to be able to use scanline counting to switch nametables at every scanline
A third, if you are using the MMC3 and not using forced blanking at the top, is when the MMC3 starts counting lines.Detecting the end of VBlank isn't trivial either: one way is to use timed code from the start of VBlank, the other is to wait for the sprite 0 hit or sprite overflow flags (intentionally set during the previous frame) to be cleared.
Re: How to convert a photo to NES format
Thanks for the suggestions. I think I'll try Tepples idea first. Won't have time till Monday, but I have in mind to do some more full color tests that switch nametables every scanline.
I was only able to get every 2 scanlines on my earlier tests with MMC3 counting irqs.
I was only able to get every 2 scanlines on my earlier tests with MMC3 counting irqs.
nesdoug.com -- blog/tutorial on programming for the NES
Re: How to convert a photo to NES format
What's the soonest an MMC3 IRQ can fire in the frame? I assume that memory fetches during the pre-render scanline clock it normally, right?tepples wrote:A third, if you are using the MMC3 and not using forced blanking at the top, is when the MMC3 starts counting lines.
Re: How to convert a photo to NES format
If I remember correctly, Kick Master needs the MMC3 PIT to be clocked 241 times per frame: once on the pre-render line and once on each picture line.tokumaru wrote:What's the soonest an MMC3 IRQ can fire in the frame? I assume that memory fetches during the pre-render scanline clock it normally, right?
Re: How to convert a photo to NES format
On my full name table test, I had to have the first count 1 more than the last two, which implies that it was counting the prerender line as a scanline. Of course this is on an emulator (FCEUX), not real hardware.
nesdoug.com -- blog/tutorial on programming for the NES
Re: How to convert a photo to NES format
I gave it a good try, but mixing 2 nametables scanline by scanline does not make it more colorfull, as I hoped. Rather it blends the 2 colors, making the color more gray or just wrong. I think a better approach would be to layer sprites on top of the background, which actually would have the effect of adding more colors. The final product would be a max 64x64 pixels, though.
Here's some of my attempts at full color.
Here's some of my attempts at full color.
- Attachments
-
- Fruit10.gif (9.66 KiB) Viewed 6930 times
-
- Fruit9.gif (8.71 KiB) Viewed 6930 times
-
- Fruit7.gif (9.7 KiB) Viewed 6930 times
nesdoug.com -- blog/tutorial on programming for the NES
Re: How to convert a photo to NES format
Here's my favorite, done by switching between 4 shades of gray and red, yellow, and green. Colors are a bit dull, but at least the right color.
And the NES file, which switches nametables every scanline.
And the NES file, which switches nametables every scanline.
- Attachments
-
- scan5.nes
- (24.02 KiB) Downloaded 284 times
-
- Fruit5.gif (9.61 KiB) Viewed 6930 times
nesdoug.com -- blog/tutorial on programming for the NES
Re: How to convert a photo to NES format
Just one more try. I started by seperating green on one palette and red/blue on another, but it looked wrong, and I just edited each palette color until it looked ok. Now the colors are almost right. And it only took 11 tries.
- Attachments
-
- scan11.nes
- (24.02 KiB) Downloaded 289 times
-
- Fruit11.gif (8.32 KiB) Viewed 6918 times
nesdoug.com -- blog/tutorial on programming for the NES
Re: How to convert a photo to NES format
I started this thread with the complaint that I couldn't find a good tutorial on NES graphics...well, I found one today.
http://www.atelier-betoux.com/2015/07/1 ... hic-tools/
This guy lives in France, and is getting into NES homebrewing...and he's a web designer.
http://www.atelier-betoux.com/2015/07/1 ... hic-tools/
This guy lives in France, and is getting into NES homebrewing...and he's a web designer.
nesdoug.com -- blog/tutorial on programming for the NES
Re: How to convert a photo to NES format
Yes, this is about the bare basics of tile editing... it's not really about photo conversion or colour reduction.