Git Product home page Git Product logo

vc64's Introduction

vc64

Description

vc64 is a just-for-fun project made in Rust. It uses macroquad to make a cross-platform virtual console of sorts that you program in (NASM) x86-64 assembly. In it's current state, it only supports the following features:

  • 7 colors
  • clear the screen
  • get state of 9 keys
  • draw rectangles (currently uses u64 instead of f32, so poor precision)
  • basic sprite drawing

However, the hope is for these features to be implemented by the end:

  • 16x16 sprite table (written in src/sprites.asm)
  • 4-color pallette with 32 available colors
  • Dynamically-linked object files instead of only statically-linked files
  • TBD

Usage

The current implementation is ~100 lines and easy to read, so documentation would be superfluous at this stage. However, src/main.asm holds an example program to familiarize you with the concepts.

There are two assembly source files: src/windows_main.asm and src/unix_main.asm. This is necessary since Windows and Unix use different calling conventions. The build script will automatically assemble the correct source file for your target OS, but you must manually tranlate between the two. To build, you MUST have nasm in your path!

Building

Unix

Make sure you have Rust installed. Clone the repository once per game, then cd into the folder and run cargo build. This will produce a standalone executable in target/debug/. That is your game.

Windows

Make sure you have Rust and Visual Studio installed, along with VS' C++ tools. Then you can run cargo build as usual. A common indicator that your Windows assembly source is using the wrong calling convention is if it immediately panics with the text "Invalid key code: ".

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.