Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
eighty-eighty-js
Advanced tools
A nice little Intel 8080 emulator for Node.js and Browser!
About • Installation • Usage • Resources • License
Originally I wrote this because I was interested in how emulators work, and what a CPU actually does.
But, after several days of work, I managed to put together a pretty good codebase,
therefore I've decided to make this emulator available as a library of its own,
so that anyone could embed it in their web pages or applications!
I mostly followed the tutorial here: http://emulator101.com
I've made a little website to showcase this library: arcade.skayo.dev
With npm:
$ npm install eighty-eighty-js
With pnpm (recommended):
$ pnpm install eighty-eighty-js
With yarn:
$ yarn add eighty-eighty-js
or you can directly add it to your website via unpkg:
<script src="https://unpkg.com/eighty-eighty-js"></script>
If this project gains more attention I'll add some documentation!
You'll probably need to install typed-numbers
too!
import { Cpu, Memory, Device } from 'eighty-eighty-js';
import { promises as fs } from 'fs';
import { u8 } from 'typed-numbers';
// Read ROM
const programBuffer = await fs.readFile('./example-rom.bin');
// Init Memory
const mem = new Memory();
// Load ROM into Memory
mem.load(programBuffer, 0x100);
// Device that handles inputs and outputs
const device: Device = {
input(port: u8) {
console.log('INPUT', port);
return u8(0);
},
output(port: u8, byte: u8) {
console.log('OUTPUT', port, byte);
},
};
// Init CPU
const cpu = new Cpu(mem, device);
// Execution Loop
while (true) {
// Check if halted
if (cpu.halted) break;
cpu.next(); // CPU operation without any delays
// OR
await cpu.step(); // Simulates real Intel 8080 speed
}
These resources helped a lot while developing the emulator:
FAQs
A nice little Intel 8080 emulator for Node.js and Browser!
The npm package eighty-eighty-js receives a total of 5 weekly downloads. As such, eighty-eighty-js popularity was classified as not popular.
We found that eighty-eighty-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.