OS4 DepotLogo by McFly 
(anonymous IP: 52.14.209.100,2258) 
 HomeRecentStatsSearchSubmitUploadsMirrorsContactInfoDisclaimerConfigAdmin
 Menu

 Features
   Crashlogs
   Bug tracker
   Locale browser
 

 Categories

   o Audio (343)
   o Datatype (51)
   o Demo (203)
   o Development (602)
   o Document (24)
   o Driver (97)
   o Emulation (149)
   o Game (1011)
   o Graphics (500)
   o Library (118)
   o Network (234)
   o Office (66)
   o Utility (932)
   o Video (69)

Total files: 4399

Full index file
Recent index file

 Links

  Amigans.net
  OpenAmiga
  Aminet
  IntuitionBase


Support the site


 Readme for:  Development » Cross » raw2chr.lha

Raw2chr

Description: NES CHR-ROM Creator
Download: raw2chr.lha       (TIPS: Use the right click menu if your browser takes you back here all the time)
Size: 6kb
Date: 20 Sep 2006
Author: Chris Covell, AmigaOS 4.0 compile by Spot / Up Rough
Submitter: Spot / Up Rough
Email: spot/triad se
Category: development/cross
License: Other
Distribute: yes
Min OS Version: 4.0
FileID: 2082
 
Comments: 0
Snapshots: 0
Videos: 0
Downloads: 423  (Current version)
423  (Accumulated)
Votes: 0 (0/0)  (30 days/7 days)

Show comments Show snapshots Show videos Show content Show crashlogs Replace file 
Raw2CHR is a small program that creates NES Character-ROM data from
a raw binary picture.  This is useful for NES demo or game coders
on the Amiga (or other computers) who wish to convert their graphics
into a format usable in their NES program.  Before making this program,
if I wanted to import a graphic into an NES CHR-ROM, I would have to copy
the image over to my Macintosh, save it as a PICT, then load it up in a
buggy and slow program on the Mac, bring it back over to the Amiga, then
chop off the CHR data from my NES demo.  What a pain in the butt, I can
tell you!  I won't even get into what I had to do to convert my images
into a 128x256-pixel image which that Mac "program" required of me.

I made this program because I wanted to speed up the time spent making
graphics for the NES, and because Lennart _still_ hasn't gotten around to
implementing IFF importation into GoldNESt!!  Hey, Lennart!!

Now all I have to do to make CHR-roms is save my graphics as a brush in
my favourite Amiga program, convert it to a raw binary format, then run
it through Raw2CHR.  It _really_ saves time!

Usage
-----
At the command line, type in Raw2CHR infile outfile [-w]

The infile is the raw binary graphic that you want to convert to a CHR-ROM
format.  Several programs on different platforms can create this type of
file for you.  On the Amiga, a program called ArtPro is good.  Here's how
you should go about the process:

1) Draw (or import) your graphics in a paint program.  Make sure the
graphics are 4 colours only (as that is the bit depth of the NES!!) and
256 or fewer pixels in width (as the NES' horizontal resolution is 256
pixels).

2) Pick up a brush (or selection) of the entire image having a width of
either 128 or 256 pixels, depending on whether the entire image will fit
at most into 128 or 256 pixels.  Don't worry if you're picking up a bunch
of empty space; you _can_ compress that later.  The height of the region
that you pick up should be a multiple of 8.  You should note that the
size of one NES CHR-ROM bank is 8192 bytes, which translates into either
a 256x128 or 128x256-pixel image.  Any greater than that, and the remaining
graphics will spill over into another bank.

3) Save the image to disk, and load the image into a graphics conversion
program.  (I'll use ArtPro.)  Now, save the image as a RAW file in BINARY
format (ie, not as source or anything).  The bitplanes must be chosen as
being INTERLEAVED, not planar.

4) Run Raw2CHR, specifying the raw data as the infile, and the CHR-ROM as
the outfile.  If you saved image as a 128-pixel-wide file, then you don't
need to specify anything else.  If your saved image is a full 256 pixels
wide, then you need to specify the "-w" switch.

Raw2CHR should now have created a CHR-ROM file from your image.  If your
image was bigger than what would have fit into one CHR bank and you would
like to compress the data, you can use my program, "CHARlie" to do so.
Use the "-c" switch in CHARlie, and make several passes with it over the
output files.  The graphics data should then be compressed as much as
possible into your CHR-ROM.

This program is just a small little utility, so I didn't spend (much) of a
time (at all) coding it.  As such, it is again in my favourite flavour of
spaghetti-code.  The C source code is included, if you want to improve on
it at all.


Other things of mine which you should check out are:

pix/anim/AmiBanner.lha     ;An animating GIF banner that supports Amiga.
pix/boot/Win95BURN.lha     ;My Windows'95 trasher.  Burn, baby burn!!!
pix/boot/Win95BURN.jpg     ;A JPEG version of that pic.
pix/boot/WinBURN24.lha     ;A 24-bit IFF version of that pic.
pix/wb/BeBoxWBs.lha        ;Some pics of my WB using the BeIcons.
pix/wb/JapanWB.lha         ;A Japanese Workbench. ;-)
pix/wb/HAMBrowse.lha       ;A Pic showing how to browse the WWW in HAM!
pix/icon/BeIcons_2.lha     ;A set of NewIcons in the BeOS style! (and more!)
pix/trace/SidMan*.lha      ;Concept Render of a SID-Playing Walkman.
pix/trace/SidManLCD.lha    ;LCD texture from the SID walkman.
gfx/aga/HUGEBench.lha      ;Some monitor settings for a HUGE Workbench!
text/font/C-64Font.lha     ;A Commodore-64 font with European accents.
misc/emu/Snd2Mid.lha       ;Converts NES PSG songs to MIDI!!
misc/emu/CHARlie.lha       ;Compresses NES CHR-ROM graphics.

And of course, my webpage at http://mypage.direct.ca/c/ccovell/
It has lots of stuff that you might enjoy exploring.

See ya!


Copyright © 2004-2024 by Björn Hagström All Rights Reserved