It is currently Mon Nov 20, 2017 2:19 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 43 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Graphics editor for NES
PostPosted: Wed Jul 25, 2012 7:30 am 
Offline

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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 25, 2012 8:34 am 
Offline

Joined: Wed Feb 15, 2012 10:19 pm
Posts: 81
Will try it out when i get home. Sounds like something i can use.


Top
 Profile  
 
PostPosted: Fri Aug 03, 2012 8:36 am 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19236
Location: NE Indiana, USA (NTSC)
Did anyone ever manage to try this? Or are you all waiting for me to implement the tile editor first?


Top
 Profile  
 
PostPosted: Sun Aug 19, 2012 9:39 pm 
Offline

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


Top
 Profile  
 
PostPosted: Mon Aug 20, 2012 12:44 am 
Offline

Joined: Thu Mar 02, 2006 12:30 pm
Posts: 169
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 :)

_________________
Read my blog! The Incoherent Ramblings of a Lowly Geek


Top
 Profile  
 
PostPosted: Mon Aug 20, 2012 5:29 am 
Offline

Joined: Sat Sep 03, 2011 11:40 pm
Posts: 275
2 tepples Just a question... You said
Quote:
I created a nametable editor that runs on an NES.
Are you sure?


Top
 Profile  
 
PostPosted: Mon Aug 20, 2012 7:11 am 
Offline

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


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 5:14 am 
Offline

Joined: Sat Sep 03, 2011 11:40 pm
Posts: 275
Which mappers supported?


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 7:00 am 
Offline
User avatar

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


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 7:25 am 
Offline
User avatar

Joined: Sun May 27, 2012 8:43 pm
Posts: 1311
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


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 7:32 am 
Offline

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


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 11:41 am 
Online
User avatar

Joined: Fri Nov 12, 2004 2:49 pm
Posts: 7271
Location: Chexbres, VD, Switzerland
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 !

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


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 1:49 pm 
Offline

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


Top
 Profile  
 
PostPosted: Wed Aug 22, 2012 11:42 pm 
Offline

Joined: Sat Sep 03, 2011 11:40 pm
Posts: 275
tepples wrote:
SNROM
Good :)


Top
 Profile  
 
PostPosted: Wed Aug 29, 2012 2:50 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19236
Location: NE Indiana, USA (NTSC)
So, d'ya come up with any pictures?


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

All times are UTC - 7 hours


Who is online

Users browsing this forum: Bregalad and 3 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