From 34d59fdf3f68bb9d31d8ed0347c4f1a87a6289cb Mon Sep 17 00:00:00 2001 From: nand2mario Date: Mon, 18 Sep 2023 00:16:17 +0800 Subject: [PATCH] docs for 0.7 --- CHANGES.md | 10 +++++++++- README.md | 8 ++++---- src/nes_tang20k.v | 8 +------- tools/nes2img.py | 2 ++ 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index a14c33f..f47dd0e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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. diff --git a/README.md b/README.md index 7bdb457..663c78d 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/src/nes_tang20k.v b/src/nes_tang20k.v index d15b457..caba227 100644 --- a/src/nes_tang20k.v +++ b/src/nes_tang20k.v @@ -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) diff --git a/tools/nes2img.py b/tools/nes2img.py index 844b12d..ed33dfe 100644 --- a/tools/nes2img.py +++ b/tools/nes2img.py @@ -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 ...')