A simple Pong game for the NES, written in 6502 Assembly and playable in the browser using jsNES.
This project is a two-player Pong game for the Nintendo Entertainment System (NES). The game is written in 6502 Assembly and compiled using NESASM. The compiled ROM is then served in a web browser using the jsNES emulator.
-
Player 1 (Left Paddle)
- Up: W
- Down: S
-
Player 2 (Right Paddle)
- Up: Up Arrow
- Down: Down Arrow
-
Start Game: Enter key or click the Start button
src/asm/- Contains the 6502 Assembly source codepublic/- Contains the web files served to the browserbin/- Contains the NESASM compiler binary
- Make sure you have Node.js installed
- Install dependencies:
pnpm install - Build the project:
pnpm run build - Serve the project:
cd public && python3 -m http.server 8000 - Open your browser to
http://localhost:8000
- The 6502 Assembly code (
PongTwoPlayer.asm) is compiled using NESASM to create a NES ROM file - The ROM file is copied to the
public/romsdirectory - The jsNES emulator is used to run the ROM in the browser
- The game is controlled using keyboard inputs mapped to NES controller buttons
If you see a black screen:
- Check the browser console for errors
- Make sure the ROM file is being loaded correctly
- Verify that the jsNES library is being loaded
Created by Jakob Langtry. Powered by jsNES.