I-CHR: Turn an image sequence into bankswitched CHR

Kasumi

New member
I guess I'm finally just going to make a topic.

I see a lot of people making graphics and such. This will let you put your background graphics into an actual NES ROM (or mark where your mistakes are).
IUYpL7y.gif

You can use this to really drill the limitations into your head before NES Maker. But be aware: It allows things that (from my understanding) aren't currently possible in NES Maker. If your Tile16s count (at the top) goes above 64, your graphics are not NES Maker ready. And if use more than 4 frames, your graphics are not NES Maker ready. If your Tile16s goes above 256... you should definitely revise unless the scene is not meant to be one where gameplay takes place.

It includes a quickref gif of the limitations. But you can also read this more in depth one: https://pixelation.org/index.php?topic=10784.msg115062#msg115062

Get it here: https://kasumi.itch.io/ichr
Feel free to ask questions.
 

Kasumi

New member
Making another post so when I update the main post it's not weird. I've been working to make this do more behind the scenes:
Multiple level import:
xlkAQji.gif

Sprite import:
Aj2Y8tD.gif

And more banking. Currently the images you import are limited to 8 screens. But I want to get up to 256 screens. I want to be able to get this image in: https://i.imgur.com/vHB6WSt.png
Edit: Done.
knABiIN.gif

Now to make it export multiple images in the same ROM.

My final plans for this are to allow it to put together animations/hitboxes of the imported sprites, and maybe place one animated version of a character in the map. It's meant to be more of an image test program like NES Screen Tool than a full game maker like NES Maker. My main goal is to remake the things I didn't like about NES Screen Tool while working on Indivisible.

I'm mainly making it for myself for my own future games, but other people have found it useful.
 

Kasumi

New member
xHtQrna.gif

It now exports multiple "levels" in the same ROM. (But this functionality is still not available to download.)
Diver by Justin Cyr, maps from Link's Awakening and EarthBound Beginnings, Spinning Beach girl by me.

I'm going to work on sprite management stuff now.
 

Kasumi

New member
Can any NES Maker Beta user please confirm if the attached file imports correctly?
View attachment bckCHR_00.zip
You have to unzip it since the forum doesn't support bmp files :(
ftn9Sbc.png

This is what the palettes are meant to look like. (The gray is a border, not part of the palettes. 4 colors, gray, 4 colors, gray etc.) If this works, I'll try to release an update that can output images like this so that you don't have to manually recolor your images for NES Maker.

xlOwMqS.gif

I've also been working on sprite importing stuff. Importing now works (and is now in the same program as the background tool), but exporting does not. There are also scrollbars now, so large images don't push important information off the screen, as well as zooming support. (But none of this is available yet. Sprite export will probably need to be finished before I update this fully. But I may push out an update for easier NES Maker background import with none of the sprite functionality.)
 

Kasumi

New member
Sprite Exporting done:
edPoA6O.gif

But it actually doesn't export the useful files in a useable way. (i.e. outside the ROM)
So I guess the todo list before I upload the new build:
1. Some miscellaneous palette management requests.
2. Adding the concept of sprite animations to the ROM. (In the image above, I'm animating the girl manually. I'd like to be able to export several animations to the ROM and have them play automatically and be switched at runtime.)
3. Exporting useful sprite data.
4. Figure out how I want to handle palettes long term.
And... maybe...
5. Fix the auto sprite overlay behavior. It doesn't export the sprite overlay to the ROM on success, and it doesn't mark errors on failure. I'll probably just remove access to this function for the next release.

Beyond those things, I want a way to manage hitboxes, and a way to define collision info for background tilesets. Then I can really start using the data this thing puts out for games.
 

Kasumi

New member
Watch... as I keep posting updates here, but never actually release the program with the updates.

This was posted in another topic:
fCyZuar.gif

You can now also save and load characters to a file. This would allow you to share them, or whatever. But it also allows you to avoid the time consuming tilification™ process.
Here are some animations from Street Fighter 3: 3rd Strike's Chun Li:
8FCrDga.gif

(The holes are because most of these are more than 63 8x8 sprites. I-CHR only supports 63 [rather than 64] to avoid moving a pointer.)
You can export multiple characters in a ROM too.
I made the Chun Li animations 3 colors to make it use fewer sprites, but the program can import 12 color characters if you really want.

