Skip to content
Projetos

Sobre

Um emulador de Game Boy para Emacs.

Jogos e emulação

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
0
em 7 dias
0
em 15 dias
0
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Eboy - Emacs Gameboy Emulator

A Nintendo Gameboy emulator for Emacs. This is a work in progress! Just got Tetris starting up, not tested with anything else.

It currently runs a constant loop without delay. To get out of this loop, use the common C-g command.

In a graphical Emacs the screen is drawn as an image, in a terminal as unicode block characters. Set eboy-display-type to image or text to choose yourself (default auto); eboy-display-scale sets the image size (default 4, so 640x576 pixels) and eboy-display-palette its colours.

The text display needs a window of at least 321 by 145 characters. In a graphical Emacs eboy shrinks the font for that, in a terminal you need a large terminal window with a small font. By default the characters are set for a dark theme; use the unicode list below when you have a light theme.

(setq eboy-display-unicode-list eboy-display-unicode-list-light-theme)

It has frameskip enabled, by default set to 20.

Why?

I always wanted to learn how to a make an emulator and want learn how to write packages for Emacs. So here my first emulator and first emacs package.

Prerequisites

Emacs :)

Installing

Emacs 29 or newer can install it straight from GitHub:

(package-vc-install "https://github.com/vreeze/eboy")

This byte-compiles it, and if your Emacs has native compilation it is native-compiled in the background as well. That matters a lot here: run uncompiled, eboy is about 5 times slower.

Usage

Load a rom using the M-x eboy-load-rom command.

Gameboy Eboy
Start Enter
Select Space
B j
A k
up w
left a
down s
right d

To continue a game after you pressed C-g, use the M-x eboy-run command.

Eboy related messages are written to the buffer *Eboy Messages*.

Development

From a checkout, make help lists the tasks:

make                          # byte- and native-compile
make run                      # start eboy in a clean Emacs (emacs -Q), pick a rom
make run ROM=path/to/game.gb  # ... or start a rom directly
make test                     # run Blargg's cpu_instrs test roms headless
make test-visual              # ... the same, one after another on screen
make bench                    # performance benchmarks, see performance.org

make test takes about 17 seconds and make test-visual about 2 minutes (Apple M1). A test that doesn't finish within 40 emulated seconds counts as hanging; set EBOY_BLARGG_TIMEOUT (in emulated seconds) to change that.

To watch a single Blargg test on screen instead, run its rom with make run, for example make run ROM="roms/blargg/cpu_instrs/06-ld r,r.gb". The result ("Passed" or "Failed" with the failing opcodes) appears as text in the display.

make test and make bench download Blargg's test roms into roms/ the first time (make roms); they are not part of the repository.

Blargg's test roms status

All of Blargg's cpu_instrs tests pass: the 11 individual roms (make test) and the combined cpu_instrs.gb (which also exercises MBC1 bank switching).

Explore projetos relacionados

Carregando…