Coder Social home page Coder Social logo

brynmckerracher / atmega-bluecat Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 226 KB

A virtual machine platform for Arduino Game Development.

Home Page: https://brynmckerracher.github.io/ATMega-BlueCat/

License: MIT License

C 0.43% C++ 96.27% CMake 3.30%
arduino assembly compiler interpreter lox virtual-machine risc stack-based-language atmega game-console

atmega-bluecat's Introduction

Full Pipeline Tests Deploy Documentation

BlueCat: An ATMega Game Console

TLDR: BlueCat is a language implementation and VM platform for game-development on Atmel ATMega chips.

Project Overview

Software

BlueCat is a general-purpose programming language (GPL) implementation and stack-based virtual-machine (VM) written in Arduino/C++ for game development on Atmel ATMega megaAVR chips. It aims to provide a Reduced Instruction Set Computer (RISC)-based VM and accompanying GPL for 2D graphics-based game-development on AVR ATMega chips.

Hardware

BlueCat is designed to work specifically with the XC4630 320x240 Colour TFT-LCD Display from Duinotech, an 8-button array for user input, and a single 2-wire speaker. An ANMBEST_MD272 MicroSD Card Reader is used to read hex-serialised BlueCat Assembly Language (BAL) files, which are then interpreted by the VM.

BlueCat General-Purpose Language

BlueCat GPL (BCGPL) is a weakly-typed, late-bound language based heavily on the Lox language by Robert Nystrom. It aims to provide a simple grammar for Object-Oriented Programming (OOP), with an emphasis on game-development targeting ATMega megaAVR series chips from Atmel. The compilation process is a single pass to reduce the complexity of implementation. The compiler's output language is BlueCat Assembly Language.

BlueCat Assembly Language

BlueCat Assembly Language (BAL) is the intermediary language produced by the BCGPL compiler and interpreted by the BlueCat VM (BCVM), and has the following properties:

8-Bit Instruction Set
BlueCat assembly operates using an 8-bit instruction set. This is designed to maximise the interpretation speed of the BlueCat VM by using the smallest possible word size per instruction, which requires fewer RAM accesses per instruction sequence than using a larger word size. This comes at the cost of limiting the maximum size of the instruction set to 256, but provides the additional benefit of minimising RAM usage in a low-RAM environment.

16-Bit Address Space
The VM's total addressable space is 16-bits, split into two 8-bit words. A 16-bit address space is sufficient for addressing memory spaces of up to 64KB, which covers the entire range of megaAVR chips this project is interested in. Provisions have been made for targeting larger address spaces (and therefore chips outside the megaAVR range) by abstracting address implementation into its own module in which the underlying type for an address can be changed, but it should be noted that extending the address space will incur a performance loss in the VM and increase the size of BAL sequences produced by the compiler.

The BlueCat VM

The BlueCat VM is a stack-based RISC-architecture machine that interprets and executes BAL sequences. Each BAL instruction takes exactly one VM instruction-cycle to execute.

Documentation

Documentation is automatically deployed from the main branch and is found here.

atmega-bluecat's People

Contributors

brynmckerracher avatar

Stargazers

 avatar

Watchers

 avatar

atmega-bluecat's Issues

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.