More actions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{Infobox homebrew | {{Infobox homebrew | ||
| title = dstexcomp | | title = dstexcomp | ||
| image = | | image = https://dlhb.gamebrew.org/dshomebrew/dstexcomp.png | ||
| type = PC Utility | | type = PC Utility | ||
| version = 0.1 | | version = 0.1 | ||
| licence = Mixed | | licence = Mixed | ||
| author = kvance (Kevin Vance) | | author = kvance (Kevin Vance) | ||
| website = http://kvance.com/dstexcomp | | website = http://kvance.com/dstexcomp | ||
| download = | | download = [https://dlhb.gamebrew.org/dshomebrew/dstexcomp.7z 0.1 and example binary] | ||
| source = | | source = http://kvance.com/dstexcomp | ||
}} | }} | ||
Line 15: | Line 15: | ||
==Installation== | ==Installation== | ||
===Requirements=== | ===Requirements=== | ||
* [http://www.python.org/download/releases/2.5.4 | * [http://www.python.org/download/releases/2.5.4 Python 2.5.] | ||
* [http://www.pythonware.com/products/pil Python | * [http://www.pythonware.com/products/pil Python Imaging Library.] | ||
* [http://numpy.scipy.org | * [http://numpy.scipy.org NumPy.] | ||
* [http://www.scipy.org | * [http://www.scipy.org SciPy.] | ||
* [http://pyprocessing.berlios.de | * [http://pyprocessing.berlios.de pyprocessing.] | ||
It will optionally use [http://psyco.sourceforge.net | It will optionally use [http://psyco.sourceforge.net Psyco] if you have it. | ||
==User guide== | ==User guide== | ||
Line 28: | Line 28: | ||
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. | ||
* | * 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. | 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. | ||
==External links== | |||
* Author's website - http://kvance.com/dstexcomp | |||
[[Category:DS homebrew applications]] | [[Category:DS homebrew applications]] | ||
[[Category:PC utilities for DS]] | [[Category:PC utilities for DS]] |
Revision as of 09:00, 12 October 2021
dstexcomp | |
General | |
---|---|
Author(s) | kvance (Kevin Vance) |
Type | PC Utility |
Version | 0.1 |
Licence | Mixed |
Links | |
[0.1 and example binary Download] | |
Website | |
Source |
<htmlet>adsense</htmlet>
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.
External links
- Author's website - http://kvance.com/dstexcomp