mkarlsson Posted October 22, 2013 Report Share Posted October 22, 2013 A while ago James1095 pointed out in the Community Project section that there is a NES-on-FPGA project with source code available on the net.http://forum.gadgetfactory.net/index.php?/topic/1754-fpga-nes/ The project is written by Brian Bennet for a Spartan6 LX16 board with analog VGA output so I decided to give the code a try by porting it to Pipistrello and the LogicStart MegaWing with the goal of getting the code to run with minimal changes. In the end only a DCM unit for doubling the Pipistrello 50 MHz clock to 100 MHz needed to be added and the ucf file needed to be changed for Pipistrello pinout. The hardest part was actually to compile the app for the PC used for downloading game ROMs to the board after the bit file is loaded (nesdbg). The app has the serial port hardwired to COM5 so the Pipistrello serial port must be renamed COM5 in order for nesdbg to work (this can be done using the device manager). Attached is a zip file with the software app for downloading game roms and two versions of the hardware - one version for using real NES joypads (connected to the top row on the PMOD connector) and one version for emulating the joypad with the joystick and the switches on the LogicStart MegaWIng. The latter version is mainly for testing since I don't have any NES controllers to play with, and a game like Super Mario Bros can actually be played with this version although the joystick is a bit hard to use. Switch 4 is "A", switch 5 is "B", switch 6 is "select" and switch 7 is "start". The four sound channels can be muted using switches 0-3. Steps:1) Add the LogicStart MegaWing to Pipistrello and hook up the VGA monitor and the sound cable to the LogicStart board2) Connect the Pipistrello/LogicStart board-set to the PC and rename the Pipistrello serial port to COM5 using the device manager.2) Unzip the fpga_nes.zip file somewhere on the PC and cd to the root folder3) Double-click on load_bitfile_emu.bat, this should download the joypad emulation bit file to Pipistrello.4) Once the bit file is downloaded the VGA monitor should come up with a white area in the center surrounded by a light-blue border.5) Next step is to double-click on run_nesdbg.bat which should get the FPGA NES Debugger up and running6) Using the File pulldown menu, select "Load ROM..." and select a rom game (located at sw\roms\game_roms\supported)7) A progress bar will show the progress of the download8) The game should start up One thing I did notice is that some of the sprites have a vertical line of missing pixels but over all it looks pretty good. Enjoy!fpga_nes.zip Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.