Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Renesas Envision Kit RX65N NES Emulator



NES (NES) emulator realized with 'Envision Kit RX65N'

Project list

  • main.cpp
  • nesemu.hpp
  • emu/* [NES Emulator ソースコード]
  • Makefile

Preparing the hardware

  • Preparing the SD card interface

  • NES (compatible) pad connection

  • Audio connection (output from DA0 and DA1, GND level is 1.65V)

  • P03_JOY_RIGHT_IRQ11 (DA0) Left 出力
  • P05_IRQ13_SW (DA1) Right 出力 ※ ファミコンの仕様でモノラル
  • Pmod (10) PB6_RXD9_PMOD_10 ---> RXD として使用
  • Pmod ( 9) PB7_TXD9_PMOD_9 ---> TXD として使用
  • RXD/TXD は 115200 Baud, 8-bits, 1-Stop, No-Parity 内部動作表示等

Prepare resources

  • Write a file in “xxx.nes” format to the SD card.

Build method

  • Make.
  • Write the nesemu.mot file.

Method of operation

  • Press the “SELECT” and “START” buttons simultaneously for about 2 seconds.
  • A menu is displayed. Select with the up and down buttons and confirm with the A button.
  • “Select NES File”, filer opens.
  • "Load State x" Load NES state (change the slot with left / right buttons 0-9)
  • "Save State x" Save NES state (change the slot with left / right buttons 0-9)
  • Reset “Reset” NES
  • Exit the "Close Menu" menu

Filer operations

  • Move the file name focus with the up and down buttons.
  • In the "xxx.nes" file, press the right button to select (game starts).
  • If it is a directory, change to that directory.
  • To go back to the directory, press the left button.
  • Press A to display file information. (Press again to return)
  • Press B to close the filer.

Monitor function via serial terminal connection

By connecting a USB serial device to SCI9, you can use the terminal software for easy operation. The following commands are supported

# help
    dir [xxx]       list current directory
    pwd             current directory path
    cd [xxx]        change current directory
    nes filename    Emulations for NES
    pause           Pause Emulation (toggle)
    reset           Reset NES Machine
    save [slot-no]  Save NES State (slot-no:0 to 9)
    load [slot-no]  Load NES State (slot-no:0 to 9)
    info            Cartrige Infomations
    call-151        Goto Monitor

With call-151, you can move to the monitor function and perform a memory dump inside the NES.

FFF8- FF FF 0C E2 20 E0 20 E0
E020- 78       SEI
E021- D8       CLD
E022- A2 4D    LDX  #$4D
E024- 9A       TXS
E025- A9 10    LDA  #$10
E027- 8D 00 20 STA  $2000
E02A- AD 02 20 LDA  $2002
E02D- 10 FB    BPL  $E02A
E02F- A2 00    LDX  #$00
E031- 8A       TXA
E032- 95 00    STA  $00,X
E034- 9D 00 02 STA  $0200,X
E037- 9D 00 06 STA  $0600,X
E03A- 9D 00 07 STA  $0700,X
E03D- E8       INX
E03E- D0 F2    BNE  $E032
E040- A2 00    LDX  #$00
E042- BD 05 01 LDA  $0105,X
E045- DD 10 E0 CMP  $E010,X
E048- D0 0B    BNE  $E055
0000- 00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
$0:1 2 3 4
0000- 01 02 03 04 00 00 00 00  00 00 00 00 00 00 00 00


  • Emulation is possible up to a total of programs and bitmaps of 2MBits (256K bytes).
  • Even with the same configuration, you may not be able to start up a mapper (bank switching device).
  • The function by the NES state does not seem to work correctly depending on the mapper (the mapper state cannot be saved).

Reference video




NES Emulator for G.P.L.

You can’t perform that action at this time.