Skip to content

Python Scripts that convert Picture into Bin file and vice-versa for GameBoy Advance, DS 16-Colors Sprites and Icon Editing.

Notifications You must be signed in to change notification settings

zigaudrey/paint-hex-convertor-GBA-DS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Paint Hex Convertor GBA DS 16-Colors Icon BANNER

Paint-Hex Convertor (Gameboy Advance/DS 16-colors)

Python Scripts that convert Picture into Bin file and vice-versa for GameBoy Advance, DS 16-Colors Sprites and Icon Editing.

Ressource

Gameboy Advance

  • For the sprite, use CHR-YY to locate and create bin file with an Hex Editor. Don't forget to mention the offset when you will replace in the ROM.
  • For the palette, use mGBA and open Tool > Game State View > Palette. The bytes pair are swapped (eg: 01 EA to EA 01), write them in order then use it to find the whole palette in the ROM.

DS (16-colors), .b File

  • Use Tinke to extract NCGR, NCLR or .b file.
  • If this is a NCGR file, it's header must shows 03 00 00 00 like below. NCGR Header Depth Showing
  • If there is a compressed data (LZ10/lZ11), decompress it and extract the new one. Be sure to check the hex file if there is the NCGR or NCLR tag

DS Icon

  • Use Tinke to extract the banner.bin. The icon is at 20-21F(hex) and the palette is at 220-23F(hex).

Setups

  1. If you don't have PIL, open the command prompt and install it with PIP
  2. Open one of the scripts in command prompt for PIL lib to work

Paint-to-hex Script

  1. Choose a palette (image). It have to have a total of 16 pixels
  2. Choose a sprite sheet (image). Its dimensions should both be a divisible of 8
  3. Two bin files will be created, ready to replace data in the ROM or DS Files

Hex-to-paint Script

  • Choose a palette (bin file). Its lenght has to be 32. If you use a NCLR palette with multiple palettes, choose the right one for edit
  • Choose a sprite sheet (bin file). Its lenght has to be a divisble of 32 (one tile)
  • OR Choose a .b file. Choose the right palette for edit.
  • Choose the number of tiles for the width
  • Two images files will be created, ready to be edited in drawing tools

Update

  • 15 December of 2023: Added compatibility to Nitro DS files (Hex-to-paint) and ability to create them (Paint-to-hex).
  • 5th July of 2024: Add compatibility to .b files

Similar Tool