Skip to content
This repository was archived by the owner on Jun 12, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
69abceb
structured some files into appropriate directories
networkfusion Aug 11, 2016
94db4f2
stop vsc debug files from being added
networkfusion Aug 11, 2016
032d982
Although I dont think it is actually used,
networkfusion Aug 11, 2016
0345327
Added properties file to gitignore
networkfusion Aug 31, 2016
67fc6d0
Only load firmware when required
networkfusion Aug 31, 2016
4f67057
minor refactoring of backupSaveData
networkfusion Sep 2, 2016
f465620
V3 saving now working
networkfusion Sep 2, 2016
1f6d31a
Fixed string formatting
networkfusion Sep 7, 2016
b594cd3
Merge pull request #10 from networkfusion/v3support
networkfusion Sep 7, 2016
95e8b48
Debugging now uses a macro and trace statements
networkfusion Sep 7, 2016
cdbc551
makefile changes to make it more automatic
networkfusion Sep 7, 2016
5fb8610
Further improvements to makefile
networkfusion Sep 8, 2016
5f50809
Updated truetype header to latest release
networkfusion Sep 9, 2016
52f4573
Updated stb_image to latest version
networkfusion Sep 9, 2016
0451d6f
moved files to more appropriate locations
networkfusion Sep 9, 2016
0929602
updated stb_image to latest version
networkfusion Sep 9, 2016
945331f
Finished refactoring Makefile and directories #6
networkfusion Sep 9, 2016
6f771f1
Code refactoring
networkfusion Sep 16, 2016
9f93203
removed unused functions
networkfusion Sep 16, 2016
aa455bf
code refactoring
networkfusion Sep 16, 2016
b02b6f0
reverted to using if else statements
networkfusion Sep 17, 2016
63872f6
Added automated scripts for building on windows 10
networkfusion Dec 12, 2016
42b5d9e
Updated readme
networkfusion Dec 13, 2016
29753b1
update to gitignore
networkfusion Dec 13, 2016
c1b65f8
changes to gitignore
networkfusion Dec 13, 2016
fbd29c8
removed file uploaded by mistake
networkfusion Dec 13, 2016
a43d7b0
Added changes to work with VSCode on windows
networkfusion Dec 13, 2016
f8a90da
renamed upload to deploy-sd
networkfusion Dec 13, 2016
fad67dc
added ability to extract firmware from original os
networkfusion Dec 13, 2016
ea6e5cc
minor updates to readme
networkfusion Dec 13, 2016
bf57d64
Merge pull request #12 from networkfusion/buildsystem
networkfusion Dec 13, 2016
b7ae2b0
changed input_mapping to an enum
networkfusion Dec 15, 2016
5e5da4d
using updated version of libmikmod
networkfusion Dec 28, 2016
b719c43
improved the sound implementation
networkfusion Dec 29, 2016
ae66a2f
updated audio library repo
networkfusion Dec 29, 2016
00c3203
changed font background colour to transparent
networkfusion Dec 29, 2016
69a295f
optimised / refactored file loading
networkfusion Dec 30, 2016
61bb4b7
renamed mp3 functions to have prefix
networkfusion Dec 30, 2016
2025c86
moved input handler to seperate function
networkfusion Dec 30, 2016
f765603
changed input_mapping to use case statements
networkfusion Dec 30, 2016
84f983f
updated boot code to support 64DD and Aleck64 roms
networkfusion Jan 2, 2017
311d060
minor refactoring
networkfusion Jan 2, 2017
9ccd46e
load latest firmware from official os (not tested)
networkfusion Feb 21, 2017
4c412ca
Updated readme to state WSFL install required.
networkfusion Oct 5, 2017
1123730
moved sounds into sub directory
networkfusion Oct 6, 2017
859a6b7
moved n64controller.sprite into sprites directory
networkfusion Oct 6, 2017
5370431
renamed menu.c and menu.h to main.c and main.h
networkfusion Oct 6, 2017
15d5615
updated copyrights
networkfusion Oct 6, 2017
311aabb
corrected issue with missing hash caused in last commit
networkfusion Oct 6, 2017
e3d98be
updated makefile include variable
networkfusion Oct 6, 2017
453c55b
updated config file
networkfusion Oct 7, 2017
06d266e
organised string functions
networkfusion Oct 7, 2017
8f063ee
changed infinite loops from while to for
networkfusion Oct 9, 2017
1ee7e0f
Corrected spelling mistake
networkfusion Oct 9, 2017
0c34a48
Refactored main.h
networkfusion Oct 11, 2017
7586104
added ifndefs to header files
networkfusion Oct 11, 2017
7aef45a
Added header for chksum64
networkfusion Oct 11, 2017
9dfba8c
Added version header and code
networkfusion Oct 11, 2017
2fbf21d
optimised some if statements
networkfusion Oct 11, 2017
e923de7
removed includes from headers
networkfusion Oct 11, 2017
5bc1aeb
Banjo Tooie save now relies on having Ultra CIC
networkfusion Oct 11, 2017
0f21b46
add goldfinger to save db
networkfusion Oct 11, 2017
94eb042
moved `B` button code to default
networkfusion Oct 12, 2017
e240c93
moved memorypak functions to seperate module
networkfusion Oct 12, 2017
fae2b19
moved mpk functions to seperate file
networkfusion Oct 12, 2017
04b8c02
split out memorypak and about screen to seperate modules
networkfusion Oct 12, 2017
7ef013e
hide system volume information dir
networkfusion Oct 13, 2017
2560984
error code comment
networkfusion Oct 13, 2017
45b0243
moved CRC_Calculate to the correct number
networkfusion Oct 13, 2017
c2870c6
removed duplicate proto
networkfusion Oct 13, 2017
b25201a
#18 DD game CIC corrected - DD Games now load
networkfusion Oct 13, 2017
ac58a87
#18 Aleck64 games now boot
networkfusion Oct 13, 2017
5d2ad30
timing comment
networkfusion Oct 13, 2017
3fcac12
added fatfs
networkfusion Oct 13, 2017
8264d64
implement various functions
networkfusion Oct 14, 2017
5442139
FatFS working #9
networkfusion Oct 14, 2017
a66f2b1
converted more functions
networkfusion Oct 14, 2017
e805617
more functions
networkfusion Oct 14, 2017
756fbc1
updated mpk file reads
networkfusion Oct 15, 2017
8045aea
loadrom now using fatfs
networkfusion Oct 16, 2017
cada1f7
refactored loadnesrom
networkfusion Oct 17, 2017
c2260e7
further functions modified
networkfusion Oct 18, 2017
00f4e5b
further functions done
networkfusion Oct 18, 2017
bb14fcd
cheatfile done
networkfusion Oct 18, 2017
8fd9f90
updated toplist
networkfusion Oct 18, 2017
3c2a57d
finished updating memorypak
networkfusion Oct 18, 2017
a73b73c
minor refactoring of memorypak
networkfusion Oct 20, 2017
d4dd1f5
forgot some important pipes!
networkfusion Oct 20, 2017
af6c238
Corrections
networkfusion Oct 23, 2017
20c4993
work on fatfs functions
networkfusion Oct 25, 2017
1a5c572
removed some debug code from the last commit...
networkfusion Oct 25, 2017
6e73f06
update debug message with 5 sec delay
networkfusion Oct 25, 2017
83700e9
added sys.h to debug for sleep
networkfusion Oct 25, 2017
fed9688
minor tweaks
networkfusion Oct 26, 2017
1d707f7
updated last function, now fully using fatfs
networkfusion Oct 26, 2017
1b7a919
removed old fat files
networkfusion Oct 26, 2017
34c216c
minor code cleanup and comments
networkfusion Oct 27, 2017
eea4a45
sleep changes
networkfusion Oct 27, 2017
d7e9fc5
minor changes
networkfusion Oct 27, 2017
a4c6109
further corrections to debug #16
networkfusion Oct 27, 2017
036f875
Merge pull request #20 from networkfusion/fatfs
networkfusion Oct 27, 2017
b1936b6
minor header corrections
networkfusion Oct 27, 2017
74900ae
header correction
networkfusion Oct 27, 2017
b7dd066
whitespace changes
networkfusion Oct 27, 2017
2034bed
implemented ultracic detection code
networkfusion Nov 10, 2017
d52179c
cleaned up savedb
networkfusion Nov 10, 2017
2785f5f
fixed MP3 playback
networkfusion Nov 13, 2017
3d79e66
Added Topgear Rally (EU/JP) save type
networkfusion Nov 13, 2017
d7d4087
Changed location of library repos to n64-sdk
networkfusion Feb 21, 2018
7d1f2d1
Changed tool location (renamed to n64-tools)
networkfusion Feb 21, 2018
42cec02
Temporary fixes for setup
networkfusion Aug 11, 2019
4ad1ab4
Correct TopGear Rally and add Taz Express save
networkfusion Aug 14, 2019
0d70330
Eeprom filesizes were incorrect (One bit is not a byte). (#29)
gameblabla Oct 14, 2019
edc8012
Update README.md
networkfusion Aug 23, 2023
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@
## Temporary files
*.tmp
*~
*.VC.db*
*properties.json
/.vs
/.vscode
32 changes: 0 additions & 32 deletions ALT64.INI

This file was deleted.

55 changes: 39 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,38 +1,61 @@
#
# Copyright (c) 2017 The Altra64 project contributors
# See LICENSE file in the project root for full license information.
#

ROOTDIR = $(N64_INST)
GCCN64PREFIX = $(ROOTDIR)/bin/mips64-elf-
CHKSUM64PATH = $(ROOTDIR)/bin/chksum64
MKDFSPATH = $(ROOTDIR)/bin/mkdfs
HEADERPATH = $(ROOTDIR)/lib
N64TOOL = $(ROOTDIR)/bin/n64tool
HEADERNAME = header

HEADERNAME = header.ed64
HEADERTITLE = "EverDrive OS"

SRCDIR = ./src
INCDIR = ./inc
RESDIR = ./res
OBJDIR = ./obj
BINDIR = ./bin
TOOLSDIR = ./tools

LINK_FLAGS = -O1 -L$(ROOTDIR)/lib -L$(ROOTDIR)/mips64-elf/lib -ldragon -lmikmod -lmad -lyaml -lc -lm -ldragonsys -lnosys $(LIBS) -Tn64ld.x
PROG_NAME = menu
CFLAGS = -std=gnu99 -march=vr4300 -mtune=vr4300 -O1 -I$(ROOTDIR)/include -I$(ROOTDIR)/mips64-elf/include -lpthread -lrt -D_REENTRANT -DUSE_TRUETYPE
PROG_NAME = OS64
CFLAGS = -std=gnu99 -march=vr4300 -mtune=vr4300 -O1 -I$(INCDIR) -I$(ROOTDIR)/include -I$(ROOTDIR)/mips64-elf/include -lpthread -lrt -D_REENTRANT -DUSE_TRUETYPE $(SET_DEBUG)
ASFLAGS = -mtune=vr4300 -march=vr4300
CC = $(GCCN64PREFIX)gcc
AS = $(GCCN64PREFIX)as
LD = $(GCCN64PREFIX)ld
OBJCOPY = $(GCCN64PREFIX)objcopy
OBJS = $(PROG_NAME).o everdrive.o fat.o disk.o mem.o sys.o ini.o strlib.o utils.o sram.o stb_image.o chksum64.o mp3.o

SOURCES := $(wildcard $(SRCDIR)/*.c)
OBJECTS = $(SOURCES:$(SRCDIR)/%.c=$(OBJDIR)/%.o)

$(PROG_NAME).v64: $ $(PROG_NAME).elf $(PROG_NAME).dfs
$(OBJCOPY) $(BINDIR)/$(PROG_NAME).elf $(BINDIR)/$(PROG_NAME).bin -O binary
rm -f $(BINDIR)/$(PROG_NAME).v64
$(N64TOOL) -l 4M -t $(HEADERTITLE) -h $(RESDIR)/$(HEADERNAME) -o $(BINDIR)/$(PROG_NAME).v64 $(BINDIR)/$(PROG_NAME).bin -s 1M $(BINDIR)/$(PROG_NAME).dfs
$(CHKSUM64PATH) $(BINDIR)/$(PROG_NAME).v64

$(PROG_NAME).v64: $(PROG_NAME).elf test.dfs
$(OBJCOPY) $(PROG_NAME).elf $(PROG_NAME).bin -O binary
rm -f OS64.v64
$(N64TOOL) -l 4M -t "EverDrive OS" -h ./header.ed64 -o OS64.v64 $(PROG_NAME).bin -s 1M test.dfs
$(CHKSUM64PATH) OS64.v64
$(PROG_NAME).elf : $(OBJECTS)
@mkdir -p $(BINDIR)
$(LD) -o $(BINDIR)/$(PROG_NAME).elf $(OBJECTS) $(LINK_FLAGS)

$(PROG_NAME).elf : $(OBJS)
$(LD) -o $(PROG_NAME).elf $(OBJS) $(LINK_FLAGS)
$(OBJECTS): $(OBJDIR)/%.o : $(SRCDIR)/%.c
@mkdir -p $(OBJDIR)
$(CC) $(CFLAGS) -c $< -o $@

copy: $(PROG_NAME).v64
sh upload.sh
sh $(TOOLSDIR)/upload.sh

test.dfs:
$(MKDFSPATH) test.dfs ./filesystem/
$(PROG_NAME).dfs:
$(MKDFSPATH) $(BINDIR)/$(PROG_NAME).dfs $(RESDIR)/filesystem/

all: $(PROG_NAME).v64

debug: $(PROG_NAME).v64

debug: SET_DEBUG=-DDEBUG

clean:
rm -f *.v64 *.elf *.o *.bin *.dfs
rm -f $(BINDIR)/*.v64 $(BINDIR)/*.elf $(OBJDIR)/*.o $(BINDIR)/*.bin $(BINDIR)/*.dfs
149 changes: 45 additions & 104 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,139 +1,80 @@
# alt64
# NOTE: THIS REPO WILL SOON BE ARCHIVED.
Please see [N64FlashcartMenu](https://github.com/Polprzewodnikowy/N64FlashcartMenu) for a more modern codebase.

Alternative Everdrive64 menu

Kuroneko!
# Altra64

:\ /; _
; \___/ ; ; ;
,:-"' `"-:. / ;
_ /,---. ,---.\ _ _; /
_:>(( | ) ( | ))<:_ ,-""_,"
\````` `````/""""",-""
'-.._ v _..-' )
/ ___ ____,.. \
/ / | | | ( \. \
ctr / / | | | | \ \
`" `" `" `"

nyannyannyannyannyannyannyannyannyannyannyannyannyannyannyannyannyan
Alternative Everdrive64 menu


`alt64` is an open source menu for [Everdrive64](http://krikzz.com/). It was
`Altra64` is an open source menu for [Everdrive64](http://krikzz.com/) and is based on a fork of alt64 which was
originally written by saturnu, and released on the
[Everdrive64 forum](http://krikzz.com/forum/index.php?topic=816.0).

## Building

If you want to build the menu, you need an n64 toolchain. We'll use the
toolchain recommended by libdragon, with some updated versions.
If you want to build the menu, you need an n64 toolchain. When using windows 10 or Ubuntu, installation is totally automated through a script.

### Dependencies

* [libdragon](https://github.com/parasyte/libdragon)
* [libmikmod-n64](https://github.com/parasyte/libmikmod-n64)
* [libmad-n64](https://github.com/parasyte/libmad-n64)
### Dependencies (installed automatically)
* Windows 10 (Aniversary Update or above) / Ubuntu 16.04 (or above)
* [libdragon](https://github.com/DragonMinded/libdragon)
* [libmikmod (with n64 driver)](https://github.com/networkfusion/libmikmod)
* [libmad-n64](https://github.com/networkfusion/libmad-n64)
* [libyaml](http://pyyaml.org/wiki/LibYAML)

### Build the Toolchain

*You may skip this step if it's already installed.*

Clone the `libdragon` repo and create a directory for the build.

```bash
$ git clone https://github.com/parasyte/libdragon.git
$ mkdir libdragon/build_gcc
$ cp libdragon/tools/build libdragon/build_gcc
$ cd libdragon/build_gcc
```

Modify the `build` script to set your installation path. Here is the default:
Clone this `Altra64` repo to a directory of your choice.

```bash
# EDIT THIS LINE TO CHANGE YOUR INSTALL PATH!
export INSTALL_PATH=/usr/local/mips64-elf
```
On Windows 10:
* Ensure that ["Windows Subsystem For Linux (Ubuntu)"](https://msdn.microsoft.com/en-gb/commandline/wsl/install_guide) is installed.
* browse to the tools directory and double click on ```setup-wsfl.cmd```.

Build it! This can take an hour or more.
On Ubuntu, browse to the tools directory and run the command ```$ chmod +x ./setup-linux.sh;source ./setup-linux.sh```

```bash
$ ./build
```

### Configure your Environment
### Build `Altra64`

Add the following environment variable to your `~/.bash_profile` or `~/.bashrc`
Be sure to use the same path that you configured in the build script!
To build the Rom

```bash
export N64_INST=/usr/local/mips64-elf
from the projects root directory,
On Windows 10 run
```

### Build `libdragon`

Make sure you are in the `libdragon` top-level directory, and make sure `libpng`
is installed:

```bash
$ make && make install
$ make tools && make tools-install
> build
```
on linux
```

### Build `libmikmod`

Clone `libmikmod-n64` and build:

```bash
$ git clone https://github.com/parasyte/libmikmod-n64.git
$ cd libmikmod-n64
$ make
$ make install
```
If it all worked, you will find `OS64.v64` in the `Altra64` bin directory.

### Build `libmad-n64`

Clone `libmad-n64` and build, be sure to set the path according to your
toolchain installation path:
### Debug Build `Altra64`
To build the debug version of the Rom

```bash
$ git clone https://github.com/parasyte/libmad-n64.git
$ cd libmad-n64
$ export PATH=$PATH:$(N64_INST)/bin
$ CFLAGS="-march=vr4300 -mtune=vr4300 -mno-extern-sdata" \
LDFLAGS="-L$(N64_INST)/lib" LIBS="-lc -lnosys" \
./configure --host=mips64-elf --disable-shared \
--prefix=$(N64_INST) --enable-speed --enable-fpm=mips
$ make
$ make install
from the projects root directory,
On Windows 10 run
```

### Build `libyaml`

Download libyaml 0.1.6 and build, be sure to set the path according to your
toolchain installation path:

```bash
$ hg clone https://bitbucket.org/xi/libyaml
$ cd libyaml
$ hg update 0.1.6
$ ./bootstrap
$ export PATH=$PATH:$(N64_INST)/bin
$ CFLAGS="-std=gnu99 -march=vr4300 -mtune=vr4300" \
LDFLAGS="-L$(N64_INST)/lib -Tn64ld.x" \
LIBS="-ldragon -lc -ldragonsys -lnosys" \
./configure --host=mips64-elf --prefix=$(N64_INST)
$ make
$ make install
> build debug
```
on linux
```
$ make debug
```
If it all worked, you will find `OS64.v64` in the `Altra64` bin directory.

### Build `alt64`

Finally, we can clone `alt64` and build it!
### Clean `Altra64`
Finally, we can clean the build objects from the project

```bash
$ git clone https://github.com/parasyte/alt64.git
$ make
from the projects root directory,
On Windows 10 run
```
> build clean
```
on linux
```
$ make clean
```

If it all worked, you will find `OS64.v64` in the `alt64` top-level directory.
Enjoy!
23 changes: 23 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
::
:: Copyright (c) 2017 The Altra64 project contributors
:: See LICENSE file in the project root for full license information.
::

@echo off
set "SystemPath=%SystemRoot%\\System32"
IF EXIST %WINDIR%\\sysnative\\reg.exe (
set "SystemPath=%SystemRoot%\Sysnative"
echo. "32-bit process..."
)

set env="/usr/local/libdragon"

IF %1.==. (
echo. "no parameter"
%SystemPath%\\bash --verbose -c "export N64_INST=%env%; make"
) ELSE (
echo. "parameter: %1"
%SystemPath%\\bash --verbose -c "export N64_INST=%env%; make %1"
)

:pause
29 changes: 0 additions & 29 deletions disk.h

This file was deleted.

Loading