What's left before release is just a lot of cleanup. The ROM doesn't support say... 80 characters, but the program won't stop you from adding that many. It won't give an error if you export too much CHR. Things like that.

I also need to make it export useful data for homebrewers sprite-wise. (The ROM is cool, but not useful if you wanted to use the character in one's own game.)
 

Kasumi

New member
Thanks, Dchilders84!

I converted a pixel friend's art using the unreleased version of this software: https://twitter.com/Namatnieks/status/1009411399305621504

I just hope it ends up useful to some people.
 

Kasumi

New member
I did want to have this out before NES Maker's release for the auto red, green, blue, black bitmap creation at least, but hey, what can you do?
New gif:
990NV3x.gif

You can now load an image sequence and it will automatically make that sequence an animation so you don't have to manually add the frames. The gif shows me loading a Super Mario Bros. image sequence, then loading a Mega Man sequence. The sequences are "regular" images, they're not already made into tiles or anything. I-CHR does that automatically. (It even guesses the palettes automatically.) Basically so long as your image sequence has less than 13 colors (13 because of transparency), I-CHR will import it without complaining. But if it's HUGE, it may still need more than the 64 sprites NES has to display it. And if it's HUGE and a lot of frames, the importing is VERY slow. Mario and Mega Man together took about 8 seconds to import, so it's fine for sane art. (I cut some of the loading time out of the GIF for presentation purposes.)

The GIF also shows some palette remapping stuff. If you don't like I-CHR's guesses (or you just want to make them purple silhouettes :p ), you can load your own palette that has the indices in the order you want. The sprite stuff isn't very NES Maker compatible, I just think it's cool. I've also fixed a few bugs on the background import side that will help with special screen creation. When's it coming out? Who knows.
 

MistSonata

Moderator
As always, super impressive stuff, though as someone who knows absolutely nothing about CHR files, I have no idea exactly what it's doing and why it's useful.

I was hoping you could explain what possible applications this could have, practically speaking? Does it populate a tileset for you? Is there any applications that are NESmaker specific that might help people do things easier?
 

Kasumi

New member
I-CHR exists because everything I know of that makes NES ready files takes way more manual steps than is really necessary. With this tool you can see what your art looks like in an NES ROM in under 10 seconds even if it's animated. (Well. Assuming it doesn't have errors!) You just open one file (the first frame of your art in PNG format). The release you can download right now really only helps with special screens, as far as NES Maker.

NES Maker can import NES Screen Tool files for special screens. See this video: https://www.youtube.com/watch?v=V2DAFi2-cxI This outputs NES Screen Tool-like files. (Though not padded the same way if fewer than 192 tiles are used, which is a thing I still need to fix for the next release.)

Supposing you want to make your art in a graphics tool that isn't NES Screen Tool (which isn't well suited for straight drawing), and don't want to maintain an indexed palette (or don't know what an indexed palette is) this tool lets you get NES ready files from a common image format (PNG) way more quickly than anything else I'm aware of.

The version I'm working on releasing will also automatically export 4 color BMPs for NES Maker, which would help with building tilesets as you mentioned. You import your tiles (colored the way you intend them to be viewed rather than black, green, red, and blue), and you get a BMP you can use in NES Maker. One step, no manual recoloring. (You do have to recreate the palette I-CHR guesses in NES Maker as far at the tileset thing, but if I figure out more about NES Maker I can probably make it export a palette too. Or maybe it's just a matter of putting the palette file it already exports someplace specific.)

The unreleased version will let you get multiple sprite animations AND multiple animated backgrounds into a ROM as fast as you can find them in your file browser, basically. But the sprite side will not be very NES Maker friendly. High Tile Count/Overlays/Offsets that aren't multiples of 8 are all used. I am planning a more NES Maker friendly sprite thing, but I may not get to it.
 
Just read through your entire thread on skullgirls about your development on Indivisible. What a ride. You clearly have a ton of experience, and I think the community here can learn a lot from you.

If I wanted to straight draw an image for a Title screen, what software would you recommend? Or does it matter? Can I draw something, and then slowly convert it down to a reasonable format for the NES?

