Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ed64 vseries #15

Draft
wants to merge 68 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
a66a0b3
Checkin initial bios files
networkfusion Jul 17, 2023
1b375e0
Rename functions to use `ed64_bios`
networkfusion Jul 17, 2023
42441fc
Improve comments
networkfusion Jul 17, 2023
4f5433e
Switch to libdragon `wait_ms`
networkfusion Jul 17, 2023
cec3b0f
Minor comment improvements
networkfusion Jul 17, 2023
a3720db
Correct some function names
networkfusion Jul 17, 2023
ff1411f
Switch to `dma_wait`
networkfusion Jul 17, 2023
a0b9ec7
Improve function names
networkfusion Jul 17, 2023
ca2f74c
Add lock register
networkfusion Jul 17, 2023
b99e30f
Improve some names
networkfusion Jul 17, 2023
c07354c
Convert some defines to enums
networkfusion Jul 17, 2023
f8f4d03
Improve FPGA firmware variables
networkfusion Jul 17, 2023
e6be62d
Improve names
networkfusion Jul 17, 2023
aa0c80a
Further renames
networkfusion Jul 17, 2023
9689e92
Name and comment improvements
networkfusion Jul 19, 2023
64e761d
Improvements to function names
networkfusion Jul 19, 2023
45e9a3d
Add ED64.c base implementation
networkfusion Jul 19, 2023
cba010e
Update README.md
networkfusion Jul 19, 2023
72c2574
Add set save type
networkfusion Jul 19, 2023
a752026
Save type improvements
networkfusion Jul 19, 2023
c408198
Re-enable save writeback
networkfusion Jul 19, 2023
1834917
Improve cart metadata
networkfusion Jul 19, 2023
c67967e
Add note on flashram
networkfusion Jul 19, 2023
96b6fa2
Add implementation of ED64 load ROM
networkfusion Jul 19, 2023
b947fe2
Part enable loading a save.
networkfusion Jul 19, 2023
206ce62
Update README.md
networkfusion Jul 19, 2023
aa51f67
Update README.md
networkfusion Jul 19, 2023
cc23473
PR feedback improvements
networkfusion Jul 21, 2023
2e6e8ba
Merge remote-tracking branch 'upstream/main' into ed64-vseries
networkfusion Aug 21, 2023
96eef11
Re-align source.
networkfusion Aug 21, 2023
d26e082
Update libdragon
networkfusion Aug 21, 2023
c0850f8
ED64 can now load ROM's
networkfusion Aug 21, 2023
b17579e
Rename ED64 bios functions
networkfusion Aug 21, 2023
54ae9da
Enable save type set
networkfusion Aug 21, 2023
a2576e2
Move ed64 ll functions
networkfusion Aug 21, 2023
ef682dd
Further fixups
networkfusion Aug 21, 2023
3aa12fb
Fix for V2.5 and below
networkfusion Aug 21, 2023
5490efb
Improve comments.
networkfusion Aug 21, 2023
769f754
Fix commercial ROM boots.
networkfusion Aug 21, 2023
a3f7863
Improve notes.
networkfusion Aug 21, 2023
117c7a4
Fix saves
networkfusion Aug 21, 2023
a117a3e
Merge remote-tracking branch 'upstream/main' into ed64-vseries
networkfusion Dec 27, 2023
68293be
Fix merge
networkfusion Dec 27, 2023
49cf33a
Fix issues with ED64 flashcart functions
networkfusion Dec 28, 2023
4e764ae
Fix some comments
networkfusion Dec 28, 2023
983ecd9
Minor improvements
networkfusion Dec 29, 2023
25f1f56
Save improvements
networkfusion Dec 29, 2023
5d50f90
Correct EEPROM size
networkfusion Dec 29, 2023
ad739ed
Readme improvements
networkfusion Dec 29, 2023
d1ec7b5
Update .gitignore
networkfusion Dec 29, 2023
0b348ac
Fix ability to deploy and debug
networkfusion Dec 29, 2023
df207a3
Fix loading eeprom
networkfusion Dec 29, 2023
20619a4
Add device information function
networkfusion Dec 29, 2023
af742a2
Add RTC feature
networkfusion Dec 29, 2023
6c3e09a
Add flashcart info menu
networkfusion Dec 29, 2023
4ef726f
Add device info struct
networkfusion Dec 30, 2023
c943a8d
commented out changes
networkfusion Dec 30, 2023
f8cbbb2
Changes towards libcart
networkfusion Dec 31, 2023
4365def
Uncomment some functions
networkfusion Jan 1, 2024
f6bdd90
Uncomment USB
networkfusion Jan 1, 2024
84c4aef
Add USB feature
networkfusion Jan 1, 2024
4167533
Add some more comments
networkfusion Jan 1, 2024
99c3d39
Comment out USB feature for the moment
networkfusion Jan 10, 2024
4a6d471
Merge branch 'main' into ed64-vseries
networkfusion Jan 10, 2024
ccf643b
keep name order
networkfusion Jan 11, 2024
6054cbe
Merge branch 'main' into ed64-vseries
networkfusion Jan 17, 2024
0635d44
Update ed64.c
networkfusion Jan 17, 2024
c2aab0e
Update views.h
networkfusion Jan 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ SRCS = \
boot/boot.c \
boot/cic.c \
boot/reboot.S \
flashcart/64drive/64drive_ll.c \
flashcart/64drive/64drive.c \
flashcart/flashcart_utils.c \
flashcart/flashcart.c \
flashcart/64drive/64drive_ll.c \
flashcart/64drive/64drive.c \
flashcart/ed64/ed64_ll.c \
flashcart/ed64/ed64.c \
flashcart/sc64/sc64_ll.c \
flashcart/sc64/sc64.c \
libs/libspng/spng/spng.c \
Expand Down Expand Up @@ -55,6 +57,7 @@ SRCS = \
menu/views/error.c \
menu/views/fault.c \
menu/views/file_info.c \
menu/views/flashcart_info.c \
menu/views/image_viewer.c \
menu/views/text_viewer.c \
menu/views/load_disk.c \
Expand Down
41 changes: 31 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ An open source menu for N64 flashcarts.


