Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Dstexcomp: Difference between revisions

From GameBrew
No edit summary
m (Text replacement - "|download=https://dlhb.gamebrew.org/dshomebrew/" to "|download=https://dlhb.gamebrew.org/dshomebrew2/")
 
(23 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox homebrew
{{Infobox DS Homebrews
| title       = dstexcomp
|title=dstexcomp
| image       = [[File:Dstexcompds.png|300px]]
|image=Dstexcomp4.png
| type       = PC Utility
|description=NDS Texture Compressor.
| version     = 0.1 30 March 2009
|author=kvance (Kevin Vance)
| licence    = Mixed
|lastupdated=2009/03/30
| author      = kvance (Kevin Vance)
|type=File Operation
| website     = http://kvance.com/dstexcomp/
|version=0.1
| download    = Media:Dstexcomp01.tar.gz
|license=Mixed
| source      =
|download=https://dlhb.gamebrew.org/dshomebrew2/dstexcomp.7z 0.1 & Example
|website=https://www.kvance.com/dstexcomp
|source=https://www.kvance.com/dstexcomp
}}
}}
This is a python script that can generate compressed textures for the Nintendo DS. It takes any image as input, and can output the NDS formatted texture in a variety of ways.
This is a python script that can generate compressed textures for the Nintendo DS. It takes any image as input, and can output the NDS formatted texture in a variety of ways.


==Installation==
==Installation==
'''Requirements:'''
===Requirements===
* [http://www.python.org/download/releases/2.5.4/ Python 2.5.]
* [http://www.python.org/download/releases/2.5.4 Python 2.5.]
* [http://www.pythonware.com/products/pil Python/ Imaging Library.]
* [http://www.pythonware.com/products/pil Python Imaging Library.]
* [http://numpy.scipy.org/ NumPy.]
* [http://numpy.scipy.org NumPy.]
* [http://www.scipy.org/ SciPy.]
* [http://www.scipy.org SciPy.]
* [http://pyprocessing.berlios.de/ pyprocessing.]
* [http://pyprocessing.berlios.de pyprocessing.]


It will optionally use [http://psyco.sourceforge.net/ Psyco] if you have it.
It will optionally use [http://psyco.sourceforge.net Psyco] if you have it.


==User guide==
==User guide==
Line 28: Line 29:
Compressed textures have a slightly complicated format, and the hardware is not very forgiving about how they are stored. The texture is divided into three parts:
Compressed textures have a slightly complicated format, and the hardware is not very forgiving about how they are stored. The texture is divided into three parts:


* '''Pixmap''' - The pixels of the texture, grouped into 4x4 blocks.
* Pixmap - The pixels of the texture, grouped into 4x4 blocks.
* '''Index''' - A map from each pixel block to a part of the palette.
* Index - A map from each pixel block to a part of the palette.
* '''Palette''' - The list of colors, used in groups of 2 or 4.
* Palette - The list of colors, used in groups of 2 or 4.


The pixmap can be stored in texture slots 0 or 2. The index must be stored in slot 1. This prevents textures larger than 1024x512, since the index would be in the middle of them. Palettes are stored normally.
The pixmap can be stored in texture slots 0 or 2. The index must be stored in slot 1. This prevents textures larger than 1024x512, since the index would be in the middle of them. Palettes are stored normally.


[http://gamebrew.org/wiki/File:Texcompexds.zip Example NDS Binary].
==Screenshots==
https://dlhb.gamebrew.org/dshomebrew/dstexcomp3.png
 
==External links==
* Author's website - https://www.kvance.com/dstexcomp


[http://gamebrew.org/wiki/File:Texcompexdssrc.tar.gz Example C Source Code].


<br>
[[Category:PC utilities for DS]]
[[Category:DS homebrew applications]]
[[Category:Other DS applications]]

Latest revision as of 05:02, 16 August 2024

dstexcomp
Dstexcomp4.png
General
Authorkvance (Kevin Vance)
TypeFile Operation
Version0.1
LicenseMixed
Last Updated2009/03/30
Links
0.1 & Example Download
Website
Source

This is a python script that can generate compressed textures for the Nintendo DS. It takes any image as input, and can output the NDS formatted texture in a variety of ways.

Installation

Requirements

It will optionally use Psyco if you have it.

User guide

Hardware texture compression on the NDS allows you to display very large textures for the device. You can store two compressed 1024x512 textures on a device with a total screen size of 256x384. There is no performance penalty, as the hardware can decompress them on the fly. Unfortunately, the tools to generate compressed textures are not available to the homebrew community.

Compressed textures have a slightly complicated format, and the hardware is not very forgiving about how they are stored. The texture is divided into three parts:

  • Pixmap - The pixels of the texture, grouped into 4x4 blocks.
  • Index - A map from each pixel block to a part of the palette.
  • Palette - The list of colors, used in groups of 2 or 4.

The pixmap can be stored in texture slots 0 or 2. The index must be stored in slot 1. This prevents textures larger than 1024x512, since the index would be in the middle of them. Palettes are stored normally.

Screenshots

dstexcomp3.png

External links

Advertising: