What Is Yane?
Yane is an acronym for Yet Another Nes Emulator. Yane is a development version of a NES emulator. It supports basic functionality, such as:
- CPU: Official and unofficial opcodes
- Horizontal and vertical scrolling
- Horizontal and vertical flipping of sprites
- 8x8 sprites
- 8x16 sprites (somewhat buggy)
- Basic sprite overflow
- Basic sprite 0 hit
- NROM, UNROM, CNROM, GNROM, AOROM, MMC1, MMC2, MMC3 support
- Controller input
Yane is only capable of playing ROMs of the following types:
- NROM (mapper #0, cartridges without any extra hardware)
- MMC1 (mapper #1)
- UNROM (mapper #2)
- CNROM (mapper #3)
- MMC3 (mapper #4)
- AOROM (mapper #7)
- MMC2 (mapper #9)
- GNROM (mapper #66)
Some games that are playable with Yane:
- Super Mario Bros 1
- Super Mario Bros 3
- Contra
- Castlevania
- Castlevania 2
- Donkey Kong Jr.
- Pacman
- Ice Hockey
- Excitebike
- Arkanoid
- Mega Man
- Mega Man 2
- Mega Man 3
- Mega Man 4
- Mega Man 5
- Metal Gear
- Alpha Mission
- Dragon Power
- Tennis
- Teenage Mutant Ninja Turtles
- Lemmings
- Darkwing Duck
- Donald Duck
- Double Dragon
- Double Dragon 2
- Double Dragon 3
- Crossfire
- Kid Klown
- Duck Tales
- Metal Mech
- Paperboy
Yane was written in the Code::Blocks IDE using C++11. Libraries used:
Purpose
I created Yane because of several reasons:
- Nostalgia (I grew up with playing the NES console)
- The challenge of creating an emulator
- Update my C++ knowledge
- Learing and appying best practices of "Effective C++" etc.
Yane is not built for speed, cycle accuracy, rom compability, etc. One goal of Yane was to be able to play Super Mario Bros 1. Yane should only be used a reference for other projects. It should probably not be used for serious NES gaming.
Contact: robin (at) alike.se
Instructions
Install Libraries
Debian/Ubuntu:
# sudo apt-get install libsdl1.2debian libsdl-gfx1.2-4 libsdl1.2-dev libsdl-gfx1.2-dev
Red Hat/Fedora:
# sudo yum install SDL SDL-devel SDL_gfx SDL_gfx-devel
Compile
Download the Yane source code:
# tar zxvf yane-0.6.6.tar.gz
# cd yane-0.6.6
# make
Run Yane
Usage:
Usage: yane [options] --rom <ROM_FILE>:
--version Show version
--help Show this help message
--rom arg What iNES rom file to use
--nes-test Treat rom as nestest (adjusted reset vector)
--blargh-test Treat rom as blargh test (polls 0x6000 for
results)
--log Enable logging of instructions (nestest format)
--rom-info Display rom headers
-f [ --fullscreen ] Use fullscreen mode
-r [ --renderer ] arg (=sdl) Use another render engine (default: SDL)
Credits
- The NESDev community
- Blargg for all test ROMs
- Other projects (mappers specifically):
Screenshots
Early versions
0.1
0.2.0
0.3.0
0.4.0
0.4.3
0.4.8
0.5.0
0.6.1
0.6.5
TODO
- Configurable keys for controller input
Passed Tests
CPU
instr_test-v3
01-implied.nes
02-immediate.nes
03-zero_page.nes
04-zp_xy.nes
05-absolute.nes
06-abs_xy.nes
07-ind_x.nes
08-ind_y.nes
09-branches.nes
10-stack.nes
11-jmp_jsr.nes
12-rts.nes
13-rti.nes
14-brk.nes
15-special.nes
instr_misc
01-abs_x_wrap.nes
02-branch_wrap.nes
cpu_reset
ram_after_reset.nes
registers.nes
PPU
ppu_vbl_nmi
01-vbl_basics.nes
02-vbl_set_time.nes (except: 04 V -)
03-vbl_clear_time.nes
04-nmi_control.nes
blargg_ppu_tests_2005.09.15b
palette_ram.nes
power_up_palette.nes
sprite_ram.nes
vram_access.nes
vbl_clear_time.nes
sprite_hit_tests_2005.10.05
01.basics.nes
sprite_overflow_tests
1.Basics.nes
References
General
Nintendo Entertainment System Documentation, by Patrick Diskin
Nintendo Entertainment System Documentation
NTSC 2C02 technical reference
NES emulator development guide
Everynes - Nocash NES Specs
CPU
6502/6510/8500/8502 Opcode matrix
6502 Microprocessor
CPU unofficial opcodes
PPU
Name tables
Attribute tables
Pattern tables
The skinny on NES scrolling
skinny.txt
Blargg's PPU info
PPU Nametables
Loading backgrounds
how and when to invert sprite virtically ?
Scrolling
Controller
Controller Reading
Standard Controller
Mappers
Comprehensive NES Mapper Document v0.80
MMC 1
MMC 2
MMC 3
Wiki MMC1
Wiki MMC2
Wiki MMC3
Kevin Horton: MMC3
Tests
Emulator tests
A few NES PPU test ROMs
Misc.
CHR-ROM vs CHR-RAM
Programming that 8-bit beast of power, the NES
NMI & IRQ
Emulator's main loop problem
Is Super Mario Bros. the most challenging game ever?
confused about something about sprite rendering
The NES Technical / Emulation / Development Frequently Asked Questions Document