LLVM IR → WLA DX (ASM 65c816) → SNES Rom
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bindings
cmake LLVM Initial files Jul 17, 2017
docs LLVM Initial files Jul 17, 2017
examples
include Binding snes with important LLVM files Aug 26, 2018
lib removing warning messages when executing llc Sep 10, 2018
projects LLVM Initial files Jul 17, 2017
resources LLVM Initial files Jul 17, 2017
runtimes
test
tools Binding snes with important LLVM files Aug 26, 2018
unittests LLVM Initial files Jul 17, 2017
utils
.gitignore
CMakeLists.txt
CODE_OWNERS.TXT LLVM Initial files Jul 17, 2017
CREDITS.TXT LLVM Initial files Jul 17, 2017
LICENSE.TXT LLVM Initial files Jul 17, 2017
LLVMBuild.txt
README.md Updating README file Sep 9, 2018
README.txt
RELEASE_TESTERS.TXT
configure
llvm.spec.in LLVM Initial files Jul 17, 2017

README.md

LLVM IR to the SNES plataform

This project aims to transform LLVM IR into WLA DX (ASM 65c816), assemble the output and generate a SNES ROM. Please read the links below to further information on SNES and LLVM plataforms.

The wiki's homepage for general information on SNES architecture (65c816)

How to test it

Install it locally:

  • cd </path/to/llvm-to-snes/>
  • makedir build-snes && cd build-snes
  • cmake -DLLVM_TARGETS_TO_BUILD=X86 . --build . -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=SNES
  • make install // it might take a while

Run: // please read observations below

  • clang your_filename.c -S -emit-llvm -o your_filename.ll
  • <path/to/llvm-to-snes>/build-snes/bin/llc -march=snes <your_filename>.(ll|bc)
Obs.1

You may test it with any language that compiles to llvm, or you might write it yourself by hand, as long as the file has LLVM extensions .ll or .bc.

Obs.2

SNES (65c816) has a 16-bit architecture and this project up-to-date does not support 32 or 64 bit. A good example for a file test would be:

// sum_file.c
short sum(short a, short b) {
  return a + b;
}
Obs.3

You may find C files for testing under ./test/Examples/SNES`.

Obs.4

The files for this project can be found inside the folder ./lib/Target/SNES/. We have forked the whole LLVM because we have plans of using Docker containers in the future for such tasks.

How to help

We still have a lot of tasks before creating a first version of this project. All skill levels are welcome to accomplish tasks such as:

  • Testing and reporting issues
  • Creating test files
  • Working on project documentation
  • Creating libraries for LLVM frontend languages (such as C and Rust)
  • Developing the backend (Check ./lib/Target/SNES/TODO.md)
  • Many others