Skip to content

Add dockerfile for toolchain, minor internal changes#2314

Open
mracsys wants to merge 10 commits into
OoTRandomizer:Devfrom
mracsys:asm_dev_container
Open

Add dockerfile for toolchain, minor internal changes#2314
mracsys wants to merge 10 commits into
OoTRandomizer:Devfrom
mracsys:asm_dev_container

Conversation

@mracsys
Copy link
Copy Markdown

@mracsys mracsys commented Oct 5, 2024

A dockerfile and compose script are added to the ASM folder to make setting up the randomizer toolchain easier. Readme files are updated to describe the process from both the command line and from VSCode's Dev Container extension. Both pipelines have been tested on Linux (x86-64), Windows (x86-64), and macOS (arm64). Other architectures for all OS's are expected to behave as long as docker/podman support them.

I made some internal changes that should be transparent to users/devs that make it easier to reuse files in the container:

  • ZOOTDEC.z64 is no longer generated in the root of the repository. The randomizer caches the uncompressed ROM in ASM/roms/base.z64, which also conveniently removes the need to copy it there to compile the C/ASM patch. This required changing hardcoded references to ZOOTDEC.z64 in some of the helper scripts and notes.
  • The compressor is run with a working directory of ASM/roms/. dmaTable.dat is moved to this folder to facilitate this. This change creates the ARCHIVE.bin cache in this folder instead of the repository root. See the comment in Main.py#L244 for details why.
  • GUI Browse buttons will attempt to use a relative path for the file/directory inputs, which are then saved as relative paths to settings.sav. This allows running the randomizer from either the host or the container without worrying about where the repository is saved. This is only relevant for the Dev Container extension as the unmodified docker container will only compile the C/ASM and exit. I think this doesn't affect the web version as the functions were marked electron-only, but I don't know how safe that assumption is.

Some of these changes may affect the web branch. ROM patching should be tested there before merging.

@flagrama
Copy link
Copy Markdown

flagrama commented Oct 6, 2024

  • ZOOTDEC.z64 is no longer generated in the root of the repository. The randomizer caches the uncompressed ROM in ASM/roms/base.z64, which also conveniently removes the need to copy it there to compile the C/ASM patch. This required changing hardcoded references to ZOOTDEC.z64 in some of the helper scripts and notes.

Is this going to break running the generator without a base ROM selected, or do the other changes mean that is effectively unchanged, the location just happens to be different?

@fenhl fenhl added Status: Needs Review Someone should be looking at it Status: Needs Testing Probably should be tested Component: Misc A catch-all label Type: Maintenance Code style, infrastructure, updating dependencies labels Oct 6, 2024
@mracsys
Copy link
Copy Markdown
Author

mracsys commented Oct 7, 2024

No, it only changed the location/filename. I just doublechecked and it worked fine without the vanilla compressed ROM once the uncompressed one was generated.

@mracsys
Copy link
Copy Markdown
Author

mracsys commented Nov 10, 2024

I got a chance to test this on a mac. Unfortunately there are no pre-built aarch64 debian packages for the n64 toolchain. Building from source works, just very slowly (~30 minutes on an M4). Once the image is built everything is quick.

fenhl
fenhl previously requested changes Jan 11, 2025
Comment thread Notes/vscode.md Outdated
@fenhl fenhl added the Status: Waiting for Author Changes or response requested label Jan 11, 2025
@mracsys mracsys force-pushed the asm_dev_container branch from eb68ecb to 5861236 Compare April 4, 2026 01:44
mracsys and others added 5 commits April 3, 2026 21:57
Ensures podman user has same IDs as host user
Ensures podman user has same IDs as host user
docker-compose: add binutils prefix, support mounts with SELinux

Tested on macOS (arm64) and Windows (x86-64). flagrama already tested on Linux (x86-64).
@mracsys
Copy link
Copy Markdown
Author

mracsys commented Apr 4, 2026

Everything has been re-tested on Windows/macOS/Linux. Docker on Windows ARM is available as a beta, but is untested as I do not have a device to run it. flagrama also tested on Linux.

@mracsys
Copy link
Copy Markdown
Author

mracsys commented Apr 4, 2026

I got a chance to test this on a mac. Unfortunately there are no pre-built aarch64 debian packages for the n64 toolchain. Building from source works, just very slowly (~30 minutes on an M4). Once the image is built everything is quick.

Extended build times no longer apply on macOS as the practicerom repo now includes ARM binaries. Image build time is comparable to x86 now (a couple minutes).

@fenhl fenhl removed Status: Waiting for Author Changes or response requested Status: Needs Testing Probably should be tested labels Apr 4, 2026
Comment thread ASM/Dockerfile Outdated
Co-authored-by: Vincent Cunningham <flagrama@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@fenhl fenhl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I accidentally marked my previous review as “request changes” despite not being a full review. Let me see if leaving this comment will reset my review status.

@fenhl fenhl dismissed their stale review May 25, 2026 05:23

Ah, found the button.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component: Misc A catch-all label Status: Needs Review Someone should be looking at it Type: Maintenance Code style, infrastructure, updating dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants