{"id":14532220,"url":"https://github.com/pdaxrom/N64cart","last_synced_at":"2025-09-02T06:31:40.194Z","repository":{"id":63379513,"uuid":"520346362","full_name":"pdaxrom/N64cart","owner":"pdaxrom","description":"RP2040 N64 cartridge","archived":false,"fork":false,"pushed_at":"2025-07-05T10:22:56.000Z","size":29814,"stargazers_count":40,"open_issues_count":2,"forks_count":3,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-05T10:27:34.717Z","etag":null,"topics":["cartridge","firmware","homebrew","n64","nintendo-64","raspberry-pi-pico","rp2040","uart","usb"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pdaxrom.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-08-02T04:07:25.000Z","updated_at":"2025-07-05T10:22:58.000Z","dependencies_parsed_at":"2024-02-22T21:29:25.675Z","dependency_job_id":"fb17116a-382e-4863-a44e-f2898ad4c4f4","html_url":"https://github.com/pdaxrom/N64cart","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pdaxrom/N64cart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdaxrom%2FN64cart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdaxrom%2FN64cart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdaxrom%2FN64cart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdaxrom%2FN64cart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pdaxrom","download_url":"https://codeload.github.com/pdaxrom/N64cart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pdaxrom%2FN64cart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273244301,"owners_count":25070958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cartridge","firmware","homebrew","n64","nintendo-64","raspberry-pi-pico","rp2040","uart","usb"],"created_at":"2024-09-05T00:05:55.476Z","updated_at":"2025-09-02T06:31:40.182Z","avatar_url":"https://github.com/pdaxrom.png","language":"C","readme":"# N64cart - N64 flash cartridge\n\n* [Intro](#intro)\n* [Concept](#concept)\n  * [Project files](#project-files)\n  * [Features](#features)\n  * [Memory mapping](#memory-mapping)\n* [PCB](#pcb)\n  * [Order notes](#order-notes)\n  * [Assembly notes](#assembly-notes)\n* [Build firmware](#build-firmware)\n* [Cartrigde utility](#cartrigde-utility)\n  * [Build](#build)\n  * [How to use](#how-to-use)\n  * [Remote access to cartridge](#remote-access-to-cartridge)\n* [Total cartridge cost (32MB version)](#total-cartridge-cost-32mb-version)\n* [Photos version 2](#photos-version-2)\n* [BOM list for version 3](#bom-list-for-version-3)\n* [Photos version 3](#photos-version-3)\n\n## Intro\n\nExisting N64 flash cartridges are quite expensive, but thanks to Konrad Beckmann, who first used a raspberry pi pico as a memory controller, he managed to create a cheap version that can be built at home.\n\nHardware and firmware initially are forked from Konrad Beckmann [PicoCart64](https://github.com/kbeckmann/PicoCart64)\n\nN64 cartridge connector footprint for Eagle CAD from [SummerCart64](https://github.com/Polprzewodnikowy/SummerCollection)\n\nN64 ROM boot code derived from [N64FlashcartMenu](https://github.com/Polprzewodnikowy/N64FlashcartMenu) and [N64 DreamOS ROM](https://github.com/khill25/Dreamdrive64/tree/main/sw/n64)\n\n## Concept\n\nThe main idea is to make the cartridge as simple and cheap as possible. Contrary to Konrad's idea of multiplexed PSRAM chips and two RP2040, I decided to use one SPI flash memory chip and one RP2040. Modern flash chips allow to erase and flash data more than 100,000 times, which is more than enough for home use for many years. Since the RP2040 does not support SPI flash chips larger than 16MB, it was decided to use page mode with page switching through the Extended Address register (EA register). Unfortunately, this method has a problem with long switching of 16MB pages, because need to disable the XIP mode, enable the SPI mode to change the page and enable the XIP back. Therefore, it was decided to use QSPI with 32-bit addressing mode without XIP.\nTo effectively work with cartridge flash chip, a special version of the filesystem was created - romfs, which allows to map sectors of saved files as a continuous data area, to which the N64 has access via the PI bus. At the moment, romfs does not support directories. The maximum memory size depends on the cartridge board version - 64 MB for version 2 with a soic-8/wson-8 8x6 flash chip package, 128 MB for version 3 with a soic-16 flash chip package.\n\n### Project files\n\n#### Cartridge board version 2 (soic-8/wson-8 8x6 - 64MB max)\n\n[Schematic pdf](hw/n64cart-v2-soic-8.pdf)\n\n[Schematic eagle cad](hw/n64cart-v2-soic-8.sch)\n\n[PCB eagle cad](hw/n64cart-v2-soic-8.brd)\n\n[Gerber files](hw/n64cart-v2-soic-8_2024-08-11.zip)\n\n#### Cartridge board version 3 (soic-16 - 128MB max)\n\n[Schematic pdf](hw/n64cart-v3-soic-16.pdf)\n\n[Schematic eagle cad](hw/n64cart-v3-soic-16.sch)\n\n[PCB eagle cad](hw/n64cart-v3-soic-16.brd)\n\n[Gerber files](hw/n64cart-v3-soic-16_2024-08-11.zip)\n\n### Features\n\n- One user controllable LED, accessible from N64 side, RGB WS2812 for PCB version 3 (all except PicoCart64-lite)\n\n- UART port, accessible from N64 side (all except PicoCart64-lite)\n\n- USB passthrough to N64 side\n\n- Emulation for EEPROM 4/16Kbit\n\n- Emulation for SRAM 256Kbit/1MBit\n\n- Emulation for Flash RAM 1Mbit (29L1100)\n\n- USB utility to access to the cartridge flash chip as filesystem.\n\n### Memory mapping\n\n#### Registers:\n\nRegister|Address|Mode\n--------|-------|----\nUART_CTRL|0x1fd01000|R-\nUART_RXTX|0x1fd01004|RW\nLED_CTRL|0x1fd01008|-W\nSYS_CTRL|0x1fd0100c|RW\nSSI_SR|0x1fd01010|RW\nSSI_DR0|0x1fd01014|RW\nFW_SIZE|0x1fd01018|R-\n\n#### UART_CTRL bits:\n\nFunction|Bit mask|Mode\n--------|--------|----\nUART_RX_AVAIL|0x01|R-\nUART_TX_FREE|0x02|R-\n\n#### UART_RXTX bits:\n\nFunction|Bit mask|Mode\n--------|--------|----\nDATA|0xFF|RW\n\n#### LED control bits:\n\nFunction|Bit mask|Mode|Note\n--------|--------|----|---\nLED_ONOFF|0x01|-W|PCB v2 or PCB v3 without WS2812\nLED_RGB|0x00ffffff|-W|PCB v3 only\n\n#### SYS_CTRL bits:\n\nFunction|Bit mask|Mode\n--------|--------|----\nEEPROM_16KBIT|0x1000|RW\nFRAM_MODE|0x200|RW\nSRAM_UNLOCK|0x100|RW\nFLASH_MODE_QUAD|0x10|RW\nFLASH_CS_HIGH|0x01|RW\n\n#### SSI_SR bits:\n\nFunction|Bit mask|Mode\n--------|--------|----\nSSI_SR_TFNF_BITS|0x01|R-\nSSI_SR_RFNE_BITS|0x02|R-\n\n#### SSI_DR0 bits:\n\nFunction|Bit mask|Mode\n--------|--------|----\nDATA|0xff|RW\n\n## PCB\n\n### Order notes\n\nThe thickness of the PCB is 1.2 mm.\n\nOrdering a stencil will make it easier to apply solder paste, but will increase the cost of the order.\n\n### Assembly notes\n\nAfter soldering, if you have used a flux when soldering a processor or a flash chip, wash it well from the board, otherwise unstable work with memory is possible or it will not work at all.\n\n#### for PCB version 2\n\nDo not solder Q1 if D2 is soldered. Use either D2 or Q1.\n\nDo not solder R1 and R6.\n\n#### for PCB version 3\n\nDo not solder R1 and D2 if LED3 is soldered.\n\n## Build firmware\n\nTo build, you will need an installed Pico SDK.\n\nBy default, the firmware is compiled for cartridge version 3 and NTSC. Add to cmake ```-DBOARD=v2``` to build it for version 2 (flash chip 32/64 MB). Add to cmake ```-DBOARD=pico``` to build it for generic pico cartridge (flash chip 16 MB or less) without SI_DAT, SI_CLK, NMI, INT lines.\n Add to cmake ```-DBOARD=pico-lite``` to build it for PicoCart64-lite cartridge (flash chip 16 MB or less) with SI_DAT, SI_CLK, NMI, INT lines.\n\nAdd to cmake ```-DREGION=pal``` to build it for PAL.\n\nSteps to build:\n```\ncd fw\n\nmkdir build\n\ncd build\n\ncmake ..\n\nmake -j\n```\n\nPress the cartridge button, connect the cartridge to USB and upload 'n64cart.uf2' to the RPI-RP2 disk.\n\n## Build rom manager\n\nTo build, you will need an installed N64 toolchain with [libdragon](https://github.com/DragonMinded/libdragon), compiled in opengl branch.\n\nAdd to make ```BOARD=pico``` to build it for generic pico (flash chip 16 MB and less). Add to make ```BOARD=pico-lite``` to build it for PicoCart64-lite (flash chip 16 MB and less).\n\nSteps to build:\n\n```\ncd ../../rom\n\nmake\n```\n\n## Cartrigde utility\n\nThe utility is used to format cartridge memory, write and read files from cartridge memory. You can upload new roms, change the background pictures with utility.\n\n### Build\n\nTo build for linux and Mac OS, you need to install the libusb development files.\n\n```\ncd ../utils\n\nmake\n```\n\nFor windows, install mingw toolchain.\n\n```\ncd ../utils\n  \nmake SYSTEM=Windows\n```\n\n### How to use\n\nThe first time you use a cartridge, you must format it and write a file manager:\n\n```\n./usb-romfs format\n\n./usb-romfs push ../rom/n64cart-manager.z64\n```\n\nUpload some other roms, for example:\n\n```\n./usb-romfs push rodfsdemo.z64\n```\n\nChange background image:\n\n```\n./usb-romfs push picture.jpg background.jpg\n```\n\nFull list of the utility commands:\n\n```\n./usb-romfs help\n./usb-romfs bootloader\n./usb-romfs reboot\n./usb-romfs format\n./usb-romfs list\n./usb-romfs delete \u003cremote filename\u003e\n./usb-romfs push [--fix-rom][--fix-pi-bus-speed[=12..FF]] \u003clocal filename\u003e[ \u003cremote filename\u003e]\n./usb-romfs pull \u003cremote filename\u003e[ \u003clocal filename\u003e]\n```\n\n### Remote access to cartridge\n\nIf your computer does not allow you to connect to the cartridge (for example, it is an old Silicon Graphics that does not have USB), you can use proxy access through another computer. To do this, build utilities for remote access:\n\n```\nmake remote\n```\n\nIf the working computer and the proxy computer are different systems, compile the remote utility for the working computer with the cross compiler specified:\n\n```\nmake CC=\"mips-sgi-irix6o32-gcc\" remote-romfs\n```\n\nCopy ```remote-romfs``` to the working machine. On the proxy machine, connect the USB cable of the cartridge and start the proxy:\n\n```\n./proxy-romfs\n```\n\nUse remote-romfs on the working machine the same way as usb-romfs but specify the proxy address:\n\n```\n./remote-romfs \u003cproxy IP address\u003e \u003ccommand ...\u003e\n```\n\n[Photos of remote access to the cartridge](#photos-of-remote-access-to-the-cartridge-from-sgi-indy)\n\n## Total cartridge cost (32MB version)\n\nThe price of components for an online order of one or two pieces may be lower\nthan the cost of delivery. When ordering in several pieces, sometimes there\nmay even be free shipping.\n\nSeller|Delivery cost|Components\n------|-------------|---\n[Chicago Electronic Distributors](https://chicagodist.com/)|$6-$11|RP2040\n[Arrow](https://www.arrow.com/)|Free for orders \u003e $50|spi flash,resistors,capacitors,etc\n[jlpcb](https://jlcpcb.com/)|$22.4|PCB\n\nThe price for 5 PCB is $2 ($4 for non first in order position).\n\nThe most expensive components:\n\nComponent|qty|Price\n---------|---|-----\nRP2040|1|$1\nW25Q256JVEIQ|1|$4.24\nABLS-12.000MHZ-B4-T|1|$0.26\nUJ2-MIBH-G-SMT-TR|1|$0.45\nLDI1117-3.3U|1|$0.34\nBAT60AE6327HTSA1|2|$0.93\n\nAll other components (LEDs, resistors, capacitors) from home stock, total cost less than $1.\n\nSo, the total cost of the pcb and components is approximately $9.\n\n## Photos version 2\n\n\u003cimg src=\"pics/jlpcb-order.png\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20220826_213224.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20220826_213239.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20220826_213410.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20220826_213738.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20220826_213840.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20220826_213833.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20240225_124908.jpg\" width=\"480\" /\u003e\n\n## BOM list for version 3\n\nPart|Value|Device|Package\n----|-----|------|-------\nC1|100n|C-EUC0402|C0402\nC2|100n|C-EUC0402|C0402\nC3|100n|C-EUC0402|C0402\nC4|100n|C-EUC0603|C0603\nC5|100n|C-EUC0402|C0402\nC6|100n|C-EUC0402|C0402\nC7|100n|C-EUC0603|C0603\nC8|100n|C-EUC0402|C0402\nC9|100n|C-EUC0402|C0402\nC10|1uF|C-EUC0402|C0402\nC11|100n|C-EUC0402|C0402\nC12|100n|C-EUC0402|C0402\nC13|1uF|C-EUC0402|C0402\nC14|100n|C-EUC0402|C0402\nC15|27pF|C-EUC0402|C0402\nC16|27pF|C-EUC0402|C0402\nC22|10u|C-EUC0805|C0805\nD1|SL02-GS08|SL02-GS08|SOD-123\nD2|GREEN|LED0603|0603\nD3|RED|LED0603|0603\nIC1|RP2040-QFN56|RP2040-QFN56|QFN-56\nLED3|XL-5050RGBC-WS2812B|XL-5050RGBC-WS2812B|XL5050RGBCWS2812B\nQ1|BSS84|BSS84|SOT23\nR1|1K|R-EU_R0603|R0603\nR2|1K|R-EU_R0402|R0402\nR3|1K|R-EU_R0402|R0402\nR4|27|R-EU_R0402|R0402\nR5|27|R-EU_R0402|R0402\nR12|1K|R-EU_R0603|R0603\nS1||10-XX|B3F-10XX\nU$1|LDI1117-3.3U|LDI1117-3.3U|LDI1117-3.3U\nU2||USB|USB-MICRO-SMD\nU4|MX66L1G45GMI-08G|MX66L1G45GMI-08G|SOP_16\nXTAL1|ABLS-12.000MHZ-B4-T|ABLS-12.000MHZ-B4-T|XTAL_ABLS_ABR\n\n## Photos version 3\n\n\u003cimg src=\"pics/IMG_20240805_201003.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20240806_203455.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20240806_203527.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/IMG_20240811_110152.jpg\" width=\"480\" /\u003e\n\n## Photos of remote access to the cartridge from SGI Indy\n\n\u003cimg src=\"pics/20250705_142513.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/20250705_150633.jpg\" width=\"480\" /\u003e\n\n\u003cimg src=\"pics/20250705_150648.jpg\" width=\"480\" /\u003e\n","funding_links":[],"categories":["Nintendo","Development Hardware"],"sub_categories":["N64","Unmaintained"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdaxrom%2FN64cart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpdaxrom%2FN64cart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpdaxrom%2FN64cart/lists"}