{ "info": { "author": "RoadrunnerWMC", "author_email": "roadrunnerwmc@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "ndspy\n=====\n\n[![Discord](https://img.shields.io/discord/534221996230180884.svg?logo=discord&logoColor=white&colorB=7289da)](https://discord.gg/RQhxAxw)\n[![Documentation](https://img.shields.io/badge/documentation-Read%20the%20Docs-brightgreen.svg?logo=read%20the%20docs&logoColor=white)](http://ndspy.readthedocs.io/)\n[![PyPI](https://img.shields.io/pypi/v/ndspy.svg?logo=python&logoColor=white)](https://pypi.org/project/ndspy/)\n[![License: GNU GPL 3.0](https://img.shields.io/github/license/RoadrunnerWMC/ndspy.svg?logo=gnu&logoColor=white)](https://www.gnu.org/licenses/gpl-3.0)\n\n**ndspy** (\"en-dee-ESS-pie\") is a Python library and suite of command-line\ntools that can help you read, modify and create many types of files used in\nNintendo DS games.\n\nndspy follows a few key design principles:\n\n- **Accuracy**: ndspy should be able to open and resave any supported file\n with byte-for-byte accuracy if it's in its canonical format.\n- **Flexibility**: ndspy should be able to read any valid file in a format it\n supports. In cases where there's a high chance it will be unable to fully\n interpret some especially complex part of a file, it should still be useful\n for editing the other parts.\n- **Semantic**: ndspy's APIs should closely match the semantics of file\n structures while hiding their binary-level details.\n\nndspy provides both a Python API and a set of simple command-line tools that\nmake use of it. The command-line tools let you convert files to and from binary\nformats without having to write any Python code yourself. The API is suitable\nfor use in applications written in Python, and in scripts to do more complex\ntasks than the command-line tools are capable of.\n\nAs ndspy is written in pure Python, it is cross-platform and should run on all\nplatforms Python supports. Note that Python doesn't support the Nintendo DS\nitself; ndspy is intended to be used on your PC.\n\nInterested? Read on to see some examples, or check the [API\nReference](https://ndspy.readthedocs.io/en/latest/api/index.html) to see the\ndocumentation for a specific module. When you're ready to install, head over to\nthe [Installation](#installation) section!\n\n\n\nA few examples of ndspy in action\n---------------------------------\n\nCreate a *BMG* file containing message strings:\n\n```python\n>>> import ndspy.bmg\n>>> message1 = ndspy.bmg.Message(b'', ['Open your eyes...'])\n>>> message2 = ndspy.bmg.Message(b'', ['Wake up, Link...'])\n>>> bmg = ndspy.bmg.BMG.fromMessages([message1, message2])\n>>> bmg.save()\nb'MESGbmg1\\xa0\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x02\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00INF1 \\x00\\x00\\x00\\x02\\x00\\x04\\x00\\x00\\x00\\x00\\x00\\x02\\x00\\x00\\x00&\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00DAT1`\\x00\\x00\\x00\\x00\\x00O\\x00p\\x00e\\x00n\\x00 \\x00y\\x00o\\x00u\\x00r\\x00 \\x00e\\x00y\\x00e\\x00s\\x00.\\x00.\\x00.\\x00\\x00\\x00W\\x00a\\x00k\\x00e\\x00 \\x00u\\x00p\\x00,\\x00 \\x00L\\x00i\\x00n\\x00k\\x00.\\x00.\\x00.\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'\n>>>\n```\n\nChange all notes in a *SSEQ* sequenced music file to middle C, similar to [this\nsong](https://youtu.be/cSAp9sBzPbc):\n\n```python\n>>> import ndspy.soundSequence\n>>> song = ndspy.soundSequence.SSEQ.fromFile('never-gonna-give-you-up.sseq')\n>>> song.parse()\n>>> for event in song.events:\n... if isinstance(event, ndspy.soundSequence.NoteSequenceEvent):\n... event.pitch = 60\n...\n>>> song.saveToFile('never-gonna-give-you-up-but-all-the-notes-are-c.sseq')\n>>>\n```\n\nCompress and decompress data using the *LZ10* compression format:\n\n```python\n>>> import ndspy.lz10\n>>> compressed = ndspy.lz10.compress(b'This is some data to compress')\n>>> compressed\nb'\\x10\\x1d\\x00\\x00\\x04This \\x00\\x02so\\x00me data \\x00to compr\\x00ess\\x00\\x00\\x00\\x00\\x00'\n>>> ndspy.lz10.decompress(compressed)\nb'This is some data to compress'\n>>>\n```\n\nSearch for all files starting with a particular byte sequence in a ROM:\n\n```python\n>>> import ndspy.rom\n>>> rom = ndspy.rom.NintendoDSRom.fromFile('nsmb.nds')\n>>> for i, file in enumerate(rom.files):\n... if file.startswith(b'BMD0'):\n... print(rom.filenames[i] + ' is a NSBMD model')\n...\ndemo/end_kp.nsbmd is a NSBMD model\ndemo/staffroll.nsbmd is a NSBMD model\ndemo/staffroll_back.nsbmd is a NSBMD model\nenemy/A_jiku.nsbmd is a NSBMD model\nenemy/all_goal_flag.nsbmd is a NSBMD model\n...\nmap/world7.nsbmd is a NSBMD model\nmap/world8.nsbmd is a NSBMD model\n>>>\n```\n\n\nMisconceptions\n--------------\n\nStill a little confused about what exactly ndspy is or what it's capable of?\nThis section will try to answer some questions you may have.\n\n- ndspy is a *library*, not a *program.* To use ndspy, you have to write your\n own Python code; ndspy is essentially a tool your code can use. This may\n sound daunting -- especially if you're not very familiar with Python -- but\n the\n [tutorials](https://ndspy.readthedocs.io/en/latest/tutorials/index.html)\n walk you through this process step-by-step for some common tasks. In the\n future, I plan to add some command-line and maybe even GUI tools powered by\n ndspy, but until then, this is how you use it.\n- ndspy runs on your PC, not on the Nintendo DS itself. You use it to create\n and modify game files, which can then be run on the console. DS games have\n to be written in a compiled language such as C or C++ to have any hope of\n being efficient; Python will never be a serious option there,\n unfortunately.\n- ndspy doesn't support every type of file used in every DS game. In fact,\n for any given game, it's likely that the majority of the game's files\n *won't* be supported by ndspy. There's a huge amount of variety in video\n game file formats, and it would be impossible to support them all. ndspy\n focuses on file formats used in many games, especially first-party ones.\n Support for formats that are specific to a particular game would best\n belong in a separate Python library instead.\n\n That said, certain parts of ndspy (such as its support for ROM files and\n raw texture data) have to do with the console's hardware rather than its\n software, and thus should be relevant to most or all games.\n\n\n\nInstallation\n------------\n\nndspy requires Python 3.6 or newer to run. Python 2 is not supported at all.\n\nThe easiest way to get the latest stable release of ndspy is through PyPI using\npip.\n\npip is a command-line application, so you'll need to use the Windows command\nprompt or bash to do this. The exact command you need to enter depends on your\noperating system and the settings you chose when you installed Python. One of\nthe following possibilities will probably work for you, though:\n\n pip install ndspy\n\n python3 -m pip install ndspy\n\n py -3 -m pip install ndspy\n\nIf you want the very latest version of ndspy including features and bugfixes\nnot yet in any official release, you can also download the code from the\n[GitHub repository](https://github.com/RoadrunnerWMC/ndspy) and install it\nmanually. Note that [crcmod](https://pypi.org/project/crcmod/) is a required\ndependency.\n\n\nDocumentation\n-------------\n\n[ndspy's documentation is hosted on Read the\nDocs](https://ndspy.readthedocs.io/en/latest/index.html), and the documentation\nsource code can be found in the ``docs/`` folder in this repository. In\naddition to the [API\nreference](https://ndspy.readthedocs.io/en/latest/api/index.html), there are\nalso\n[examples](https://ndspy.readthedocs.io/en/latest/index.html#a-few-examples-of-ndspy-in-action)\nand [tutorials](https://ndspy.readthedocs.io/en/latest/tutorials/index.html) to\nhelp you out!\n\n\nSupport\n-------\n\nI spent a long time writing the documentation for ndspy, so first please\ndouble-check that your question isn't already answered in the [API\nreference](https://ndspy.readthedocs.io/en/latest/api/index.html) or\n[Tutorials](https://ndspy.readthedocs.io/en/latest/tutorials/index.html)\nsections in the documentation.\n\nIf that doesn't help, you can ask me (RoadrunnerWMC) your questions via [the\nndspy Discord server](https://discord.gg/RQhxAxw). I'll try to get back to\nyou as quickly as I can!\n\nIf you think you've found a bug in ndspy, please [file an issue on\nGitHub](https://github.com/RoadrunnerWMC/ndspy/issues/new). Thanks!\n\n\nVersioning\n----------\n\nndspy follows [semantic versioning](https://semver.org/) to the best of my\nability. If a tool claims to work with ndspy 1.0.2, it should also work with\nndspy 1.2.0, but not necessarily 2.0.0. (Please note that not all of those\nversion numbers actually exist!)\n\nUndocumented modules are considered exempt from semantic versioning, and are\nsubject to drastic changes at any time. This is also mentioned in the\n[Undocumented\nAPIs](https://ndspy.readthedocs.io/en/latest/api/index.html#undocumented-apis)\nsection of the documentation.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RoadrunnerWMC/ndspy", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ndspy", "package_url": "https://pypi.org/project/ndspy/", "platform": "", "project_url": "https://pypi.org/project/ndspy/", "project_urls": { "Homepage": "https://github.com/RoadrunnerWMC/ndspy" }, "release_url": "https://pypi.org/project/ndspy/3.0.0/", "requires_dist": [ "crcmod" ], "requires_python": ">=3.6", "summary": "Python library that can help you read, modify and create many types of files used in Nintendo DS games.", "version": "3.0.0" }, "last_serial": 4803818, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "46b2d54d71d44d44c319502807945016", "sha256": "c33e480d6014a70da1a02f0c76a2edc3b0687f42ceb7f2ddcc8424e2057a1e15" }, "downloads": -1, "filename": "ndspy-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "46b2d54d71d44d44c319502807945016", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 101805, "upload_time": "2019-01-18T09:55:35", "url": "https://files.pythonhosted.org/packages/b5/da/27fe103cde860151afc4c285ef12e9c38573246bfd7ab5fc12f1bcf7faf0/ndspy-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "41148e0679698b7a215e592c6547d406", "sha256": "c4c1420a264ab289d83fd83ebb54d2038731c202b0de26eb3b7700fb7fb0ecf6" }, "downloads": -1, "filename": "ndspy-1.0.1.tar.gz", "has_sig": false, "md5_digest": "41148e0679698b7a215e592c6547d406", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 72827, "upload_time": "2019-01-18T09:55:37", "url": "https://files.pythonhosted.org/packages/49/2d/bab2a2419f8c80d6bd1782732bb6bfeab9cb3bd45f4221357b63e3e91676/ndspy-1.0.1.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "3d11e179ebfd2042f47b47a6ae96de64", "sha256": "3a7c5290d81c62d7b64854f89663a29e35562b322a16ba84a962a171fbbf4972" }, "downloads": -1, "filename": "ndspy-2.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3d11e179ebfd2042f47b47a6ae96de64", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 101831, "upload_time": "2019-01-23T06:37:36", "url": "https://files.pythonhosted.org/packages/41/49/eadc99949719112531289d35185f9f48b942b85672fa455e03f8f5e8a306/ndspy-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9a6a360c6f276abb53b924dd698058b8", "sha256": "5a2b78a147274e19d6b8ec6fbf67f250510e416fa278aba712c74627885bbaca" }, "downloads": -1, "filename": "ndspy-2.0.0.tar.gz", "has_sig": false, "md5_digest": "9a6a360c6f276abb53b924dd698058b8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 72893, "upload_time": "2019-01-23T06:37:38", "url": "https://files.pythonhosted.org/packages/1f/e7/1adcc452db91bff03a10393414ad2dc23e25e47798bb181e5568a01c402c/ndspy-2.0.0.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "482addfc654669ef98d6d88a94c2ba16", "sha256": "800c9e6154fdee2712657c0be9cea5f2c7c1f513f26e3344ac3b16d9d1fca478" }, "downloads": -1, "filename": "ndspy-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "482addfc654669ef98d6d88a94c2ba16", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 111185, "upload_time": "2019-02-11T01:38:05", "url": "https://files.pythonhosted.org/packages/12/e0/7e24c6259591bc1ebedaa9f992ccc593456004d8edfec4f0ba02ea9de81e/ndspy-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f271f647f490d9ca2f79511eab4613e8", "sha256": "0a88ea53ceed1cd66390829db9bcdf3a705dfaf070a7c9e51242abab5f4011e8" }, "downloads": -1, "filename": "ndspy-3.0.0.tar.gz", "has_sig": false, "md5_digest": "f271f647f490d9ca2f79511eab4613e8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 81468, "upload_time": "2019-02-11T01:38:07", "url": "https://files.pythonhosted.org/packages/0d/ed/b25557867dadfcc7c6a4d63fe789e8efe7eb30a7fba9740cc29fc2d6edd7/ndspy-3.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "482addfc654669ef98d6d88a94c2ba16", "sha256": "800c9e6154fdee2712657c0be9cea5f2c7c1f513f26e3344ac3b16d9d1fca478" }, "downloads": -1, "filename": "ndspy-3.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "482addfc654669ef98d6d88a94c2ba16", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 111185, "upload_time": "2019-02-11T01:38:05", "url": "https://files.pythonhosted.org/packages/12/e0/7e24c6259591bc1ebedaa9f992ccc593456004d8edfec4f0ba02ea9de81e/ndspy-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f271f647f490d9ca2f79511eab4613e8", "sha256": "0a88ea53ceed1cd66390829db9bcdf3a705dfaf070a7c9e51242abab5f4011e8" }, "downloads": -1, "filename": "ndspy-3.0.0.tar.gz", "has_sig": false, "md5_digest": "f271f647f490d9ca2f79511eab4613e8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 81468, "upload_time": "2019-02-11T01:38:07", "url": "https://files.pythonhosted.org/packages/0d/ed/b25557867dadfcc7c6a4d63fe789e8efe7eb30a7fba9740cc29fc2d6edd7/ndspy-3.0.0.tar.gz" } ] }