Skip to content
/ Nex Public

Why on earth would I try to write an NES emulator in Elixir? This is so dumb

Notifications You must be signed in to change notification settings

markolson/Nex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NEX

Elixir/OpenGL NES Emulator, because why the heck not. All technology is pointless.

Short-term TODO list

  • Turn CPU into a Genserver
  • Macro the hell out of opcodes
  • Get something nicer around setting flags/registers

Notes

http://nesdev.com/6502.txt http://www.intel-assembler.it/portale/5/6502_undocumented_opcodes/CPU_6502_features.asp NesTest is a NROM-128 with no mapper In NROM-128, the 16k PRG ROM is mirrored into both $8000-$BFFF and $C000-$FFFF. So execution can start at C000, which is really location 0000 in the ROM itself. What have I gotten myself into. Mappers are going to require some thought...

t = Nex.CPU.boot("test/roms/nestest/nestest.nes")
{t2, _} = Nex.CPU.run_instruction(t)  # JPM
{t3, _} = Nex.CPU.run_instruction(t2) # LDX
{t4, _} = Nex.CPU.run_instruction(t3) # STX
{t5, _} = Nex.CPU.run_instruction(t4) # STX
{t6, _} = Nex.CPU.run_instruction(t5) # STX
{t7, _} = Nex.CPU.run_instruction(t6) # JSR

cpu = Nex.CPU.boot('test/roms/nestest/nestest.nes')
Nex.CPU.flock(cpu)

About

Why on earth would I try to write an NES emulator in Elixir? This is so dumb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages