nes 0.2.0

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

| Name | Results | | ---------------------------- | -------------------- | | branchtimingtests | <details><summary>3/3 Pass</summary>1.BranchBasics :heavycheckmark:
2.Backward
Branch :heavycheckmark:
3.ForwardBranch :heavycheckmark: | | cpuinterruptsv2 |

6/6 Passcpuinterrupts :heavycheckmark:
1-clilatency :heavycheckmark:
2-nmi
andbrk :heavycheckmark:
3-nmi
andirq :heavycheckmark:
4-irq
anddma :heavycheckmark:
5-branch
delaysirq :heavycheckmark:
| | cputimingtest6 | Pass | | instrtest-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> | | instrtiming |
3/3 Passinstrtiming :heavycheckmark:
1-instrtiming :heavycheckmark:
2-branch
timing :heavycheckmark:</details> | | nestest | Pass |

PPU Tests

| Name | Results | | ---------------------------- | -------------------- | | blarggpputests2005.09.15b |

5/5 Passpaletteram :heavycheckmark:
poweruppalette :heavycheckmark:
spriteram :heavycheckmark:
vbl
cleartime :heavycheckmark:
vram
access :heavycheckmark:</details> | | nmisync |
0/2 Passdemontsc :x:
demopal :x:
| | ppuspritehit |
11/11 Passppuspritehit :heavycheckmark:
01-basics :heavy
checkmark:
02-alignment :heavy
checkmark:
03-corners :heavy
checkmark:
04-flip :heavy
checkmark:
05-left
clip :heavycheckmark:
06-rightedge :heavycheckmark:
07-screen
bottom :heavycheckmark:
08-doubleheight :heavycheckmark:
09-timing :heavy
checkmark:
10-timing
order :heavycheckmark:</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> | | scanline | Pass |

APU Tests

| Name | Results | Notes | | ---------------------------- | -------------------- | -------------------- | | apumixer |

4/4 Passdmc :heavycheckmark:
noise :heavy
checkmark:
square :heavy
checkmark:
triangle :heavy
checkmark:
| | | apuphasereset | Pass | | | apureset | <details><summary>6/6 Pass</summary>4015cleared :heavycheckmark:
4017
timing :heavycheckmark:
4017written :heavycheckmark:
irq
flagcleared :heavycheckmark:
len
ctrsenabled :heavycheckmark:
works
immediately :heavycheckmark:</details> | | | aputest |
9/9 Passaputest :heavycheckmark:
1-lenctr :heavycheckmark:
2-len
table :heavycheckmark:
3-irqflag :heavycheckmark:
4-jitter :heavy
checkmark:
5-len
timing :heavycheckmark:
6-irqflagtiming :heavycheckmark:
7-dmcbasics :heavycheckmark:
8-dmc
rates :heavycheckmark:</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> | | | dmctests |
4/4 Passbufferretained :heavycheckmark:
latency :heavycheckmark:
status :heavycheckmark:
statusirq :heavycheckmark:
| | | dpcmletterbox | Pass | HSYNC timing issues create flicker when scrolling | | fadeoutandtriangletest | Pass | | | squaretimerdiv2 | Pass | | | 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> | | | testapuenv | Pass | | | testapum | <details><summary>3/3 Pass</summary>test9 :heavycheckmark:
test
10 :heavycheckmark:
test11 :heavycheckmark:
| | | testapusweep |
2/2 Passsweepcutoff :heavycheckmark:
sweepsub :heavycheckmark:
| | | testaputimers |
4/4 Passdmcpitch :heavycheckmark:
noisepitch :heavycheckmark:
square
pitch :heavycheckmark:
trianglepitch :heavycheckmark:
| | | testtrilinctr | Pass | | | volume_tests | Pass | |

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

  • 71 downloads total

Score:
1.8
Short URL:
nes.dub.pm