All Projects â†’ dbousamra â†’ Hnes

dbousamra / Hnes

Licence: other
🎮 NES Emulator written in Haskell

Programming Languages

haskell
3896 projects

Projects that are alternatives of or similar to Hnes

Anese
Another NES Emulator - written for fun & learning - first implementation of wideNES
Stars: ✭ 323 (-5%)
Mutual labels:  nes, emulator
Gearnes
NES / Famicom emulator for iOS, Mac, Raspberry Pi, Windows, Linux and RetroArch.
Stars: ✭ 23 (-93.24%)
Mutual labels:  emulator, nes
js-nes-emulator
NES emulator in javascript.
Stars: ✭ 12 (-96.47%)
Mutual labels:  emulator, nes
Lemuroid
All in 1 emulator on Android!
Stars: ✭ 194 (-42.94%)
Mutual labels:  nes, emulator
SaltyNES
A NES emulator in WebAssembly
Stars: ✭ 69 (-79.71%)
Mutual labels:  emulator, nes
Punes
Nintendo Entertaiment System emulator and NSF/NSFe Music Player (Linux, FreeBSD, OpenBSD and Windows)
Stars: ✭ 217 (-36.18%)
Mutual labels:  nes, emulator
nes-rust
NES emulator in Rust with GUI
Stars: ✭ 78 (-77.06%)
Mutual labels:  emulator, nes
Nsfplay
Nintendo NES sound file NSF music player
Stars: ✭ 155 (-54.41%)
Mutual labels:  nes, emulator
helios
A Java-based Sega Mega Drive/Genesis emulator. And other systems too.
Stars: ✭ 14 (-95.88%)
Mutual labels:  emulator, nes
awesome-emu-resources
A curated list of emulator development resources
Stars: ✭ 26 (-92.35%)
Mutual labels:  emulator, nes
Esplay Retro Emulation
Retro Emulation Collection for ESPlay Hardware, an ESP32 based game console
Stars: ✭ 183 (-46.18%)
Mutual labels:  nes, emulator
NostalgiaLite
Three game emulators: FC(Nes), GG, GBC for Android
Stars: ✭ 85 (-75%)
Mutual labels:  emulator, nes
Nes
A Javascript NES Emulator
Stars: ✭ 168 (-50.59%)
Mutual labels:  nes, emulator
Awesomenes
🎮 A NES emulator written in Go
Stars: ✭ 245 (-27.94%)
Mutual labels:  nes, emulator
Flownes
🎮 An NES emulator written in ES2015+ with flowtype
Stars: ✭ 160 (-52.94%)
Mutual labels:  nes, emulator
react-nes
React UI for https://github.com/fredericcambon/nes
Stars: ✭ 16 (-95.29%)
Mutual labels:  emulator, nes
Nes Js
JavaScript NES(Famicom) emulator
Stars: ✭ 131 (-61.47%)
Mutual labels:  nes, emulator
Nes Rust
NES emulator written in Rust + WASM
Stars: ✭ 141 (-58.53%)
Mutual labels:  nes, emulator
nestation
A NES Emulator frontend with Net Play!
Stars: ✭ 33 (-90.29%)
Mutual labels:  emulator, nes
first nes
Create your own games for the Nintendo Entertainment System! This "starter" game is easily extensible for your own projects. Includes references.
Stars: ✭ 94 (-72.35%)
Mutual labels:  emulator, nes

hnes

Build Status

Welcome to hnes. hnes is a NES emulator written in Haskell.

Screenshots

Mapper support

The following mappers are supported:

  • NROM (0)
  • UNROM (2)
  • AOROM (7)

Lots of games run, but more don't. You can see which roms are compatible here: http://tuxnes.sourceforge.net/nesmapper.txt The best games seem to be MMC3, so that is a priority.

Mappers are basically custom memory modules that exist on the cartridges themselves, that allow referencing more memory than the NES originally shipped with. Sometimes they even do computation. A very clever idea, but a nightmare to emulate, since each mapper has to be emulated as well

Controls

Nintendo Emulator
Up, Down, Left, Right Arrow Keys
Start Enter
Select Space
A Z
B X

Building

Get Stack for building Haskell projects.

Windows instructions:

$ stack exec -- pacman -Sy mingw-w64-x86_64-pkg-config mingw-w64-x86_64-SDL2
$ stack build

OS X instructions:

$ brew install sdl2
$ stack build

Ubuntu Linux instructions:

$ sudo apt-get install libsdl2-dev
$ stack build

FreeBSD instructions:

$ pkg install sdl2
$ stack build

Running

To run:

stack exec -- hnes roms/tests/cpu/nestest/nestest.nes

Task list

  • [x] Basic structure
  • [ ] Mappers
    • [x] Loading roms
    • [x] Mappers
      • [x] UNROM
      • [x] NROM
      • [x] AOROM
      • [ ] CNROM
      • [ ] MMC1
      • [ ] MMC3
  • [ ] CPU
    • [x] All official opcodes
    • [ ] All illegal opcodes
    • [x] Nestest passing
    • [x] Blarggs CPU test roms passing
  • [ ] PPU
    • [x] SDL integration
    • [x] Background rendering
    • [x] Scrolling
    • [x] Sprite rendering
    • [ ] VBlank timing for Battletoads edge case
  • [ ] APU
  • [x] Controller input handled
  • [x] Performance tuning
  • [ ] Command line interface
    • [ ] Parse args
    • [ ] Use optparse-applicative
    • [ ] Some debug params?

Tests

There's a small test suite that is used to check for CPU and PPU accuracy. They use test roms rather than hand coding tests.

Just run stack test:

Known issues.

There are so many, where do I even begin.

  • Performance is pretty average still. I get around 80 fps on my 2015 i5 MacBook.
  • VBlank timing is off. I don't know the exact reasons, but it causes scrolling issues.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].