New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@gct256/mbtools

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gct256/mbtools

Development tools for MSX.

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

mbtools

Development tools for MSX.

Features

  • Build system: Generate Makefile and use make command to building.
  • Preprocessor: Generate assembler files from various source files.
  • Watch: Watch files, build project and reload emulator.

System required

  • node.js >= 10
  • assembler
    • pasmo: http://pasmo.speccy.org/
  • emulator

Install

$ npm install -g @gct256/mbtools

Usage

$ mkdir my-project
$ cd my-project
$ mbtools setup
$ make watch

Main commands

mbtools config

Generate global configuration in interactive. Other command needs global configuration.

namedescriptiondefaultnote
asm.typeType of assembler.pasmocurrently only pasmo
asm.pathFile path of assembler executable.
asm.extExtname of assembler source file..asm
emu.typeType of emulator.openmsxcurrently only openmsx
emu.pathFile path of emulator executable.
pp.extExtname of preprocessor result file..inc
dest.extExtname of destination file..rom

mbtools setup

Generate Makefile on current directory in interactive.

After setup, use make to build.

command lineaction
makeBuild project.
make cleanRemove generated files.
make watchStart watch mode.

Other command.

Normally not used. (used by Makefile)

mbtools watch

Start watch mode.

  • Watch file in current directory.
    • If add/update preprocess target file, start preprocess.
    • If add/update assembler source file, build project.
    • If add/update destination file, reload emulator.

mbtools js2asm FILE EXT

Generate assembler source file from JavaScript code.

FILE is file include JavaScript code. EXT is output file's extname.

  • Example:
    • FILE: foo/bar/baz.js
    • EXT: .inc
    • output: foo/bar/baz.js.inc
Convert rules
JavaScript valueresult
boolean, boolean[]DB directive. (0 or 1)
number, number[]DB directive.
Int8Array, Uint8Array, Uint8ClampedArrayDB directive.
Int16Array, Unt16ArrayDW directive.
string, string[]DB directive. (single quoted string)
otherIgnore.

NOTE: nested array flatten.

mbtools png2asm FILE EXT

Generate assembler source file from PNG image file.

FILE is image file. EXT is output file's extname.

  • Example 1: single result
    • FILE: foo/bar/baz.png
    • EXT: .inc
    • output: foo/bar/baz.png.inc
  • Example 2: multiple result
    • FILE: foo/bar/baz.png
    • EXT: .inc
    • output: foo/bar/baz.png.inc, foo/bar/baz.png.qux.inc
Convert rules

Convertion method is desided according end of file name.

end on file namemethodresult
.msx_sprite_8.png8x8 bit patternsingle
.msx_sprite_16.png16x16 bit patternsingle
.msx_screen_2.png8x8 bit pattern and 8x8 color datamultiple (.color)

mbtools shrink SIZE IN OUT

Adjust file size.

SIZE is file size by KiB IN is input file path. OUT is output file path.

TODO

  • Add assembler types.
  • Add emulator types.

FAQs

Package last updated on 13 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts