Giter VIP home page Giter VIP logo

polprzewodnikowy / summercart64 Goto Github PK

View Code? Open in Web Editor NEW
334.0 23.0 16.0 34.09 MB

SummerCart64 - a fully open source Nintendo 64 flashcart

Home Page: https://summercart64.dev

License: GNU General Public License v3.0

SystemVerilog 27.93% Makefile 0.67% C 37.76% Shell 1.21% Python 6.06% Tcl 0.01% Assembly 2.23% Rust 21.11% HTML 2.14% JavaScript 0.03% CSS 0.84%
n64 nintendo nintendo-64 flashcart

summercart64's Introduction

SummerCart64 - a fully open source Nintendo 64 flashcart

For non-technical description of the SummerCart64, please head to the https://summercart64.dev website!

Features

  • 64 MiB SDRAM memory for game and save data
  • 16 MiB FLASH memory for bootloader and extended game data
  • 8 kiB on-chip buffer for general use
  • ~23.8 MiB/s peak transfer rate USB interface for data upload/download and debug functionality
  • ~23.8 MiB/s peak transfer rate SD card interface
  • EEPROM, SRAM and FlashRAM save types with automatic writeback to SD card
  • Battery backed real time clock (RTC)
  • Status LED and button for general use
  • 64DD add-on emulation
  • IS-Viewer 64 debug interface
  • N64 bootloader with support for IPL3 registers spoofing and loading menu from SD card
  • Dedicated open source menu written specifically for this flashcart - N64FlashcartMenu
  • Enhanced UltraCIC_C emulation with automatic region switching and programmable seed/checksum values
  • PC app for communicating with flashcart (game/save data upload/download, feature enable control and debug terminal)
  • UNFLoader support
  • Initial programming via UART header or dedicated JTAG/SWD interfaces
  • Software and firmware updatable via USB interface
  • 3D printable plastic shell

Documentation


Help / Q&A

For any questions related to this project, please use Discussions tab in GitHub repository. Using discussions tab is highly encouraged as it allows to have centralized knowledge database accessible for everyone interested in this project.

I'm also active at N64brew Discord server as korgeaux but keep in mind that Discussions tab is a preferred option.

Note that my time is limited so I can't answer all questions.


How do I get one?

Most up to date information about purchasing/manufacturing options is available on https://summercart64.dev website!

If you want to order it yourself then I've prepared all necessary manufacturing files on the PCBWay Shared Project site.

Be careful: this is an advanced project and it is assumed that you have enough knowledge about electronics. Selecting wrong options or giving PCB manufacturer wrong information might result in an undesired time and/or money loss. Boards also come unprogrammed from the manufacturer - you need to do initial programming step yourself after receiving the board. Price of the components is not included in the initial quote at the checkout - manufacturer will contact you later with updated price. To avoid problems please read both build guide and description on the shared project page in full. If you have even slightest doubt about the ordering or programming process, it is better to leave it to someone experienced - ask in the n64brew Discord server if that's the case.

Full disclosure: for every order made through this link I will receive 10% of PCB manufacturing and PCB assembly service cost (price of the components is not included in the split). This is a great way of supporting further project development.

If you don't need a physical product but still want to support me then check my GitHub sponsors page.


High-level flashcart block diagram

SC64 block diagram


Finished example

SC64 finished example

SC64 PCB front

SC64 PCB back


Acknowledgement

This project wouldn't be possible without these contributions:

  • 64drive orders being on permanent hold long before creating this repository.
  • EverDrive-64 X7 being disappointment for homebrew development (slow USB upload, unjustified price and overcomplicated SD card access).
  • Jan Goldacker (@jago85) and his projects:
    • Brutzelkarte providing solid base for starting this project and sparking hope for true open source N64 flashcarts.
    • UltraCIC_C reimplementation for easy integration in modern microcontrollers. Thanks also goes to everyone involved in N64 CIC reverse engineering.
  • N64brew Discord server community being very helpful during flashcart development.
  • FatFs FAT32/exFAT library being easiest to integrate in embedded environment.
  • Yakumono's (@LuigiBlood) extensive 64DD documentation and its implementation in various emulators.
  • Libdragon open source N64 SDK project and its developers.
  • SERV bit-serial 32-bit RISC-V CPU soft core.

summercart64's People

Contributors

masonstooksbury avatar meeq avatar nabile-rahmani avatar networkfusion avatar ottelo9 avatar polprzewodnikowy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

