Giter Site home page Giter Site logo

blocksds-sdk's Introduction

BlocksDS SDK

1. Introduction

This is an SDK for Nintendo DS. It builds on the work of several people, and it has the following goals:

  • To create an easy-to-use NDS software development kit based on GCC with as few dependencies as possible.
  • To encourage developers to hack and improve the SDK by letting them have all the source code of the SDK. This also shows how easy it is to build the whole codebase.
  • To try to keep compatibility with pre-existing C projects. In theory, it should be enough to replace the makefile by one of BlocksDS to build any project that uses libnds.

This project is currently in beta stage, and most features are working. Please, check the libc port documentation for more information about the supported libc functions.

You may keep multiple versions of this SDK in your PC. The location of the active SDK is stored in the environment variable BLOCKSDS, so all you need to do is to change its value and point to the right version.

If you want to port a project built with devkitPro, follow this guide for instructions.

For detailed information about the design of BlocksDS, check this other document.

For licensing information, check this.

C++ standard library support is limited. It is provided by avr-libcpp. If you don't use GCC as a compiler, check the licensing notes of this library.

2. Setup

If you are using Linux, MinGW, WSL, or any similar environment, you can install the SDK using the native installation instructions.

If you are on Windows, you need to install MinGW, WSL or similar.

However, there are Docker images of BlocksDS that can be used in any OS. They require more disk space than the native installation, but they may be needed if a native installation isn't possible.

Docker

Follow the instructions in this file to use the Docker images.

Native installation

You need to install a cross compiler to build applications for NDS. You also need to build a few host tools, so you need a compiler for the host, the FreeImage library, and some build tools (Meson and Ninja):

If you're on Ubuntu, for example, run the following command:

sudo apt-get install -y --no-install-recommends \
    build-essential gcc-arm-none-eabi libfreeimage-dev meson ninja-build \
    dosfstools mtools

Clone this repository:

git clone --recurse-submodules https://github.com/blocksds/sdk.git
cd sdk

To build the SDK, run this from the root of this repository:

export BLOCKSDS=/path/to/sdk/
make

You can avoid exporting BLOCKSDS every time by adding it to your .bashrc, .zshenv or similar.

Test

To test that everything is working, you can try building one of the templates.

There is a template that lets the programmer write the code for both CPUs of the NDS (templates/rom_combined) and a template that uses the default ARM7 core that comes with Blocks DS and lets the programmer focus on the ARM9 core. There are also two templates to create static libraries.

For example, go to the combined template folder and run:

cd templates/rom_combined
make

This should have generated a NDS ROM that you can run on any emulator or flashcart.

To do a verbose build, run make like this (this also works for the Makefile of the SDK):

VERBOSE=1 make

NOTE: The paths in the Makefile that refer to source code, includes, graphics, data, etc, must be inside the folder of the project. That means you can't use .. in a path to go one level up from the Makefile. If you really need to use folders outside of the folder of the project, create a symlink to the destination, or build the other code as a static library and link it with the project.

Credits

This project wouldn't have been possible without:

blocksds-sdk's People

Contributors

antoniond avatar asiekierka avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.