Skip to content

Commit

Permalink
Doc for 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nand2mario committed Oct 22, 2022
1 parent 4185b11 commit b09dbc3
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

## Version history for NESTang - an NES emulator for Tang Primer 20K

v0.4, 10/22/2022 - Linux loader
- New Linux loader for loading ROMs and connect gamepads. Tested on MangoPi MQ-Quad. Should also work on other ARM SBC boards.
- Use the correct 8:7 pixel aspect ratio for better fidelity. See https://www.nesdev.org/wiki/Overscan.

v0.3, 10/15/2022 - Supporting the dock
- Support the newly released Tang Primer 20K dock. The HDMI module is no longer needed!
- Press LB to use the in-game menu to load ROMs.
Expand Down
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This is still a work in progress. Here's what works.

* Majority of games I tested work.
* 720p HDMI video and sound output.
* PC-side loader program for game loading and controller input.
* Windows/Linux loader program for game loading and controller input.
* Cycle accurate emulation quality as we nearly recreated the NES circuits.
* ~~Needs a MiSTer SDRAM module. Similar to [MiSTer](https://misterfpga.org/), SDRAM is needed for its low access latency required by emulation.~~ (since v0.2 the SDRAM is no longer needed! :smiley:)

Expand All @@ -25,31 +25,34 @@ Interested? Here's what you need:

Then it's time to enjoy some NES games,
* Download the latest [NESTang release](https://github.com/nand2mario/nestang/releases/).
* Start **Gowin Programmer**, and program `nestang-lite.fs` or `nestang-doc.fs` depending which board you have. If you see a colorful NES palette, then your setup is working.
* Start **Gowin Programmer**, and program `nestang-lite.fs` or `nestang-dock.fs` depending which board you have. If you see a colorful NES palette, then your setup is working.
* Connect your game controller/controllers to your PC. I use a pair of old Xbox 360 controllers.
* Run `loader.exe -c COM4 games\rom.nes` (replace COM4 with your port number) to load the game `rom.nes` and run it. If it complains about missing DLLs, install [Microsoft Visual C++ Redistributable package](https://aka.ms/vs/17/release/vc_redist.x64.exe).
* Press the left button (LB) to call out the in game OSD menu. There you can load other games in the `games` directory.
* Press the left button (LB) to call out the in-game OSD menu. There you can load other games in the `games` directory.
* If it didn't work, `loader.exe -r game.nes` will print messages from the core.

Hurrah! and enjoy.

Since 0.4, there's new support for loading games through Linux single-board computers. See [Linux loader](doc/linux.md)

If you want to generate the bitstream from source, see [Build Instructions](doc/build.md).

## Next steps

See NESTang [changes.md](CHANGES.md).

Here are what I may work on when I get time. No promise though. Suggestions and pull requests are welcome!
* A way to work without a PC.
* Sipeed is [working on](https://twitter.com/SipeedIO/status/1582337787574951938) a Tang Nano 20K with better emulation support (like on-board SDRAM). Add support when it comes out (hopefully before end of 2022).
* Support more games.
* An enclosure?
* Cheats support.
* Saves and loads.
* ~~A way to work without a PC.~~ (done in 0.4)

## Special Thanks

* [fpganes](https://github.com/strigeus/fpganes) by Ludvig Strigeus.
* [hdl-util/hdmi](https://github.com/hdl-util/hdmi) by Sameer Puri.

nand2mario
nand2mario (`nand2mario at outlook.com`)
2022.9
2 changes: 2 additions & 0 deletions doc/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ If you want to modify and/or build the project from source, you will need:
* Click `Apply` and then `OK` to exit the Project Configurations.
* The project is ready to be successfully Synthesized, Placed and Routed to a bitstream

Note: the master branch targets the Tang Primer 20K Lite board. Use the [dock branch](https://github.com/nand2mario/nestang/tree/dock) if you want to build for the Tang Primer 20K Dock.

Enjoy!!
Binary file added doc/images/linux_bottom.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/images/linux_top.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions doc/linux.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# NESTang Linux loader

Since 0.4, NESTang has added Linux loader program support. With a tiny and cheap Linux SBC, now you can enjoy fpga NES games on your living room TV much easier.

Here's the basic idea,

```
+--------------------------+ +-----------------------------+
| Tang Primer 20K Dock | | Linux SBC (RPi, MangoPi etc)|-+
| | | | | ROMs in MicroSD card
| HDMI USB-C | | USB-A/OTG USB-C/MicroUSB |-+
+--------vvv------^^^------+ +------vvv-----------^^^------+
| '-------<-------. | '---------- USB power adapter
| UART o/ USB | |
+---------v------------+ +---^-------v------+
| TV / Monitor | | USB Hub >----------------- USB gamepad
+----------------------+ +------------------+
```

The loader binary is in the release zip archive (`loader_linux_aarch64`). If it doesn't work on your SBC, you can build your own by `make` in [loader/](../loader/).

My messy but working set up looks like this:

Top side:

<img src="images/linux_top.jpg" width=400>

Bottom side is the MangoPi:

<img src="images/linux_bottom.jpg" width=400>

Of course a 3d-printed box would be great. If you design one, please kindly contribute your design (email me).

0 comments on commit b09dbc3

Please sign in to comment.