summercart64's Issues

Rewrite sc64.py in compiled language to avoid detecting it as malicious software on Windows OS

Describe the bug
As it turns out, using pyinstaller or Nuitka to generate executables results in terrible experience both on Windows and macOS. On Windows application is detected either as Trojan or Virus. On macOS performance and ease of use is hindered because of system protective measures.

To Reproduce
Steps to reproduce the behavior:

  1. Run sc64.exe on Windows OS
  2. Executable is detected as malicious software

Expected behavior
sc64 executable shouldn't be detected as malicious software

Possible solution
Rewrite application in compiled language like C, Rust or Go.

Add N64FlashcartMenu to readme

Is your feature request related to a problem? Please describe.
The current readme flashcart features does not take into account the N64FlashcartMenu.

Describe the solution you'd like
Add a link to the repo.

Additional context
It should be obvious, but most people will not connect the dots. Most "users" will not read between the lines about how great both parts are when combined.

Paper Mario (PAL) Randomly Freezing if left idle

Firmware Version: V2.18.0

Menu Revision: V0.0.1.2023-12-23T00:55:08Z.ALPHA

Describe the bug
Ive been playing Paper Mario (PAL) for a bit and randomly the game just freezes after being left idle.
It doesnt crash and trigger the crash handler, it just stops moving intierly, with just the BGM continuing.

The Roms SHA-1: 2111D39265A317414D359E35A7D971C4DFA5F9E1
The Roms MD5 : A9BE6A493A680642D840F859A65816CA
The Roms CRC32: 85B3AB37

To Reproduce
Steps to reproduce the behavior:

  1. Load the PAL Rom and load a Save
  2. Do not touch the controller afterwards
  3. Wait untill it freezes (Doesnt always happen)

Screenshots
If applicable, add screenshots to help explain your problem.

Expected behavior
No Freezes when left idle

Possible solution
Not obligatory, but suggest a fix/reason for the bug.

Should an open source hardware license be added?

Is your feature request related to a problem? Please describe.
May or may not be a problem, but there is no hardware-specific license on the project.

Describe the solution you'd like
Consider adding something like the CERN OHL-S-2.0 license. This would add a license similar to GPL-3.0 but specifically for the hardware in the project

Describe alternatives you've considered
There are not really any other licenses geared towards hardware that are similar to GPL-3.0 other than CERN OHL-S-2.0

Additional context
https://opensource.org/license/cern-ohl-s/

Example repo with 2 licenses (and how GitHub can easily show multiple licenses)
https://github.com/MasonStooksbury/Hex-Clock



Quick overview of each

GPL-3.0 (Software License)

  • Type: Designed specifically for software.
  • Copyleft: Strong. Requires that derivative works of the licensed software are also distributed under the GPL.
  • Distribution: Any distribution of the software, modified or not, must include the source code.
  • Patent License: Provides an express grant of patent rights from contributors to users.
  • Tivoization: Prevents "Tivoization," where hardware restricts software modifications.
  • Compatibility: Can be complex when integrating with non-GPL software.
  • Termination: Automatic license termination upon non-compliance, but allows for remedy.

CERN-OHL-S-2.0 (Hardware License)

  • Type: Specifically for hardware designs.
  • Copyleft: Strongly reciprocal. Requires that modifications/derivatives of the design are distributed under the same license.
  • Distribution: Requires the distribution of all original and modified design files.
  • Patent License: Includes clauses on patent licensing.
  • Tivoization: Not applicable, as it focuses on hardware.
  • Compatibility: More straightforward for hardware components but limits flexibility in combining with non-reciprocal designs.
  • Termination: License persists as long as the conditions are met.



Key Differences:

  • Purpose and Domain: GPL-3.0 is tailored for software, while CERN-OHL-S-2.0 is for hardware designs.
  • Application: GPL-3.0 addresses software distribution and modification concerns. CERN-OHL-S-2.0 focuses on hardware design, production, and distribution.
  • Specific Terms: Each license contains terms and conditions specific to its domain (software vs. hardware), reflecting the different concerns and practices in these areas.



Conclusion:

Both GPL-3.0 and CERN-OHL-S-2.0 are strong copyleft licenses but in different domains. GPL-3.0 is ideal for developers who want their software and its derivatives to remain open source. CERN-OHL-S-2.0 suits hardware designers seeking to ensure that their designs and any derivatives stay open source. The choice between these licenses depends on whether the project is software or hardware-focused and the desired level of control over derivatives.

