Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Gameblabla fork updates #41

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
8186dbd
Eeprom filesizes were incorrect, fixed this. (One bit is not a byte)
Aug 19, 2019
d5ea9da
Add support for the ED64 Plus and its own specific directory.
Aug 21, 2019
46d1d40
Remove Anti-ED64P protection.
Aug 21, 2019
6795e0b
Fix for upstream libdragon.
Aug 21, 2019
f99c9bb
Fix up Makefile for libdragon upstream.
Aug 21, 2019
bea6640
Make libmikmod optional since the port isn't working yet.
Aug 21, 2019
916b0d4
Use superior GB64 for emulation
ariahiro64 May 5, 2021
98233e3
added loading screen
ariahiro64 May 5, 2021
0d245d7
Add new Neon64 saving support
ariahiro64 May 6, 2021
09d54dd
Make user interface much more responsive
ariahiro64 May 7, 2021
55fe314
fix toolchain
ariahirose64 Sep 23, 2021
e6562c6
add moparisthebes's improvements and build with docker
ariahirose64 Sep 25, 2021
c5b4eec
fixed the info screen formatting
ariahirose64 Sep 25, 2021
9c38490
removed embarrasing default wallpaper sprite and reenabled sound
ariahirose64 Sep 28, 2021
768298b
remove artificial wait for mempak menu
ariahirose64 Sep 28, 2021
fe5a5b7
Add Dockerfile and make it buildable as-is
moparisthebest Aug 28, 2021
9f468c6
Implement numbered saves to avoid catastrophic save game loss
moparisthebest Aug 28, 2021
8c4000a
store old sprites
ariahirose64 Sep 28, 2021
4005656
fixed weird leftovers from merge
ariahirose64 Sep 28, 2021
43a0684
Update README.md
ariahiro64 Sep 28, 2021
48999d2
extract old assets
ariahirose64 Sep 28, 2021
cb978ef
add polish to sound stuff
ariahirose64 Sep 29, 2021
c0e506a
make bgm toggleable via ini
ariahirose64 Sep 30, 2021
2f25180
slight cleanup
ariahirose64 Sep 30, 2021
c6d5f7e
slight cleanup
ariahirose64 Sep 30, 2021
0af54cd
optimised gb loading and fixed mp3 playback
ariahirose64 Oct 2, 2021
2798f5b
O3 to greatly increase mp3 quality and responsiveness
ariahirose64 Oct 3, 2021
24cf62b
Add a way to delete files in the menu.
skawo Dec 19, 2021
5d8ac25
Add missing menu function definitions.
skawo Dec 19, 2021
0d2bc95
Fix repeater code types in code engine
parasyte Jun 12, 2022
57d3674
Fix TV Modes Config with current libDragon
bbsan2k Sep 9, 2022
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
2 changes: 2 additions & 0 deletions .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Build folder
/build/*
## Build files
*.v64
*.elf
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ 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 = 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)
LINK_FLAGS = -O3 -L$(ROOTDIR)/lib -L$(ROOTDIR)/mips64-elf/lib -ldragon -lmad -lmikmod -lyaml -lc -lm -ldragonsys -lnosys $(LIBS) -Tn64ld.x
PROG_NAME = OS64P
CFLAGS = -std=gnu99 -march=vr4300 -mtune=vr4300 -O3 -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

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

Expand Down
67 changes: 12 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,33 @@

Alternative Everdrive64 menu


`Altra64` is an open source menu for [Everdrive64](http://krikzz.com/) and is based on a fork of alt64 which was
`Altra64` is an open source menu for [Everdrive64](http://krikzz.com/) and ed64+ 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. When using windows 10 or Ubuntu, installation is totally automated through a script.

### 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 this `Altra64` repo to a directory of your choice.

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```.

On Ubuntu, browse to the tools directory and run the command ```$ chmod +x ./setup-linux.sh;source ./setup-linux.sh```
If you want to build the menu, you need an n64 toolchain. This is terrible to build, moparisthebest ended up creating a Dockerfile in the docker folder, instructions included in it.

Or if you trust him, you can use the one he built and pushed to docker hub, [moparisthebest/altra64-dev](https://hub.docker.com/r/moparisthebest/altra64-dev)

### Build `Altra64`

To build the Rom

from the projects root directory,
On Windows 10 run
```
> build
```
on linux
```
$ make
```
If it all worked, you will find `OS64.v64` in the `Altra64` bin directory.

### Debug Build `Altra64`
To build the debug version of the Rom

from the projects root directory,
On Windows 10 run
```
> build debug
```
on linux
```
$ make debug
```
If it all worked, you will find `OS64.v64` in the `Altra64` bin directory.
from the projects root directory, with docker installed

$ docker run --rm -v "$(pwd):/build" moparisthebest/altra64-dev make

If it all worked, you will find `OS64.v64` in the `bin` directory.


### Clean `Altra64`

Finally, we can clean the build objects from the project

from the projects root directory,
On Windows 10 run
```
> build clean
```
on linux
```
$ make clean
```
from the projects root directory

$ docker run --rm -v "$(pwd):/build" moparisthebest/altra64-dev make clean

Enjoy!
Empty file modified build.cmd
100644 → 100755
Empty file.
Empty file modified doc/functions.txt
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

# to build and test:
# docker build -t altra64-dev . && docker run --rm -v "$(pwd):/build" -it altra64-dev

# to use to compile altra64 (or other n64 stuff I guess)
# docker run --rm -v "$(pwd):/build" altra64-dev make

#FROM ubuntu:18.04
FROM ubuntu:16.04

RUN mkdir /build

COPY setup-linux.sh /usr/bin/setup-linux.sh

# run it then delete all build artifacts
RUN /usr/bin/setup-linux.sh && rm -rf /root/*

ENV N64_INST=/usr/local/libdragon
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/libdragon/bin

VOLUME [ "/build" ]

WORKDIR /build

CMD ["bash"]
93 changes: 93 additions & 0 deletions docker/setup-linux.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
#!/bin/bash
#
# Copyright (c) 2017 The Altra64 project contributors
# See LICENSE file in the project root for full license information.
#

set -euxo pipefail

# Download and install latest updates for the system [sudo req.]
apt-get update
apt-get -y upgrade

# Install essential packages [sudo req.]
apt-get -y install wget build-essential git texinfo libc6 libgmp-dev libmpfr-dev libmpc-dev libpng-dev zlib1g-dev libtool autoconf

# change to the users root directory
cd ~/

# add a system variable and make it perminent
# echo 'N64_INST=/usr/local/libdragon' >> /etc/environment
# echo 'export N64_INST=/usr/local/libdragon' >> ~/.bashrc
export N64_INST=/usr/local/libdragon
# source ~/.bashrc

# Pull the latest libdragon source code and make a build directory
git clone https://github.com/dragonminded/libdragon.git
# set to correct commit

# fix issues with the build scripts
sed -i -- 's|${N64_INST:-/usr/local}|/usr/local/libdragon|g' libdragon/tools/build
sed -i -- 's|--with-newlib|--with-newlib --with-system-zlib|g' libdragon/tools/build

sed -i -- 's| -lpng|\nLDLIBS = -lpng|g' libdragon/tools/mksprite/Makefile
sed -i -- 's| -Werror| -w|g' libdragon/tools/mksprite/Makefile

# make a build folder for libdragon
mkdir libdragon/build_gcc
cp libdragon/tools/build-toolchain.sh libdragon/build/build-toolchain.sh

# run the build script (this will take a while! and if not sudo, will ask for password mid flow!)
cd libdragon/build
./build-toolchain.sh

cd ..
# run the install script [sudo req]
make
make install
make tools
make tools-install

cd ..
# install libmikmod (custom version)
git clone https://github.com/n64-tools/libmikmod
cd libmikmod/n64
make
make install
cd .. # we have are in a subfolder, this is not a duplicate...

cd ..
# install libyaml
git clone https://github.com/yaml/libyaml
cd libyaml
./bootstrap
#$(N64_INST) converterd to $N64_INST below otherwise it will not run on WSFL
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

cd ..
# install libmad (custom version)
git clone https://github.com/n64-tools/libmad
cd libmad
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

cd ..

# Perform cleanup
apt-get -y autoremove
apt-get autoclean

echo 'export N64_INST=/usr/local/libdragon' >> ~/.bashrc
echo 'export PATH="$PATH:$N64_INST/bin"' >> ~/.bashrc

Empty file modified inc/chksum64.h
100644 → 100755
Empty file.
Empty file modified inc/cic.h
100644 → 100755
Empty file.
Empty file modified inc/debug.h
100644 → 100755
Empty file.
Empty file modified inc/diskio.h
100644 → 100755
Empty file.
Empty file modified inc/errors.h
100644 → 100755
Empty file.
Empty file modified inc/everdrive.h
100644 → 100755
Empty file.
Empty file modified inc/ff.h
100644 → 100755
Empty file.
Empty file modified inc/ffconf.h
100644 → 100755
Empty file.
Empty file modified inc/font_patch/font.h
100644 → 100755
Empty file.
Empty file modified inc/font_patch/info.txt
100644 → 100755
Empty file.
Empty file modified inc/hashtable.h
100644 → 100755
Empty file.
Empty file modified inc/image.h
100644 → 100755
Empty file.
Empty file modified inc/ini.h
100644 → 100755
Empty file.
Empty file modified inc/integer.h
100644 → 100755
Empty file.
Empty file modified inc/main.h
100644 → 100755
Empty file.
Empty file modified inc/mem.h
100644 → 100755
Empty file.
Empty file modified inc/memorypak.h
100644 → 100755
Empty file.
2 changes: 2 additions & 0 deletions inc/menu.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ extern int text_offset;
void printText(char *msg, int x, int y, display_context_t dcon);

void menu_about(display_context_t disp);
void menu_controls(display_context_t disp);
void menu_delete(display_context_t disp, bool isdir);

#endif
Empty file modified inc/mp3.h
100644 → 100755
Empty file.
Empty file modified inc/regsinternal.h
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion inc/rom.h
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
#define IO_WRITE(addr,data) (*(volatile u32*)PHYS_TO_K1(addr)=(u32)(data))

#define SAVE_SIZE_SRAM 32768
#define SAVE_SIZE_SRAM96 131072
#define SAVE_SIZE_SRAM96 131072 //TODO: or should this be 98304
#define SAVE_SIZE_EEP4k 512
#define SAVE_SIZE_EEP16k 2048
#define SAVE_SIZE_FLASH 131072
Expand Down
Empty file modified inc/sd.h
100644 → 100755
Empty file.
Empty file modified inc/sound.h
100644 → 100755
Empty file.
Empty file modified inc/sram.h
100644 → 100755
Empty file.
Empty file modified inc/stb_image.h
100644 → 100755
Empty file.
Empty file modified inc/stb_truetype.h
100644 → 100755
Empty file.
Empty file modified inc/strlib.h
100644 → 100755
Empty file.
Empty file modified inc/sys.h
100644 → 100755
Empty file.
Empty file modified inc/types.h
100644 → 100755
Empty file.
Empty file modified inc/usb.h
100644 → 100755
Empty file.
Empty file modified inc/utils.h
100644 → 100755
Empty file.
Empty file modified inc/version.h
100644 → 100755
Empty file.
53 changes: 25 additions & 28 deletions res/ALT64.INI
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,32 +1,29 @@
; alt64 config file

[ed64] ; Menu config
build=18 ; Release build number
border_color_1=FFFFFFFF ; 0x00000080 RGBT
border_color_2=3F3F3FFF ; 0x3F3F3FFF RGBT 00000060 w light
box_color=000000B6 ; 0x00000080 RGBT
selection_color=80008070 ; 0x80008070 RGBT 6495ED60
list_font_color=CDC9C940 ; 0x80008070 RGBT 6495ED60
list_dir_font_color=FFFFE040 ; 0x80008070 RGBT 6495ED60
selection_font_color=FFB90FFF ; 0x80008070 RGBT 6495ED60
text_offset=0 ; shift menu horizontal e.g. -1
cd_behaviour=1 ; 0=first entry 1=last entry
scroll_behaviour=0 ; 0=page-system 1=classic
quick_boot=1 ; 'START' boots last rom
sound_on=1 ; sounds 1=on 0=off
page_display=1 ; display page
tv_mode=2 ; 1=ntsc 2=pal 3=mpal 0=force_off
enable_colored_list=1 ; 1=enable 0=disalbe
ext_type=0 ; 0=classic 1=OS64
sd_speed=2 ; 1=25MHz 2=50MHz
background_image=background.png ; backgrund png image 320x240 32bit
hide_sysfolder=1 ; 1=hide 0=don't hide
mempak_path=/MEMPAKS/ ; surround with slashes
save_path=SDSAVE ; save directory inside ED64
[ed64] ; Menu config
build=20 ; Release build number
border_color_1=FFFFFFFF ; 0x00000080 RGBT
border_color_2=3F3F3FFF ; 0x3F3F3FFF RGBT 00000060 w light
box_color=000000B6 ; 0x00000080 RGBT
selection_color=80008070 ; 0x80008070 RGBT 6495ED60
list_font_color=CDC9C940 ; 0x80008070 RGBT 6495ED60
list_dir_font_color=FFFFE040 ; 0x80008070 RGBT 6495ED60
selection_font_color=FFB90FFF ; 0x80008070 RGBT 6495ED60
text_offset=0 ; shift menu horizontal e.g. -1
cd_behaviour=1 ; 0=first entry 1=last entry
scroll_behaviour=0 ; 0=page-system 1=classic
quick_boot=1 ; 'START' boots last rom
sound_on=1 ; sounds 1=on 0=off
bgm_on=1 ; music 1=on 0=off
page_display=1 ; display page
tv_mode=0 ; 1=ntsc 2=pal 3=mpal 0=force_off
enable_colored_list=1 ; 1=enable 0=disable
ext_type=1 ; 0=classic 1=OS64
sd_speed=2 ; 1=25MHz 2=50MHz
background_image= ; backgrund png image 320x240 32bit
hide_sysfolder=1 ; 1=hide 0=don't hide
mempak_path=/MEMPAKS/ ; surround with slashes
save_path=SDSAVE ; save directory inside ED64

[user]
name = Altra64 ; Username

[gblite]
save_path=/ED64/SDSAVE/ ; save directory surround with slashes
tv_mode=0 ; 1=ntsc 2=pal 3=mpal 0=force_off
name = Altra64 ; Username
Empty file modified res/filesystem/sounds/bamboo.wav
100644 → 100755
Empty file.
Empty file modified res/filesystem/sounds/bgm21.it
100644 → 100755
Empty file.
Empty file modified res/filesystem/sounds/done.wav
100644 → 100755
Empty file.
Empty file modified res/filesystem/sounds/ed64_mono.wav
100644 → 100755
Empty file.
Empty file modified res/filesystem/sounds/warning.wav
100644 → 100755
Empty file.
Binary file added res/filesystem/sprites/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/filesystem/sprites/background.sprite
100644 → 100755
Binary file not shown.
Binary file added res/filesystem/sprites/n64controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/filesystem/sprites/n64controller.sprite
100644 → 100755
Binary file not shown.
Binary file added res/filesystem/sprites/old/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/filesystem/sprites/old/background.sprite
Binary file not shown.
Binary file added res/filesystem/sprites/old/n64controller.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/filesystem/sprites/old/n64controller.sprite
Binary file not shown.
Binary file added res/filesystem/sprites/old/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/filesystem/sprites/old/splash.sprite
Binary file not shown.
Binary file added res/filesystem/sprites/splash.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/filesystem/sprites/splash.sprite
100644 → 100755
Binary file not shown.
Empty file modified res/header.ed64
100644 → 100755
Empty file.
Empty file modified src/chksum64.c
100644 → 100755
Empty file.
Empty file modified src/cic.c
100644 → 100755
Empty file.
Empty file modified src/debug.c
100644 → 100755
Empty file.
Empty file modified src/diskio.c
100644 → 100755
Empty file.
Empty file modified src/everdrive.c
100644 → 100755
Empty file.
Empty file modified src/ff.c
100644 → 100755
Empty file.
Empty file modified src/ffsystem.c
100644 → 100755
Empty file.
Empty file modified src/ffunicode.c
100644 → 100755
Empty file.
Empty file modified src/hashtable.c
100644 → 100755
Empty file.
Empty file modified src/image.c
100644 → 100755
Empty file.
Empty file modified src/ini.c
100644 → 100755
Empty file.
Loading