this post was submitted on 12 May 2024
1326 points (99.4% liked)

Technology

59589 readers
2891 users here now

This is a most excellent place for technology news and articles.


Our Rules


  1. Follow the lemmy.world rules.
  2. Only tech related content.
  3. Be excellent to each another!
  4. Mod approved content bots can post up to 10 articles per day.
  5. Threads asking for personal tech support may be deleted.
  6. Politics threads may be removed.
  7. No memes allowed as posts, OK to post as comments.
  8. Only approved bots from the list below, to ask if your bot can be added please contact us.
  9. Check for duplicates before posting, duplicates may be removed

Approved Bots


founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] ramirezmike@programming.dev 56 points 6 months ago (3 children)

a comment on that site really condescendingly claims this is how he would have handled it and that a script could be written in half a day to do the work.

my understanding is that an emulator effectively recreates the hardware's different components in software so that from the game's "perspective" it's running on a real machine more or less.

This process instead decompiles the game code and recompiles for a new target machine.

I suspect one can't just pump out a script in an afternoon to do this, but I am curious what is the complexity here?

[–] MajorasMaskForever@lemmy.world 57 points 6 months ago (1 children)

For graphics, the problem to be solved is that the N64 compiled code is expecting that if it puts value X at memory address Y it will draw a particular pixel in a particular way.

Emulators solve this problem by having a virtual CPU execute the game code (kinda difficult), and then emulator code reads the virtual memory space the game code is interacting with (easy), interprets those values (stupid crazy hard), and replicates the graphical effects using custom code/modern graphics API (kinda difficult).

This program is decompiling the N64 code (easy), searches for known function calls that interact with the N64 GPU (easy), swaps them with known valid modern graphics API calls (easy), then compiles for local machine (easy). Knowing what function signatures to look for and what to replace them with in the general case is basically downright impossible, but because a lot of N64 games used common code, if you go through the laborious process for one game, you get a bunch extra for free or way less effort.

As one of my favorite engineering phrases goes: the devil is in the details

[–] ramirezmike@programming.dev 6 points 6 months ago

that makes sense, it's like only really feasible now that we have enough decompiled, readable n64 games

load more comments (1 replies)