All Projects → georgjz → neko

georgjz / neko

Licence: MIT license
A simple library for SNES programming and development in 65816 assembly

Programming Languages

assembly
5116 projects

Projects that are alternatives of or similar to neko

superfeather
SNES game engine in 65816 assembly, focusing on performance, flexibility, convenience
Stars: ✭ 31 (+29.17%)
Mutual labels:  snes, 65816, 65816-assembly
ebsrc
Source code recreation for the game Earthbound
Stars: ✭ 91 (+279.17%)
Mutual labels:  snes, 65816-assembly
MOLE
(On hiatus untill untill further notice) RetroMole Core
Stars: ✭ 20 (-16.67%)
Mutual labels:  snes
AntSnes
Snes9x emulator port for Symbian
Stars: ✭ 14 (-41.67%)
Mutual labels:  snes
ghidra-65816
WDC 65816 processor module for Ghidra
Stars: ✭ 19 (-20.83%)
Mutual labels:  65816
colorstorm
A color theme generator for editors and terminal emulators
Stars: ✭ 101 (+320.83%)
Mutual labels:  snes
spc-player
SNES music player in your browser with original hardware and Arduino.
Stars: ✭ 37 (+54.17%)
Mutual labels:  snes
breeze-emu
SNES emulator written in Rust
Stars: ✭ 40 (+66.67%)
Mutual labels:  snes
BlueRetro
Multiplayer Bluetooth controllers adapter for retro video game consoles
Stars: ✭ 520 (+2066.67%)
Mutual labels:  snes
Provenance
iOS & tvOS multi-emulator frontend, supporting various Atari, Bandai, NEC, Nintendo, Sega, SNK and Sony console systems… Get Started: https://wiki.provenance-emu.com |
Stars: ✭ 4,732 (+19616.67%)
Mutual labels:  snes
RetroUnityFE
Unity frontend for the libretro API
Stars: ✭ 21 (-12.5%)
Mutual labels:  snes
xkas-plus
fork of the xkas (v14) cross assembler
Stars: ✭ 20 (-16.67%)
Mutual labels:  snes
tilemap-studio
A tilemap editor for Game Boy, Color, Advance, DS, and SNES projects. Written in C++ with FLTK.
Stars: ✭ 247 (+929.17%)
Mutual labels:  snes
exhal
Compression and decompression tools for NES, SNES, and Game Boy games by HAL Laboratory
Stars: ✭ 54 (+125%)
Mutual labels:  snes
6502.Net
A .Net-based Cross-Assembler for Several 8-Bit Microprocessors
Stars: ✭ 44 (+83.33%)
Mutual labels:  snes
snestracker
Super Nintendo Entertainment System Music Software. Super Famicom Music Software
Stars: ✭ 161 (+570.83%)
Mutual labels:  snes
SnesJs
A SNES emulator, in javascript
Stars: ✭ 28 (+16.67%)
Mutual labels:  snes
ness
A work-in-progress SNES emulator written in Rust
Stars: ✭ 31 (+29.17%)
Mutual labels:  snes
MushROMs
Super Nintendo game editing libraries and tools
Stars: ✭ 24 (+0%)
Mutual labels:  snes
kernal64
A Scala Commodore 64, 128, VIC20, CBM2 and SuperCPU emulator
Stars: ✭ 87 (+262.5%)
Mutual labels:  65816

Neko Library for SNES programming

This library is a simple starting point for writing SNES applications. It includes basic functionality like transferring data into VRAM and CG-RAM. It is written in 65816 assembly and can be built with cc65.

This is not a full engine, but rather a set of basic routines and structures to start or add to your own project. The code is geared towards flexibility rather than speed. You will probably need to adjust it to your own code and project.

This is work in progress. There is only basic input handling available and no music functionality whatsoever.

There is a separate repository that hosts a simple example project. You can find it here. Build this ROM to see how to use the Neko library.

General Design Considerations

The wider idea of this library is to provide a common set of subroutines for SNES homebrew developers. The goal is to write a robust library that can easily be integrated with little to no modifications. To this end there are several differences compared to other SNES engines and libraries.

As stated above, this is not an engine. This library provides easy to use subroutines for common task like VRAM, CG-RAM, and OAMRAM operations, reading input, etc. There are no subroutines for higher game logic functionality like collision detection, sprite management, etc. These are game specific tasks.

Another difference is the way arguments are passed to subroutines. This library tries to avoid the need for large variable tables. Instead, arguments and variables are stored on stack. See Passing Arguments to Subroutines below for details.

Usage

The simplest way to use Neko Library with your project is to add is as a git submodule - see this sample project. You only need to include NekoLib.inc in your source file and you're good to go.

Passing Arguments to Subroutines

Unlike most other projects the arguments for the subroutines for loading VRAM, etc. are passed by stack, not by register. This is a deliberate design choice to ensure that call stacks with varying depths work without loss of (register) data. It will also make the subroutines re-entrant and eliminates the need to keep (intermittent) variables for a given subroutine in WRAM. Each level of nesting keeps its own variables on the stack, and when they are no longer needed they simply disappear.

I am aware that subroutines for loading VRAM, CG-RAM, etc. do not necessarily need to be re-entrant, but other subroutines certainly will, so I choose to pass all parameters by stack to keep my codebase consistent.

Important: The parameters listed in the subroutine header must be passed from right to left on the stack.

Structure

In src/ you will find several directories. Here is a short description of the contents:

  • init/: Headers and simple reset routines required by the SNES so start correctly.
  • input/: These routines handle reading both joypads of the SNES.
  • launcher/: Use this routines to call library subroutines
  • macros/: Macros to change register sizes, etc.
  • memory/: Subroutines to transfer memory with DMA to VRAM, CGRAM, etc.

Generally, you will find a *.s and *.inc file of the same name. Include the *.inc file with .include in your source code to use the subroutines in the matching *.s file.

Just include NekoLib.inc in your source file to use Neko Library.

There is no documentation yet, check the comments in the source files for details for now.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].