Page 3 of 3

Re: How to convert a photo to NES format

Posted: Sat Jul 18, 2015 8:11 am
by ccovell
Yes, Mixed...Remixed...Mixed...Remixed... it was hard to find.

Re: How to convert a photo to NES format

Posted: Sat Jul 18, 2015 9:39 am
by lidnariq
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...

Re: How to convert a photo to NES format

Posted: Sat Jul 18, 2015 1:42 pm
by tokumaru
dougeff wrote:I don't seem to be able to use scanline counting to switch nametables at every scanline
IIRC, the MMC3 can only generate IRQs every 2 scanlines.
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. ?
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.

Re: How to convert a photo to NES format

Posted: Sat Jul 18, 2015 2:00 pm
by tepples
tokumaru wrote:
dougeff wrote:I don't seem to be able to use scanline counting to switch nametables at every scanline
IIRC, the MMC3 can only generate IRQs every 2 scanlines.
This is true of MMC3A and MMC3B. MMC3B S and MMC3C can do IRQs every line, but I wouldn't recommend it because latency.
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.
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

Posted: Sat Jul 18, 2015 2:28 pm
by dougeff
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.

Re: How to convert a photo to NES format

Posted: Sat Jul 18, 2015 5:28 pm
by tokumaru
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.
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

Posted: Sat Jul 18, 2015 5:42 pm
by tepples
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?
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.

Re: How to convert a photo to NES format

Posted: Sat Jul 18, 2015 7:41 pm
by dougeff
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.

Re: How to convert a photo to NES format

Posted: Mon Jul 20, 2015 11:32 am
by dougeff
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.

Re: How to convert a photo to NES format

Posted: Mon Jul 20, 2015 11:35 am
by dougeff
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.

Re: How to convert a photo to NES format

Posted: Mon Jul 20, 2015 1:53 pm
by dougeff
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.

Re: How to convert a photo to NES format

Posted: Sun Aug 02, 2015 12:41 am
by dougeff
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.

Re: How to convert a photo to NES format

Posted: Sun Aug 02, 2015 2:09 am
by ccovell
Yes, this is about the bare basics of tile editing... it's not really about photo conversion or colour reduction.