nes ~master

NES emulator library written in D


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

Summary

This is an NES emulator library written in D. It started as a port to D from Go of github.com/fogleman/nes. It's pure D & has no dependencies.

Installation

Just add "nes": "\~>0.2.0" or "nes" version="\~>0.2.0" to the dependencies section of your dub.json or dub.sdl file.

Usage

See github.com/blahness/nes_test for an example usage.

Mappers

The following mappers have been implemented:

  • NROM (0)
  • MMC1 (1)
  • UNROM (2)
  • CNROM (3)
  • MMC3 (4)
  • AOROM (7)
  • 255

Test ROM Results

CPU Tests
NameResults
branchtimingtests<details><summary>3/3 Pass</summary>1.BranchBasics :heavycheckmark:
2.Backward
Branch :heavycheckmark:
3.ForwardBranch :heavycheck_mark:</details>
cpuinterruptsv2<details><summary>6/6 Pass</summary>cpuinterrupts :heavycheckmark:
1-cli
latency :heavycheckmark:
2-nmiandbrk :heavycheckmark:
3-nmiandirq :heavycheckmark:
4-irqanddma :heavycheckmark:
5-branchdelaysirq :heavycheckmark:</details>
cputimingtest6Pass
instr_test-v5<details><summary>18/18 Pass</summary>allinstrs :heavycheckmark:
official
only :heavycheckmark:
01-basics :heavycheckmark:
02-implied :heavycheckmark:
03-immediate :heavycheckmark:
04-zeropage :heavycheckmark:
05-zp
xy :heavycheckmark:
06-absolute :heavycheckmark:
07-absxy :heavycheckmark:
08-ind
x :heavycheckmark:
09-indy :heavycheckmark:
10-branches :heavy
checkmark:
11-stack :heavy
checkmark:
12-jmp
jsr :heavycheckmark:
13-rts :heavycheckmark:
14-rti :heavycheckmark:
15-brk :heavycheckmark:
16-special :heavycheckmark:</details>
instr_timing<details><summary>3/3 Pass</summary>instrtiming :heavycheckmark:
1-instr
timing :heavycheckmark:
2-branchtiming :heavycheck_mark:</details>
nestestPass
PPU Tests
NameResults
blarggpputests_2005.09.15b<details><summary>5/5 Pass</summary>paletteram :heavycheckmark:
power
uppalette :heavycheckmark:
sprite
ram :heavycheckmark:
vblcleartime :heavycheckmark:
vramaccess :heavycheck_mark:</details>
nmi_sync<details><summary>0/2 Pass</summary>demontsc :x:
demo
pal :x:</details>
ppuspritehit<details><summary>11/11 Pass</summary>ppuspritehit :heavycheckmark:
01-basics :heavycheckmark:
02-alignment :heavycheckmark:
03-corners :heavycheckmark:
04-flip :heavycheckmark:
05-leftclip :heavycheckmark:
06-right
edge :heavycheckmark:
07-screenbottom :heavycheckmark:
08-double
height :heavycheckmark:
09-timing :heavycheckmark:
10-timingorder :heavycheck_mark:</details>
ppuvblnmi<details><summary>11/11 Pass</summary>ppuvblnmi :heavycheckmark:
01-vblbasics :heavycheckmark:
02-vbl
settime :heavycheckmark:
03-vbl
cleartime :heavycheckmark:
04-nmi
control :heavycheckmark:
05-nmitiming :heavycheckmark:
06-suppression :heavy
checkmark:
07-nmi
ontiming :heavycheckmark:
08-nmi
offtiming :heavycheckmark:
09-even
oddframes :heavycheckmark:
10-even
oddtiming :heavycheck_mark:</details>
scanlinePass
APU Tests
NameResultsNotes
apu_mixer<details><summary>4/4 Pass</summary>dmc :heavycheckmark:
noise :heavycheckmark:
square :heavycheckmark:
triangle :heavycheckmark:</details>
apuphaseresetPass
apu_reset<details><summary>6/6 Pass</summary>4015cleared :heavycheckmark:
4017
timing :heavycheckmark:
4017written :heavycheckmark:
irq
flagcleared :heavycheckmark:
len
ctrsenabled :heavycheckmark:
works
immediately :heavycheckmark:</details>
apu_test<details><summary>9/9 Pass</summary>aputest :heavycheckmark:
1-len
ctr :heavycheckmark:
2-lentable :heavycheckmark:
3-irq
flag :heavycheckmark:
4-jitter :heavycheckmark:
5-lentiming :heavycheckmark:
6-irq
flagtiming :heavycheckmark:
7-dmc
basics :heavycheckmark:
8-dmcrates :heavycheck_mark:</details>
blarggapu2005.07.30<details><summary>11/11 Pass</summary>01.lenctr :heavycheckmark:
02.len
table :heavycheckmark:
03.irqflag :heavycheckmark:
04.clock
jitter :heavycheckmark:
05.lentimingmode0 :heavycheckmark:
06.lentimingmode1 :heavycheckmark:
07.irqflagtiming :heavycheckmark:
08.irqtiming :heavycheckmark:
09.reset
timing :heavycheckmark:
10.lenhalttiming :heavycheckmark:
11.lenreloadtiming :heavycheckmark:</details>
dmc_tests<details><summary>4/4 Pass</summary>bufferretained :heavycheckmark:
latency :heavy
checkmark:
status :heavy
checkmark:
status
irq :heavycheckmark:</details>
dpcmletterboxPassHSYNC timing issues create flicker when scrolling
fadeoutandtriangle_testPass
squaretimerdiv2Pass
testapu2<details><summary>10/10 Pass</summary>test1 :heavycheckmark:
test
2 :heavycheckmark:
test3 :heavycheckmark:
test
4 :heavycheckmark:
test5 :heavycheckmark:
test
6 :heavycheckmark:
test7 :heavycheckmark:
test
8 :heavycheckmark:
test9 :heavycheckmark:
test
10 :heavycheckmark:</details>
testapuenvPass
testapum<details><summary>3/3 Pass</summary>test9 :heavycheckmark:
test
10 :heavycheckmark:
test11 :heavycheck_mark:</details>
testapusweep<details><summary>2/2 Pass</summary>sweepcutoff :heavycheckmark:
sweep
sub :heavycheckmark:</details>
testaputimers<details><summary>4/4 Pass</summary>dmcpitch :heavycheckmark:
noise
pitch :heavycheckmark:
squarepitch :heavycheckmark:
triangle
pitch :heavycheckmark:</details>
testtrilin_ctrPass
volume_testsPass

Known Issues

  • there are some minor issues with PPU timing, but most games work OK anyway
  • the APU emulation isn't quite perfect, but not far off
  • only NTSC timing supported for now
Authors:
  • Blahness
Dependencies:
none
Versions:
0.2.0 2018-Oct-30
0.1.0 2018-Feb-02
~master 2018-Oct-31
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 80 downloads total

Score:
1.7
Short URL:
nes.dub.pm