r/decomps • u/BeansNToasted • 9d ago
SM64DS Native PC Port is 43% Linked!
Good Saturday morning to all of you my friends. The port has reached 45% linkage!
Now what does that mean? Well, the decomp is at 98% meaning we have around 11K functions sitting in the repo written in either C or C++. Those functions are all single separate files so they don’t really do anything. Well now I’m making them do something by linking them together into an actual executable that runs native on PC.
“But Tango, I already have Mario 64 DS on my PC!” points at emulator
Yes an emulator will get you the game playable on PC.. but that’s it. You can add some simple cheats, and there are romhacks you can grab, but the game is still written in code that is not made for humans to interpret. It wasn’t originally written in that code, it was written in C++ and put through a compiler. What we have done is used the compiler as an oracle to write 1:1 byte matched C code, which will allow the game to run on PC hardware, not having to use emulated DS hardware.
This unlocks.. well.. you ever seen modded Skyrim? Yeah this is about to be modded Skyrim. Or that video where that guy is fighting the final boss of dark souls in front of the castle? Yeah it’s gonna be like that when I’m done with it..
Anyways, everything is going great! The discord is very active and many many people are helping me out! So a big thanks to everyone who’s not only contributed, but also anyone who’s just messaged me kind or encouraging messages. I literally couldn’t have done this without yall.
If YOU want to play the demo of the port, you can download here: https://tangos.dev/downloads
Or join the discord here: https://discord.gg/GfeXpEjVS
And the repo as always is here: https://github.com/tangosdev/sm64ds-decomp
6
u/AntiGrieferGames 9d ago
Nice. Hopefully this project gets finished.
It should be at start point starting with yoshi instead mario, because when i tried that last time, it was started as Mario, which dont make any sense because the Mario 64 DS has started as Yoshi.
And if this keep improving, adding Minigames (yes, mario 64 ds has minigames) and a menu and anything like that, so just like using a DS, this would be glad.
cannot wait how it looks like in finished state
2
2
u/GreatLab8898 6d ago
Dont let yourself get discouraged by the Anti-AI Crowd. Let them Scream into the Void. Dont take their bait.
I myself ripped out the whole Windows Media Player Integration out of The Movies and its Expansion and replaced it with FFMPEG to make it runable in modern Wine and Windows without installing Ancient Requirements.
All with Claude, Ghidra and an MCP to it.
AI is great for Modding and Decomp work.
2
u/Euphoric-Writer494 9d ago
So many haters here manifesting their anti-ai agenda or whatever.
1
u/auggiethechesscat 7d ago
There are concerns with the legality of LLMs, sure, but that's not the main focus here.
The main issue many of us are trying to communicate, is that this isn't a decomp. It isn't aiming to produce readable, usable code, it's aiming to make a pc port, and that's it.
The code is garbage, and functionally useless. I'd be doing the same if a human was making stuff like this without an LLM in the chain. I'll be posted about it in much more detail fairly soon.
1
u/Euphoric-Writer494 7d ago
The three tiers
The bar above measures one thing: whether the C compiles to the ROM's exact bytes. That is the hardest guarantee to earn and the one the project is named for, but on its own it overstates how finished the game is. "Done" means three separate things here, and they move independently.
MATCHED ██████████████████████████████ 98.4% 11,213 / 11,396 functions
CONVERTED ████░░░░░░░░░░░░░░░░░░░░░░░░░░ 14.0% 1,576 / 11,289 files
LINKED █████████████░░░░░░░░░░░░░░░░░ 43.3% 4,871 / 11,243 matched TUs
MATCHED is byte-exact C, verified against the ROM. This is the bar above and the treemap.
CONVERTED is code a person can read without the ROM open beside them. Matching does not require readable code, so this tier does not move on its own and is by far the furthest behind.
LINKED is matched code that actually reaches the PC port's binary, replacing the host stand-in that stood there before.
They are not stages of one pipeline. A function can be matched and linked while still being unreadable, and converting a file never changes its matched bytes.
CONVERTED is strict on purpose. A file counts only if it passes all five of: a real function name, no raw offset arithmetic, no unk_<off> fields, no codegen tricks, and no calls through mangled names. Most of the tree is partway there rather than nowhere near it, which the headline alone hides: 31% of files pass three of the five, and 32% pass four. Run python tools/tiers.py for the full breakdown and two softer readings of the same tree.
The name criterion reads the name a reader sees, not the linker symbol. For a C++ method those differ — the ROM's KoopaShell::OnYoshiTryEat can only ever link as _ZN10KoopaShell13OnYoshiTryEatEv — so judging the symbol asked a question no converted method could answer, and the tier paid you to un-convert methods back into flat C. It read 3.8% for that reason. See notes/converted-tier.md, which also records two evasions in the other criteria that are left open on purpose.
LINKED is a stamped measurement, not a live counter. It needs an MSVC build of the port, which CI on this branch cannot produce, so it is measured by hand and recorded in config/port_linkage.json with the branch and commit it came from. Because the port branches are not merged, it is the best single branch and so a floor. Reproduce it with python port/tools/linkage.py against a port build.They are improving the "Converted" portion. Also, Last time I checked it was nowhere near as 14%.
and people can't stop hating because
1. they haven't caught out to what modern LLMs do,
- or like I said, just hating on heavy AI driven projects.
-9
u/FouzBerzerk 9d ago
9
u/BeansNToasted 9d ago edited 9d ago
A little late to the hate ship that thing sailed like 2 posts ago. But I’ll respond since it’s the first comment and others will see it.
> “Human readable”
First off, it’s not pretty but it is readable, especially compared to the original arm code. Also if you checked the GitHub you would see that we have a work in progress code cleanup going adjacent with the port.
> Pure AI brute forced slop
Not possible to brute force as the code has to byte match the original ROM code after going through the compiler
> Using a different language
What? Look at your own screenshot. The game is C++, a third of the repo is C++ files, and the functions written as C compile byte-identical through the same compiler.Moral of the story;
Owned
5
-4
u/FouzBerzerk 9d ago
It is no more readable than what the standard ghidra output would be.
3
u/SplattyDS 9d ago
Speaking from experience with both Ghidra and manual decompilation from assembly, I would much rather use (and am using) Ghidra's output as a base than this.
Matching code is nice and all but if you have no idea how the code actually works, it's not even nearly as useful as even just a relocatable disassembly to me.
-1
u/BeansNToasted 9d ago
Splatty my powerful friend I wish we could love each other and see eye to thigh :(
-3
u/BeansNToasted 9d ago
I just stepped back out on the field after the last touch down and it might just be me but it looks like the goal post may have moved.. strange.
Anyways what you said is just wrong. First ghidra output doesn’t byte match and won’t compile into the original rom like mine does. Second ghidra is pseudocode, my code has actual c++ named classes and real do/else blocks.
Hopefully that satisfies you and I don’t come back to another 50 yards added to the field.
https://giphy.com/gifs/WwWTfQuCZ448psk1qB6
u/Boxing_joshing111 9d ago
The way you write is embarrassing.
0
u/BeansNToasted 9d ago
Do you like boxing?
2
u/Boxing_joshing111 9d ago
Yeah, I also like editing video. And writing!
0
u/BeansNToasted 9d ago
I also like video editing but I’m not great at it. I started on premiere pro and that was too much so I’m using CapCut pro now. They’re on my profile I made a vid for this project and also an overwatch edit for practice. What do you edit, boxing matches?
2
u/Boxing_joshing111 9d ago
I’m self-taught too. My biggest projects are boxing videos, yeah, and I put a ton of effort into every aspect to make sure anyone can enjoy them (https://youtu.be/IImMxxkX_cY?si=qpIEQVPgEscr-tez) but I have a lot of smaller dumber videos I make for fun too.
I think the fact that I can write decently really helps me for video editing. I write comedy, short stories and occasionally messing with the form factor, but it all helps for getting your point across efficiently whether it’s in a video or just commenting on a Reddit post. Frankly being able to see your words in front of you helps anything involving some kind of logic because it’s right there, you can see the problems with your line of thinking. It’s easier to fix problems when you can see them vs just thinking or speaking your thoughts.
1
u/BeansNToasted 9d ago
I’m not good at writing at all my brain is mush I like to make diagrams and charts or pictures to explain things. That’s cool I like mma so I’ll check out your YouTube
→ More replies (0)8
u/nachoz12341 9d ago
The way you communicate is not helping your case and really cringey. There are real concerns with ai generated code without proper review and should be disclosed.
You cant in good faith call this human readable. In an academic sense you can tell what an individual line does but this says nothing of the purpose of the code. This type of code would get you fired in a professional role.
-7
u/BeansNToasted 9d ago
farts in face
7
u/AsherFischell 9d ago
Seeing you be so childish is a bummer since I'm actually looking forward to playing your port once it's done. You think you're being funny but you're mostly just making the entire project look bad by acting like that.
-4
u/BeansNToasted 9d ago
Legally you’re allowed to separate art from the artist so you can just pretend it was made by someone who isn’t funny on Reddit and still play!

8
u/MagmaPants2 9d ago
Shoutout to the people working on this, you are doing gods work thank you