eeprom configuration file for libftdi as an alternative to FT_PROG?

My main issue is I absolutely cannot get FT_PROG to see the cart through the usb connector no matter what I do. Even after erasing and rebuilding the EEPROM with libftdi and installing the drivers from the ftdi website there's still nothing there. But I CAN get libftdi's utilities to work with it. I have written a config file myself based on the XML template, but there are options in one that I don't see in the other and it makes me quite nervous. Been having trouble finding documentation on the libftdi conf options as well.

If there's any way you would either know what the options should be, or have a way of dumping them and shipping them alongside the xml, it would be greatly appreciated.

This is the config file I wrote based on what I saw in the XML. Does this look ok?

vendor_id=0x403
product_id=0x6014

# The rest of the fields are settings which can be written to the
# FT2xx with the --flash-eeprom option.

# Max. power consumption: value * 2 mA. Use 0 if self_powered = true.
max_power=500

###########
# Strings #
###########
manufacturer="Polprzewodnikowy"
product="SC64"
serial="SC64xxxxx"

###########
# Options #
###########
self_powered=false  # Turn this off for bus powered
remote_wakeup=false # Turn this on for remote wakeup feature
use_serial=true     # Use the serial number string

# Normally out don't have to change one of these flags
in_is_isochronous=false     # In Endpoint is Isochronous
out_is_isochronous=false    # Out Endpoint is Isochronous
suspend_pull_downs=false    # Enable suspend pull downs for lower power
change_usb_version=false    # Change USB Version
usb_version=0x0200          # Only used when change_usb_version is enabled

cha_vcp=true
cha_type=FT1284
#chb_type=UART

########
# Misc #
########

# This is the relative filename that EEPROM contents will either be 
# read from or written to, depending on whether ftdi_eeprom is run
# with the --read-eeprom or --flash-eeprom option.
filename="eeprom.bin"

FT_PROG does see the cart if I use the UART header but not the usb connector. :(

EDIT: After a... lot of googling I finally found some documentation listing all the possible values.

Feature request: Use pyinstaller for stand alone app.

Expected Behavior

Ease of use for average user.

Current Behavior

Requires python and dependencies to be installed.

Possible Solution

Installing python should not really be required for the average user, so let's generate a standalone application as part of the release process... at least for the loader.

Steps to Reproduce

Context (Environment)

Mainly a windows environment.

Detailed Description

Possible Implementation

Use something like pyinstaller.

Improve CIC emulation timings

Describe the bug
CIC emulation doesn't adhere to timings generated by real CIC chip in two locations: before sending encoded checksum and before sending x105 algorithm result. This makes games boot faster than on real cartridge.

To Reproduce
Steps to reproduce the behavior:

  1. Run game on SC64 with direct mode enabled
  2. Measure timings
  3. Run game on retail cartridge
  4. Measure timings

Screenshots
No screenshots.

Expected behavior
Timings should be close to the real CIC chip.

Possible solution
Add delay between detecting falling edge of CIC clock and falling edge of CIC data in locations mentioned above.

Add SD card diagnostics

Is your feature request related to a problem? Please describe.
Some SD cards behave different from each other. There's no way to detect what went wrong when card misbehaves. Some kind of diagnostics would help with issues similar to one described in #30.

Describe the solution you'd like
Implement a set of error codes corresponding to error location (specific SD command or data timeout).

Describe alternatives you've considered
No alternatives were considered.

Additional context
Issue #30.

Add ability to upload file to SD over USB

When developing the N64FlashcartMenu, it is advantagous to be able to "save" or "overwrite" certain ROM's to the SD card without having to remove the SD card.

examples:

  • replace the current sc64menu.n64 at certain save points.
  • Add a new ROM for testing.
  • overwrite the config.ini

Currently it requires that I remove the SD card to manage its content.

I propose that theUSB loader functionality is able to support it.

Could not mount drive (Kingston 4GB HC SD).

Describe the bug
Using this SD card results in A hard error occured in the low level disk I/O layer.

To Reproduce
Steps to reproduce the behaviour:
1.
2.
3.
4.

Screenshots
image

image

Expected behavior
A clear and concise description of what you expected to happen.

Possible solution
Not obligatory, but suggest a fix/reason for the bug.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.