Graphics editor for NES

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Graphics editor for NES

Post by tepples » Wed Jul 25, 2012 7:30 am

Get it!

Over the past several weeks, it's been unusually hot and dry in northern Indiana, and I haven't been able to work on my platformer due to lack of opportunity to shoot footage from which to make character sprite graphics. (Sorry tokumaru.) So I decided to work on a different project, and when I can't make games, I make tools.

I discovered duplicate tiles in the background bank of Super Mario Bros.: $43 and $BB. Shame on you Nintendo for missing these! :P

And in the process of doing so, I created a nametable editor that runs on an NES. It already has these features:
  • Draw on nametable using 8x8 pixel tiles from the pattern table and 16x16 pixel color areas
  • Edit the background palette
  • CHR optimization: remove duplicate tiles or unused tiles
It comes with tools written in Python to do these:
  • Create a .sav from a pattern table or nametable in a 2-bit PNG file
  • Create a .sav from a PPU memory dump produced using FCEUX for Windows (Debug > Hex Editor, then File > Dump > PPU Memory) or other debugging NES emulators. Useful for getting title screens and the like.
  • Export a drawing or just the tile sheet from a .sav to a PNG file
To make the program easy to learn, I had to summarize the NES background graphics constraints in a space no bigger than two tweets:

Code: Select all

THE SCREEN IS 30 ROWS OF 32
TILES, EACH 8 BY 8 PIXELS.
A PICTURE CAN USE UP TO 256
DIFFERENT TILES.

EACH 2 BY 2 TILE AREA CAN
USE ONE OF FOUR COLOR SETS
IN THE PALETTE. ALL COLOR
SETS HAVE THREE COLORS PLUS
A SHARED BACKGROUND COLOR.

That would have been useful back in Carnivac's thread from a year ago.

The CHR optimization isn't very useful now, but it will be once I add a tile editor in a future release. The next things I plan are a way to build a slideshow ROM from multiple .sav files, a tile editor, and an OAM editor.

The FCEUX PPU dump does not cover scrolling, selection of background patterns from $0000 or $1000, raster effects, or OAM. Background pattern table selection and limited support for scrolling are in the PPU dump converter, but one needs the forthcoming FCEUX 2.1.6 to export OAM.

Get it!

proveaux
Posts: 87
Joined: Wed Feb 15, 2012 10:19 pm

Post by proveaux » Wed Jul 25, 2012 8:34 am

Will try it out when i get home. Sounds like something i can use.

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Graphics editor for NES

Post by tepples » Fri Aug 03, 2012 8:36 am

Did anyone ever manage to try this? Or are you all waiting for me to implement the tile editor first?

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Graphics editor for NES

Post by tepples » Sun Aug 19, 2012 9:39 pm

OK, I get it. You all want a tile editor so that the tool can become self-sufficient, and you want some example pictures to play with. I'll try to have some of those done this week.

LocalH
Posts: 172
Joined: Thu Mar 02, 2006 12:30 pm

Re: Graphics editor for NES

Post by LocalH » Mon Aug 20, 2012 12:44 am

Kinda, yeah. I love the idea of editing graphics on the system that the graphics are designed for (having come from a C64 background where such editors are commonplace) and have toyed around with the idea of something similar for the Mega Drive. It sorta helps when you can do everything within the tool though :)

80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Re: Graphics editor for NES

Post by 80sFREAK » Mon Aug 20, 2012 5:29 am

2 tepples Just a question... You said
I created a nametable editor that runs on an NES.
Are you sure?

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Graphics editor for NES

Post by tepples » Mon Aug 20, 2012 7:11 am

I test editor.nes mostly in FCEUX, but I successfully ran it on my NES + PowerPak last night. I have a screenshot of (an earlier build of) the nametable editor part. Are you seeing breakage on your NES that's not present in an emulator? Or are you having trouble learning how to control it?

80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Re: Graphics editor for NES

Post by 80sFREAK » Wed Aug 22, 2012 5:14 am

Which mappers supported?

User avatar
tokumaru
Posts: 11471
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Graphics editor for NES

Post by tokumaru » Wed Aug 22, 2012 7:00 am

80sFREAK wrote:Which mappers supported?
Does it matter? Except for the MMC5, that can work around the "same palette for each 16x16 pixel area" limitation, NES graphics are always the same no matter the mapper.

User avatar
mikejmoffitt
Posts: 1348
Joined: Sun May 27, 2012 8:43 pm

Re: Graphics editor for NES

Post by mikejmoffitt » Wed Aug 22, 2012 7:25 am

tokumaru wrote:
80sFREAK wrote:Which mappers supported?
Does it matter? Except for the MMC5, that can work around the "same palette for each 16x16 pixel area" limitation, NES graphics are always the same no matter the mapper.
Don't forget lil' VRC6!
Image

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Graphics editor for NES

Post by tepples » Wed Aug 22, 2012 7:32 am

The intended board for this program is SNROM. If by "mapper support" you mean triggering a bankswitch part of the way down the screen to get more distinct tiles or switching between the left and right nametables every 8 scanlines to get 16x8 pixel color areas, then that's not supported. Is it a necessary feature?

The tile editor is coming tonight, barring major unforeseen mishaps.

User avatar
Bregalad
Posts: 7768
Joined: Fri Nov 12, 2004 2:49 pm
Location: Chexbres, VD, Switzerland

Re: Graphics editor for NES

Post by Bregalad » Wed Aug 22, 2012 11:41 am

Tepples, you probably worked very hard on this, but yet I have trouble getting my CHR files in a .sav files. A tile editor is not nessarly, but something that does CHR to .sav easily would definitely help.

Also if you made a meta-sprite editor it would be awesome !
Don't forget lil' VRC6!
What tokumaru said - aside MMC5's ExGraphics, NES graphics are the same no matter the mapper.
Castlevania III does NOT use any special graphics from MMC5 nor the VRC6. (unless you count switching the CHR-ROM mid-frame as "special" - in that case, SMB3 is just as special).

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Graphics editor for NES

Post by tepples » Wed Aug 22, 2012 1:49 pm

Editor 0.02 with the tile editor is out. Get it
Bregalad wrote:Tepples, you probably worked very hard on this, but yet I have trouble getting my CHR files in a .sav files. A tile editor is not nessarly, but something that does CHR to .sav easily would definitely help.
I've made a note in the manual that .chr (4096 bytes) + 4096 bytes of zeros = .sav (8192 bytes).
Bregalad wrote:Also if you made a meta-sprite editor it would be awesome !
Sprites will take a while.
Bregalad wrote:(unless you count switching the CHR-ROM mid-frame as "special" - in that case, SMB3 is just as special).
The title screen of Smash TV (MMC1 based) is special too.

80sFREAK
Posts: 275
Joined: Sat Sep 03, 2011 11:40 pm

Re: Graphics editor for NES

Post by 80sFREAK » Wed Aug 22, 2012 11:42 pm

tepples wrote:SNROM
Good :)

tepples
Posts: 21755
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Graphics editor for NES

Post by tepples » Wed Aug 29, 2012 2:50 pm

So, d'ya come up with any pictures?

Post Reply