### Video showcase (as of Oct 12 2023)

[![N64FlashcartMenu Showcase](http://img.youtube.com/vi/6CKImHTifDA/0.jpg)](http://www.youtube.com/watch?v=6CKImHTifDA "N64FlashcartMenu Showcase (Oct 12 2023)")


Expand Down Expand Up @@ -61,6 +60,7 @@ Menu currently supports the following emulators and associated ROM file names:
- **Game Boy** / **GB Color**: [gb64](https://lambertjamesd.github.io/gb64/romwrapper/romwrapper.html) by *lambertjamesd* - `gb.v64` / `gbc.v64`
- **Sega Master System** / **Sega Game Gear** / **Sg1000**: [TotalSMS](https://github.com/ITotalJustice/TotalSMS) - `TotalSMS.z64` (Currently broken)


### Menu Settings
The Menu creates a `config.ini` file in `sd:/menu/` which contains various settings that are used by the menu.
Currently these are read-only (can be viewed in the menu by pressing `L` on the Joypad).
Expand All @@ -70,6 +70,7 @@ If required, you can manually adjust the file on the SD card using your computer
- Ensure the cart has the latest [firmware](https://github.com/Polprzewodnikowy/SummerCart64/releases/latest) installed.
- Download the latest `sc64menu.n64` file from the releases page, then put it in the root directory of your SD card.


##### 64DD disk support
For the ability to load and run 64DD disk images, you need to add the folder `/menu/64ddipl` on the SD card.
Download and add the relevant ipl files and rename them before adding them to the folder:
Expand All @@ -88,14 +89,28 @@ Note: to load an expansion disk (e.g. F-Zero X) browse to the N64 ROM and load i
### ED64 & ED64P Specific
Currently not supported, but work is in progress (See [PR's](https://github.com/Polprzewodnikowy/N64FlashcartMenu/pulls)).

The aim is to replace [Altra64](https://github.com/networkfusion/altra64) and [ED64-UnofficialOS](https://github.com/n64-tools/ED64-UnofficialOS-binaries).
**WiP** The aim is to replace [Altra64](https://github.com/networkfusion/altra64) and [ED64-UnofficialOS](https://github.com/n64-tools/ED64-UnofficialOS-binaries).


# Developer documentation
#### ED64
Download the `ED64.v64` ROM from the latest action run assets and place it in the `/ED64` folder.


#### ED64P
Download the `ED64P.v64` ROM from the latest action run assets and place it in the `/ED64P` folder.


# Developer documentation
You can use a dev container in VSCode to ease development.


## To Build:
`ms-vscode.makefile-tools` will help (installed automatically in dev container).
TODO: it does not yet work with `F5`: see https://devblogs.microsoft.com/cppblog/now-announcing-makefile-support-in-visual-studio-code/
WORKAROUND: in the dev container terminal, use make directly, i.e.: `make all`
The ROMs can be found in the `output` directory.


## To deploy:
### SC64
* Download the deployer [here](https://github.com/Polprzewodnikowy/SummerCart64/releases/download/v2.18.0/sc64-deployer-windows-v2.18.0.zip)
Expand All @@ -114,34 +129,40 @@ Then in the dev container, use `make run` or `make run-debug`


#### From your host (Windows) OS

* Run `./localdeploy.bat` from the terminal

Toggle the N64 power switch to load the ROM.

`ms-vscode.makefile-tools` will help (installed automatically in dev container).
TODO: it does not yet work with `F5`: see https://devblogs.microsoft.com/cppblog/now-announcing-makefile-support-in-visual-studio-code/
WORKAROUND: in the dev container terminal, use make directly, i.e.: `make`
The ROM can be found in the `output` directory.

NOTE: a "release" version of the SC64 menu is called `sc64menu.n64` and can be created for when you want to add it directly to the SDCard. This is generated by running `make all` or running `make sc64`.
#### From the SD Card
A "release" version of the SC64 menu is called `sc64menu.n64` and can be created for when you want to add it directly to the root folder on the SDCard. This is generated by running `make all` or running `make sc64`.


### Others
### ED64 V3 over USB from your host (Windows) OS
* Download the UNFLoader [here](https://github.com/buu342/N64-UNFLoader/releases/download/v2.11/UNFLoader-Windows-x86.zip)
* Extract and place `UNFLoader.exe` in the `tools` directory.
* Ensure the current "official menu" is `V3.06`.
* Run the appropriate command from windows cmd prompt to ensure your current directory is the root project directory.
* Upload the ROM (e.g. `./tools/UNFLoader.exe -r ./output/OS64.v64`)


### Others (non USB)
* Add the required file to the correct folder on your SD card.


# Update Libdragon submodule
This repo currently uses the `unstable` branch as a submodule at a specific commit.
To update to the latest version, use `git submodule update --remote ` from the terminal.


# Generate documentation
Run `doxygen` from the dev container terminal.
Make sure you fix the warnings before creating a PR!
Generated documentation is located in `output/docs` folder and auto published to the `gh-pages` branch when merged with `main`.

Once merged, they can be viewed [here](https://polprzewodnikowy.github.io/N64FlashcartMenu/)


# Open source software and licenses used
- [libdragon](https://github.com/DragonMinded/libdragon) (UNLICENSE License)
- [libspng](https://github.com/randy408/libspng) (BSD 2-Clause License)
Expand Down
1 change: 1 addition & 0 deletions src/flashcart/64drive/64drive.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ static flashcart_t flashcart_d64 = {
.load_64dd_disk = NULL,
.set_save_type = d64_set_save_type,
.set_save_writeback = d64_set_save_writeback,
.get_device_info = NULL,
};


Expand Down
12 changes: 12 additions & 0 deletions src/flashcart/ed64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
This folder allows support for the ED64(P) flashcart when using V series hardware.

Initially, this aims to work when loading the official ED64 OS menu, selecting the N64FlashcartMenu and then loading a ROM from there. This works around needing to load the correct firmware. To automate this, it is possible to set this menu to autoload (at least in the unofficial menu). i.e. You can set this ROM to auto load by placing a file called `autoexec.v64` in the `ED64` folder with the content of the file pointing to the path of this ROM.

However, the current implementation is able to replace `/ED64/ED64.v64` and load ROM's using the `output/ED64.v64` ROM.


Notes:

* `libcart` seems to use a different base register address `0x08040000`, but official implementation uses `0xA8040000`
* Loading saves is currently not available.

Loading