I'm curious how you got your background Tiles on Indivisible so detailed. It looks like they're made up of 8x8 instead of 16x16. I assume you probably programmed it like that?
(That could just be a thing Nes Maker is restricting, and not so much a Nes restriction, I don't know enough to know)

Have you successfully got any bankswitching CHR stuff working on NES Maker yet? I need to make a fire animation (Similar to that kirby water) that I think this is probably the best solution to solve, but honestly, have no idea how to approach the problem. Not even sure if Nes Maker or Mapper 30 can even handle that sort of stuff. ¯\_(ツ)_/¯
 

Kasumi

New member
For software to draw a title screen, I personally like Aseprite and Pyxel Edit. Aseprite is very, very good for pixel art. Pyxel Edit is less good than Aseprite to me, but is effective in helping reducing tile count. So my process is usually to draft up the scene in Aseprite, and tile reduce in Pyxel Edit to get the final result.

If you're looking for free software, Pyxel Edit has a free older version that's good enough as far as reducing tiles. But save often in different files! And Graphics Gale can be used in place of Aseprite.

You can make your graphics in anything, and save it as a PNG, then open the PNG in I-CHR. It can help you see errors (things the NES can't display without tricks) in your image. If there are no errors it does the conversion to NES graphics quickly and automatically. If you're not sure why it's giving you errors, or it otherwise fails at this purpose, l can try to help.

The NES limitations are that it can only have 256 8x8 tiles in memory at once (for the background), that 16x16 pixel areas (rather than 8x8 areas) must share the same set of four colors, and that there can only be four sets of four colors available (with one color being the same in every set). (All can be overcome with fancy hardware or tricks, but let's ignore that!) 16x16 tiles aren't an NES hardware concept, but many developers created a software system for them because the palette limitation basically forced structures to be 16x16 anyway.

Indivisible does use 16x16 tiles, it just does it in a different way than NES Maker. If the same 8x8 tile is used multiple times in different 16x16 tiles (or even the same 16x16 tile) in Indivisible, it will not take up extra space in the 256 tile set. In NES Maker, it usually does.

Indivisible's mid area:
9NeHxyd.png

Uses 256 16x16 tiles and 256 8x8 tiles. (The count in the image says 255 16x16 tiles because two of the tiles look the same but have different collision info.) NES Maker has its path system to give it some granularity at 8x8 instead.

Mapper 30 can do something similar to Kirby's water animation, but NES Maker doesn't have a documented way to hook it up yet that I'm aware of. As far as me adding it, it's actually way easier for me to write things from scratch than add them to NES Maker just because I'm not familiar with NES Maker's engine. The last time I tried to add something, I realized digging deeper it would have broken something else.
 
So took some finagling, but got your tool to give me no errors. It seems like I was using 2 shades of white that was going me a headache for awhile. But it was super helpful.

Now how the heck can I get it into NES maker without making it tile by tile? Or is there no way around that?
 

Kasumi

New member
Convoy_Avenger said:
So took some finagling, but got your tool to give me no errors. It seems like I was using 2 shades of white that was going me a headache for awhile. But it was super helpful.
Yeah, sorry about that. There are three ways to do it.
1. For every color in the image, make that color the closest color in the NES palette.
2. For every color in the image, pick the closest color in the NES palette, then don't allow other colors to be that palette entry.
3. Do 2 except allow really close input colors (within some range) to use the same palette entry.

I made the program do 2 because 1 ends up doing things I don't think are good. Certain colors in the palette are mathematically close to lots of different colors and they sort of... "take over". So I chose to have each color only allowed once to avoid some problems I've seen in Aseprite remapping things to the NES palette.

I do plan to have it do 3, so you can just set the range. (A range of 0 would give the exact behavior as 2), but it's definitely not getting in the next release. I'm sorry you got hit by that, but I'm glad you figured it out!

I'm adding a new color display to the new version that might help a little with it:
feMmwcA.gif

At the top it shows the hex for the color the mouse is over. Note that one white is FFFFFF and the other is FEFFFF. So one gets assigned to NES white, the other gets assigned to the next closest color. (Pink.)
The blacks are also different so one gets assigned green. :cry: I'd really like to fix it to use 3, but it's actually a pretty large change so I want to be release before I work on it.
Now how the heck can I get it into NES maker without making it tile by tile? Or is there no way around that?
See this video: https://www.youtube.com/watch?v=V2DAFi2-cxI
It wants chrblock.chr, nametable0.nam, and palette.pal inside the folder I-CHR gives you. It's possible it will reject your chrblock.chr since it doesn't make it a specific size like NES Screen Tool. That's something I'm going to fix before the next release, but if it does end up being a problem I can write about how to fix it.

Edit: Oh, hmm. I rewatched the video, it doesn't take .pal. Could have sworn it did. But the video also shows how to recreate the palette manually.
 
Kasumi said:
Convoy_Avenger said:
So took some finagling, but got your tool to give me no errors. It seems like I was using 2 shades of white that was going me a headache for awhile. But it was super helpful.

At the top it shows the hex for the color the mouse is over. Note that one white is FFFFFF and the other is FEFFFF. So one gets assigned to NES white, the other gets assigned to the next closest color. (Pink.)
The blacks are also different so one gets assigned green. :cry: I'd really like to fix it to use 3, but it's actually a pretty large change so I want to be release before I work on it.
Yup, the palettes were showing me Pinks and Oranges, and I was wondering where the heck it was pulling those colors from! So just started using the magic wand tool to select my colors, and only half my white pixels were being picked up.

Now how the heck can I get it into NES maker without making it tile by tile? Or is there no way around that?
See this video: https://www.youtube.com/watch?v=V2DAFi2-cxI
It wants chrblock.chr, nametable0.nam, and palette.pal inside the folder I-CHR gives you. It's possible it will reject your chrblock.chr since it doesn't make it a specific size like NES Screen Tool. That's something I'm going to fix before the next release, but if it does end up being a problem I can write about how to fix it.

Edit: Oh, hmm. I rewatched the video, it doesn't take .pal. Could have sworn it did. But the video also shows how to recreate the palette manually.

Recreating the palettes will be the easy part compared to everything else. Not at home right now, but knowing I need those other files now will hopefully make it a smoother process. I tried to start manually redrawing it, and I could only think "There has to be a better way!" I'll try this tonight. I guess I still need to put the words "PRESS START" On my screen as well. Sorry for moving this thread off topic!
 

Kasumi

New member
The pinks and oranges are used to mark errors.
Errors:
Orange: There are more than 13 colors in the image. (The colors used the least are marked.)
Red: There are more than 4 colors in this 16x16 pixel region. (The colors used the least are marked.)
Blue: There are more than 4 colors in this 8x8 pixel region. (The colors used the least are marked.)
Green: This 16x16 pixel region had colors that did not match any of the four color palettes. (The colors outside the closest palette are marked.)
Pressing spacebar will toggle the error overlay. Toggling it a few times will help one see where the errors are. (The new version has zooming too. I'm trying as hard as I can to get the new one out soon, there's a lot of good ease of use things in it.)

The errors stack, so if you see "purple" errors, it's a pixel with both a red and a blue error.

If you use this and need help with it, you're as on topic as you can get!
 
Is all of that information available in the Read Me, that I totally didn't read?

I saw the error output, deduced that "Those pixels have something wrong with them", and went from there, using process of elimination as to why they were erroring (Knowing they were color coded would have been tremendously helpful) . Some of them didn't make sense to me, because it was just a single pixel that shared it's color with neighbouring pixels, but was probably a case of a "Slightly off white/black" pixel. Changed them anyway. I certainly could not imagine trying to attempt to do that process manually.
 

Kasumi

New member
Is all of that information available in the Read Me, that I totally didn't read?
I opted not to mention that, but since you did, you betcha it's in the readme! I realize the readme is long. That's why I added this fancy textbox!
qvvZFfO.gif

It's actually one of the reasons for the delay. I'm adding error messages and explanations to everything I can think of. I also wrote a quick tutorial that will be included with the program. (When it comes out, which could be never at the rate I'm going!)

But this is for the sprite side, which... is not even NES Maker compatible. The background side is currently very, very far behind in reporting errors in its textbox.
 
Top Bottom