Code Monkey home page Code Monkey logo

3ds-template's Introduction

3ds-template

A starter template for various 3DS homebrew applications. This template is geared specifically towards the Code::Blocks IDE. This template can also be used without Code::Blocks just use the Makefile and directory structure provided.

This is designed to be a simple and fairly minimal setup required to begin developing homebrew for the 3ds system. As such it doesn't include everything needed to build everything out of the box if you want to build 3ds or cia homebrew.

Usage

Targets Action
3ds Builds <project name>.3ds. 1
3dsx Builds <project name>.3dsx and <project name>.smdh.
cia Builds <project name>.cia. 1
citra Builds and automatically runs citra for testing.2
elf Builds <project name>.elf.
release Release build, creates a cia, 3ds, and a zip file containing the smdh and 3dsx. 3

Notes:

  • 1 This requires having makerom and bannertool in your $PATH
  • 2 make citra requires having citra installed and in your $PATH
  • 3 If you are on Windows you will need both of the following in your $PATH zip and libbz2.dll

Setting up devkitPro

  • Follow the steps installing devkitPro at the gbatemp wiki

If you want to build cia and 3ds then follow these extra steps:

  • Aquire makerom and bannertool binaries from buildtools, or compile them yourself from makerom and bannertool
  • Copy the makerom/bannertool to $DEVKITARM/bin or some other directory in your $PATH

Code::Blocks Setup

  1. Simply open 3ds.cbp in Code::Blocks
  2. Choose File > Save as user-template and enter a template name. The project setup is now a user template to create new projects.
  3. When creating a new project select File > New > From template and follow the wizard's instructions.
  4. Ensure you have the environment variables plugin installed (in linux you can install this by installing the codeblocks-contrib package)
  5. Choose Settings > Environment and scroll down to the Environment Variables section.
  6. Add DEVKITPRO and point it to where devkitpro is installed
  7. Add DEVKITARM and point it to where devkitarm is.

To compile in Code::Blocks simply select your target from the list and click the Gear icon to automatically invoke the Makefile

Note Make sure you are using MSYS2's make (make.exe) and not MINGW's make (mingw32-make.exe)

Creating a new project

  1. Make a new Code::Blocks project via a user-template you just created above. Or simply copy this directory.
  2. (Only needed for cia/3ds builds) Edit the file resources/AppInfo
    1. Edit those values and ensure you choose a unique id see unique_id_list.
    2. Replace the existing files in the resources directory to suit your needs.

Note please ensure that no folder/directory used in the project contains spaces. Devkitpro's Makefiles apparently does not like this. That is, do not have it in a folder like C:/3DS Hacking/3ds-template rather C:/3DS_Hacking/3ds-template

Credits

All of this would not have been possible without the work of

3ds-template's People

Contributors

tricksterguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

3ds-template's Issues

I keep getting Makefile error 2 when I keep trying to build files on Code: Blocks

Hi, I'm really new to Homebrew development.I think I followed the steps to set it up but I feel like I arranged the files wrong or something. Every time I click on "Build" on Code: Blocks, it would give the error "error 2". It doesn't matter if I choose which file I want to build(ex. cia, 3dsx, etc.) Again, I'm not really sure I did the steps correctly as I don't know how to fix this issue. The file explorer image shows my project folder and how it's organized and the makefile one shows the issue itself. I haven't edited anything yet but wanted to build it to test it out. Can you please tell me what I did wrong to fix this issue? If you need more information, please let me know so I can give it to you.

pass
cinema

Error 2 while compiling to Citra

Hello,
Ive been trying to compile the "basic" main.cpp file, but i keep getting this error :

Checking if target is up-to-date: mingw32-make.exe -q -f Makefile citra
Running command: mingw32-make.exe -f Makefile citra
process_begin: CreateProcess(NULL, arm-none-eabi-g++ -MMD -MP -MF C:/Users/ajini/Desktop/moh/3DS/My3DSApp1/build/main.d -Wall -O2 -mword-relocations -fomit-frame-pointer -ffunction-sections -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -IC:/Users/ajini/Desktop/moh/3DS/My3DSApp1/include -IC:\devkitPro/portlibs/3ds/include -IC:\devkitPro/libctru/include -IC:/Users/ajini/Desktop/moh/3DS/My3DSApp1/build -DARM11 -D_3DS -fno-rtti -fno-exceptions -std=gnu++11 -c C:/Users/ajini/Desktop/moh/3DS/My3DSApp1/source/main.cpp -o main.o, ...) failed.
make (e=2): The specified file hasn't been found.
mingw32-make.exe[1]: *** [C:\devkitPro\devkitARM/base_rules:80: main.o] Error 2
mingw32-make.exe: *** [Makefile:173: citra] Error 2
main.cpp
Process terminated with status 2 (0 minute(s), 3 second(s))
2 error(s), 0 warning(s) (0 minute(s), 3 second(s))

I have no idea what this means :/
It also opens base_rules file on code::blocks but there is nothing in it

I tried compiling with cmd and opening citra manually and it worked ??????
Could someone please help ? (i really dont want to have to compile with cmd and open manually citra to test the file ๐Ÿ’€)

Thank you in advance

"C:\devkitPro\devkitARM\base_rules: recipe for target 'main.o' failed"

When the "Build" button is pressed, the following error appears in the console:

"
||=== Build: 3dsx in 3ds (compiler: GNU GCC Compiler) ===|
C:\devkitPro\devkitARM\base_rules|32|recipe for target 'main.o' failed|
Makefile|161|recipe for target '3dsx' failed|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 2 second(s)) ===|
"

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.