Giter Club home page Giter Club logo

simple-gb-asm-examples's Introduction

Simple Game Boy Assembly Examples

This is a collection of simple examples for learners of assembly for the Nintendo Game Boy. They are meant to be primarily single-file examples with minimal dependencies which can be built easily to demonstrate commonly used hardware features of the platform. These are not meant to be good examples of how to structure/build complex projects nor are they meant to be comprehensive tutorials.

I hope someone finds them useful!

A simple batch file (Windows) and bash script (GNU/Linux) are provided for quick conversion/assembly/linking/fixing of the examples. They require RGBDS to be accessible, either installed somewhere in the path or copied locally. Please see the RGBDS installation instructions for more information on installing RGBDS.

Building the Examples

To build an example, navigate to a given example's directory, such as /src/background-tile in a terminal, and run:

  • Windows: ..\build.bat background-tile.asm
  • Linux: ../build.sh background-tile.asm

The example should assemble/link/fix, creating a ready-to-run ROM. Symbol and map files will also be generated alongside the ROM file. Some examples include PNG assets which will be converted to 2bpp binary files and/or tilemaps.

Helpful Resources

  • Pandocs - The main resource for details on the Game Boy hardware
  • hardware.inc - The repository for the hardware.inc file (which still gets updates!)
  • GB ASM Tutorial - A modern and thorough tutorial teaching Game Boy assembly in much greater detail than these examples ever will
  • Awesome Game Boy Development - A curated list of awesome resources for Game Boy development

Examples

Name Description Screenshot
background-tile Show a single background tile background-tile
background-tilemap Show a background tilemap background-tilemap
background-fullscreen Show a fullscreen background image (360 unique tiles) background-fullscreen
sprite Show two sprites manually copied to OAM RAM sprite
oamdma Show 40 sprites copied using OAM DMA oamdma
vblank Use the vblank interrupt to limit main loop speed with an animation vblank
joypad Poll the joypad and display the button states joypad
grid-collision Perform simple collision on a grid grid-collision-1

License

The code in this repository is licensed under the CC0 license. To the extent possible under law, all copyright and related or neighboring rights to code presented within simple-gb-asm-examples have been waived. This work is published from Canada.

The majority of the assets in this repository are licensed under the CC0 license. Assets not covered by this license are covered by a less permissive CC license, with their licensing information provided in the source file where they are included.

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.