npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gbts

v1.1.0

Published

CLI tool that allows you to write GameBoy games on TypeScript !

Downloads

194

Readme

GBTS (GameBoy TypeScript)

GBTS (GameBoy TypeScript) is a utility to transpile, compile and create Roms for GameBoy. Stop writing your roms in C, write them in TypeScript.

This utility is based on 2 projects:

  • ts2c Transform .ts file to .c file.
  • gbdk-n Gameboy Development Kit adapted to the new Small Device C Compiler (SDCC).

Prerequisites

SDCC

First of all you need the C compiler. This will allow you to compile applications written in C for small devices.

Download and install SDCC:

Windows :

Download the latest version of SDCC :

Currently the latest version of SDCC is 3.9.0. The file to download is sdcc-3.9.0-x64-setup.exe.

Once the installer is downloaded, run it to install the compilation chain, paying attention to the following two points:

  • Make sure the “SDCC GBZ80 library” box is checked.
  • At the end of the installation, make sure the “Add C: \ ... to the PATH” box is checked too.

Linux (Debian and Ubuntu) :

Just execute the following command : sudo apt install build-essential sdcc sdcc-libraries.

NodeJS

NodeJS 8 is required.

Usages

  • 1 - Install dependencies : npm install.
  • 2 - Build : npm run build.

For now use the start script : npm start. This command requires parameters (npm start -- [--<option>], ex : npm start -- --path <path_to_.ts_file>).

| Option | Description | Example | |-----------|-------------------------------------------|-----------------------------------| | help | show help | npm start -- --help | | version | show version number | npm start -- --version | | path | Path to .ts file to be transpiled to .c | npm start -- --path C:/hello.ts |

The famous 'HelloWorld' !

Once the prerequisites have been completed, let's write your first hello workd on GameBoy. his tutorial works on windows and uses the emulator BGB. (it can be downloaded here)

Step 1

White a hello.ts TypeScript file whith the following content : console.log("Hello World!") and nothing else ...

Step 2

After installing the GBTS dependencies (npm install). Go to the root directory of GBTS and type the following command: npm start -- --path <path_to_hello.ts>.

Step 3

Once the step 2 finished, start bgb.exe and drag and drop the hello.gb one the GBG screen.

You should see the following image appear :

Hello world

Congrats !

See more examples here : https://github.com/Freuhlon/gbts-projects