Package: sm64-random-assets
Generates non-copyrighted randomized assets so sm64 and sm64-port can be used
for educational purposes.This has only been tested for building the US variant, and only on Linux.For each asset it generates a random texture, except in special cases like text
where it was possible to generate reasonable textures with open source tools.
The result is surprisingly playable.Future work will support configurable and procedural generation of assets.Python RequirementsTo run the asset generation script, the following requirements are needed.pipinstallkwimageopencv-python-headlessubeltnumpyruamel.yamlPyYAMLscriptconfigrichparsePC Port Example UsageThe following instructions were written on an Ubuntu 22.04 PC# PC Port Dependenciessudoaptinstall-ygitbuild-essentialpkg-configlibusb-1.0-0-devlibsdl2-dev# You can set your "code" directory path - the place where you will clone
# this repo - to be somewhere convenient for youCODE_DPATH=$HOME/code# Ensure your code directory existsmkdir-p$CODE_DPATH# Clone this repogitclonehttps://github.com/Erotemic/sm64-random-assets.git$CODE_DPATH/sm64-random-assets# Move into the root of this repo and initialize the sm64-port submodule,
# which will clone the official PC port repo.cd$CODE_DPATH/sm64-random-assetsgitsubmoduleupdate--inittpl/sm64-port# Run the asset generatorpython$CODE_DPATH/sm64-random-assets/generate_assets.py--dst$CODE_DPATH/sm64-random-assets/tpl/sm64-port# Move into the PC port directorycd$CODE_DPATH/sm64-random-assets/tpl/sm64-port# CompilemakeNOEXTRACT=1VERSION=us-j16The compiled executable can now be run directly:# Run the executablebuild/us_pc/sm64.usHeadless ROM Usage# ROM-only dependenciessudoaptinstall-ybinutils-mips-linux-gnubuild-essentialgitlibcapstone-devpkgconfpython3# You can set your "code" directory path - the place where you will clone
# this repo - to be somewhere convenient for youCODE_DPATH=$HOME/code# Ensure your code directory existsmkdir-p$CODE_DPATH# Clone this repogitclonehttps://github.com/Erotemic/sm64-random-assets.git$CODE_DPATH/sm64-random-assets# Move into the root of this repo and initialize the sm64 submodule,
# which will clone the official ROM-only sm64 repo.cd$CODE_DPATH/sm64-random-assetsgitsubmoduleupdate--inittpl/sm64# Run the asset generatorpython$CODE_DPATH/sm64-random-assets/generate_assets.py--dst$CODE_DPATH/sm64-random-assets/tpl/sm64# Move into the ROM-only sm64 directorycd$CODE_DPATH/sm64-random-assets/tpl/sm64# CompileNUM_CPUS=$(nproc--all)NOEXTRACT=1COMPARE=0NON_MATCHING=0VERSION=usmake-j$NUM_CPUS# The compiled ROM is: build/us/sm64.us.z64This ROM can now be flashed on an N64 cartage, copied onto an Everdrive, or run
using an N64 emulator (like Mupen64Plus). For instance, if you have Mupen64Plus
installed (e.g.sudo apt installmupen64plus-qt) you can run:mupen64plusbuild/us/sm64.us.z64N64 LimitationsOn real N64 hardware truly randomizing all textures will cause the system to
lock up. This is because the N64 has 4 megabytes of RAM, and many of the
original PNG textures are optimized to reduce their memory usage by having
large continuous sections of the same color. Naively randomizing every pixel
does not generate data well suited for PNG compression.I have verified that I cen enter every major stage and complete every bowser
fight, so I think all of the crashes have been resolved by reducing texture
sizes. I have completed a 16 star run on real N64 hardware with this.DevelopmentWhile I’ll try to keep the above instructions working / maintained, thebuild.shscript is the end-to-end entry point for developers. Starting from
a fresh repo, thebuild.shscript will take care of the entire process from
initializing submodules, generating assets, compiling the binaries, and even
running them with the pc-port, in an emulator, or copying ROMs to an EverDrive.
Environment variables can be used to control the build.sh behavior.The following are several common examples:# Build and run the PC port
TEST_LOCALLY=1 TARGET=pc ./build.sh

# Build and run the ROM in an emulator (m64py)
TEST_LOCALLY=1 TARGET=rom EMULATOR=m64py ./build.shResourcesMupen64Plus Emulator:https://wiki.debian.org/Mupen64PlusPython Frontend for Mupen64Plus:https://github.com/mupen64plus/mupen64plus-ui-pythonEverdrive 64 X7:https://krikzz.com/our-products/cartridges/ed64x7.htmlThe SM64 Port:https://github.com/sm64-port/sm64-portThe SM64 Decomp:https://github.com/n64decomp/sm64The SM64 Decomp Discord:https://discord.gg/DuYH3FhKaze Emanuar ROM Hacks:https://www.notabug.org/anomie/kaze-emanuar-romhacksHigh resolution redrawn textures:https://github.com/TechieAndroid/sm64redrawnSM64 Randomizer:https://github.com/andrelikesdogs/sm64-randomizerList of SM64 Hacks and Ports:https://en.wikipedia.org/wiki/List_of_Super_Mario_64_ROM_hacks,_mods_and_portsSM64 plus:https://github.com/MorsGames/sm64plusSM64 ex:https://github.com/sm64pc/sm64ex