Skip to content

FREEWING-JP/fpga_nes

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FPGA Spartan-6 XC6SLX16でファミコンを動かす!

Xilinx FPGA Spartan-6 XC6SLX16 NES clone in ALINX AX309
http://www.neko.ne.jp/~freewing/fpga/xilinx_spartan_6_nes_ax309/

Nexys 3 Spartan-6 FPGA board用の実装を ALINX AX309 cloneで動く様に改変したものです。

オリジナルの https://github.com/brianbennett/fpga_nesbrianbennett#34denghongcai@021a890のパッチを適用しています。

Development Environment:

  1. ISE 14.7 WebPack (free)
  2. Visual Studio 2017 Community (free)
[Windows PC] nesdbg.exe -- (38400bps) -- [Nexys 3 Spartan-6 FPGA board] -- VGA display (RGB332,640x480,31KHz)
                                                      +-- [actual NES Controller(4021 shift register)]  
[Windows PC] nesdbg.exe -- (256000bps) -- [Nexys 3 Spartan-6 FPGA board] -- VGA display (RGB444,640x480,31KHz)  
       +-- USB joypad
[Windows PC] nesdbg.exe -- (256000bps) -- [ALINX AX309 clone Spartan-6 FPGA board] -- VGA display (RGB444,640x480,31KHz)
       +-- USB joypad
  • fpga_nes is "Only mapper 0 is supported."
    Mapper 0 = PRG = 16/32KB、CHR = 8KB

  • Transfer .nes Image
    Launch nesdbg.exe

rem Launch nesdbg.exe
rem 123 as COM port COM123
nesdbg.exe 123

rem Select File and Load ROM...

nesdbg.exe

pic 1
pic 2


[Windows PC] nesdbg.exe -- (256000bps) -- [ALINX AX309 clone Spartan-6 FPGA board] -- VGA display (RGB444,640x480,31KHz)
                                                          +-- USB joypad (Low Speed only)

Notice Before Synthesize

Copy
./hw/src/usb_gamepad_module.ngc
to
./hw/ise/
Before Synthesize .

USB HOST機能を FPGAに実装する方法、FPGAの GPIOに USB HIDデバイスを接続したい!!

http://www.neko.ne.jp/~freewing/fpga/usb_host_fpga/ Support Low Speed USB Gamepad only .

usb 1
usb 2
I don't have 15k ohm resistor . So I use 22k ohm .
usb 3
usb 4
BUFFALO model BSGP815GY CLASSIC USB GAMEPAD
usb 5
USB Protocol wave form .

fpga_nes is an fpga-targeted Nintento Entertainment System emulator written in Verilog. It is currently under development, and is most notably missing support for mappers and the DMC sound channel. At this point, it runs most NROM games capably (e.g., Super Mario Brothers, Excitebike).

In addition, this project includes a C++ Windows application called NesDbg, which communicates with the FPGA over USB UART to load ROMs, run unit tests, readwrite memory, etc.

Hardware Setup:

alt text

  1. Nexys 3 Spartan-6 FPGA board. ($119 / $199)
  2. Micro-USB connection for FPGA power and programming.
  3. VGA display connection for NES video output.
  4. Micro-USB connection for communication between NES and NesDbg software.
  5. PmodBB Bread Board for a solderless joypad connection. ($20)
  6. NES Joypad Adapter to accept input from joypads. ($5)
  7. 2 NES Joypads to accept user input. (2 * $5)
  8. PmodAMP1 to amplify NES PWM audio output. ($20)
  9. Speaker to play the NES sound. ($6)

Development Environment:

  1. ISE 14.1 WebPack (free)
  2. Visual Studio 2010 Express (free)

Languages

  • Verilog 42.0%
  • Lua 33.9%
  • C++ 15.5%
  • C 7.7%
  • Other 0.9%