It is currently Sat Oct 21, 2017 3:34 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3
Author Message
PostPosted: Sat Jul 18, 2015 8:11 am 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 915
Location: Japan
Yes, Mixed...Remixed...Mixed...Remixed... it was hard to find.

_________________
http://www.chrismcovell.com


Top
 Profile  
 
PostPosted: Sat Jul 18, 2015 9:39 am 
Offline

Joined: Sun Apr 13, 2008 11:12 am
Posts: 6289
Location: Seattle
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...


Top
 Profile  
 
PostPosted: Sat Jul 18, 2015 1:42 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10065
Location: Rio de Janeiro - Brazil
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.

Quote:
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.


Top
 Profile  
 
PostPosted: Sat Jul 18, 2015 2:00 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19113
Location: NE Indiana, USA (NTSC)
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.

Quote:
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.


Top
 Profile  
 
PostPosted: Sat Jul 18, 2015 2:28 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
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.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sat Jul 18, 2015 5:28 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10065
Location: Rio de Janeiro - Brazil
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?


Top
 Profile  
 
PostPosted: Sat Jul 18, 2015 5:42 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19113
Location: NE Indiana, USA (NTSC)
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.


Top
 Profile  
 
PostPosted: Sat Jul 18, 2015 7:41 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
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


Top
 Profile  
 
PostPosted: Mon Jul 20, 2015 11:32 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
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.


Attachments:
Fruit10.gif
Fruit10.gif [ 9.66 KiB | Viewed 1438 times ]
Fruit9.gif
Fruit9.gif [ 8.71 KiB | Viewed 1438 times ]
Fruit7.gif
Fruit7.gif [ 9.7 KiB | Viewed 1438 times ]

_________________
nesdoug.com -- blog/tutorial on programming for the NES
Top
 Profile  
 
PostPosted: Mon Jul 20, 2015 11:35 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
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.


Attachments:
scan5.nes [24.02 KiB]
Downloaded 59 times
Fruit5.gif
Fruit5.gif [ 9.61 KiB | Viewed 1438 times ]

_________________
nesdoug.com -- blog/tutorial on programming for the NES
Top
 Profile  
 
PostPosted: Mon Jul 20, 2015 1:53 pm 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
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 61 times
Fruit11.gif
Fruit11.gif [ 8.32 KiB | Viewed 1426 times ]

_________________
nesdoug.com -- blog/tutorial on programming for the NES
Top
 Profile  
 
PostPosted: Sun Aug 02, 2015 12:41 am 
Offline
User avatar

Joined: Fri May 08, 2015 7:17 pm
Posts: 1780
Location: DIGDUG
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.

_________________
nesdoug.com -- blog/tutorial on programming for the NES


Top
 Profile  
 
PostPosted: Sun Aug 02, 2015 2:09 am 
Offline

Joined: Sun Mar 19, 2006 9:44 pm
Posts: 915
Location: Japan
Yes, this is about the bare basics of tile editing... it's not really about photo conversion or colour reduction.

_________________
http://www.chrismcovell.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 43 posts ]  Go to page Previous  1, 2, 3

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group