Skip to content

Commit

Permalink
docs for 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
nand2mario committed Sep 17, 2023
1 parent 196c62e commit 34d59fd
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
10 changes: 9 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@

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

v0.5 - The Tang Nano 20k release
v0.7, 9/18/2023 - FAT32 MicroSD
- This release only supports Tang Nano 20K.
- FAT32 MicroSD support. We have switched to FAT32 format for rom loading from MicroSD cards. Simply format your card in FAT32 and place all roms in the root directory.

v0.6, 8/20/2023 - USB gamepads
- This release only supports Tang Nano 20K.
- USB gamepad support. In addition to playstation 2 controllers, now low-speed USB gamepads can be connected to the board. USB connectors and a bit circuitry is needed. See [usb_gamepad.md](doc/usb_gamepad.md)

v0.5, 6/4/2023 - The Tang Nano 20k release
- This release only supports the new Tang Nano 20K board.
- Direct controller support. Playstation 2 controllers (wired or wireless) can be directly
connected to the board through a Sipeed adapter.
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ Main features,
The best way to experience NESTang is with the Tang Nano 20K (Retro Game Kit version), which cost $38 last time I checked. The board features FPGA-friendly SDRAM memory. And the kit includes the necessary controller adapters and a pair of controllers. Here's what you need to run NESTang:

* The Tang Nano 20K board.
* Sipeed ps2 controller adapters connected to the board's pin 15-20 on both sides. The latest 0.6 release also supports [USB gamepads](doc/usb_gamepad.md).
* Sipeed ps2 controller adapters connected to the board's pin 15-20 on both sides. Releases since 0.6 also support [USB gamepads](doc/usb_gamepad.md).
* Playstation or USB controllers connected to the adapters.
* HDMI cable to connect the board to a monitor.
* Latest NESTang program downloaded from [github](https://github.com/nand2mario/nestang/releases) and transferred to the board using either [openFPGALoader](https://github.com/trabucayre/openFPGALoader) or Gowin programmer.
* A MicroSD card to hold ROMs. Since 0.8, just format the SD card in FAT32 format and place all .nes roms in the root dir.
* For <= 0.7: An 8GB cards should suffice. The `tools/nes2img.py` python program can be used to convert .nes ROM files to an .img file. Ensure that you have Python version 3.7 or higher, and then install the Pillow package using `pip3 install pillow`. You can then use an SD imaging tool such as [Balena Etcher](https://www.balena.io/etcher) to burn the newly created image onto the MicroSD card.
* A MicroSD card to hold ROMs. For >= 0.7, just format the SD card in FAT32 (the card should be [<=32GB](https://answers.microsoft.com/en-us/windows/forum/all/format-a-sandisk-extreme-64gb-micro-sd-card-to/ff51be64-75b9-435f-9d39-92299b9d006e)) and place all .nes roms in the root dir.
* For <= 0.6: The `tools/nes2img.py` python program can be used to convert .nes ROM files to an .img file. Ensure that you have Python version 3.7 or higher, and then install the Pillow package using `pip3 install pillow`. You can then use an SD imaging tool such as [Balena Etcher](https://www.balena.io/etcher) to burn the newly created image onto the MicroSD card.
* Insert the MicroSD card and power up the board to start playing your favorite games!

## Setup for Tang Primer 20K
Expand All @@ -50,7 +50,7 @@ Congratulations! Now you can enjoy all your favorite NES games. For version 0.4,

If you want to generate the bitstream from source, see [Build Instructions](https://nand2mario.github.io/nestang-doc/dev/build_bitstream/).

Quite some time was spent on getting a low-latency (90ns) [DDR3 controller](https://github.com/nand2mario/ddr3-tang-primer-20k) to work for Tang Primer 20K. You may find that useful too.
[Usb_hid_host](https://github.com/nand2mario/usb_hid_host) was development so NESTang could support USB gamepads. Follow the link if you want to use it for your FPGA projects. It supports keyboards and mice too.

## Next steps

Expand Down
8 changes: 1 addition & 7 deletions src/nes_tang20k.v
Original file line number Diff line number Diff line change
Expand Up @@ -432,18 +432,12 @@ reg [3:0] sd_state0 = 0;
reg [19:0] timer; // 37 times per second
always @(posedge clk) timer <= timer + 1;

`define SD_REPORT
//`define SD_REPORT

always@(posedge clk)begin
state_0<={2'b0, loader_done};
state_1<=state_0;

// print button status
// case (timer)
// 20'h00000: `print({nes_btn, nes_btn2}, 2);
// 20'hf0000: `print("\n", STR);
// endcase

// status for SD file browsing
`ifdef SD_REPORT
case (timer)
Expand Down
2 changes: 2 additions & 0 deletions tools/nes2img.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
COLOR_DARK=4 # dark text: purple
META_MENU_SECTORS=121 # 1 meta-sector + 120 menu image

print("Since 0.7, nes2img.py is NO LONGER NEEDED. Just format your MicroSD card as FAT32. See https://github.com/nand2mario/nestang/README.md. This script will be removed later.\n")

if len(sys.argv) < 3:
print('Packing nes roms as an sdcard image. Usage:')
print(' nes2img.py -o x.img x.nes y.nes ...')
Expand Down

0 comments on commit 34d59fd

Please sign in to comment.