Homebrew Question Any progress made on NGC N64 emulators from Mario 3D All Stars?

HideoKojima

Well-Known Member
OP
Member
Joined
Jan 17, 2018
Messages
1,010
Trophies
0
Age
25
XP
1,880
Country
United States
I wonder if any progress was made regarding both. For now I'm mainly interested in replaying Paper Mario 64 with HD graphics pack on the switch.
 
  • Like
Reactions: Fadi5555

wsh1994

Active Member
Newcomer
Joined
Feb 12, 2015
Messages
29
Trophies
0
Age
27
Location
Ede
XP
436
Country
Netherlands
Would be nice but don't expect too much for now. Nintendo knows very well that their software is being datamined and that whatever they release should be as airtight as possible. I'm pretty sure they saw this wish coming from the day they decided to go for emulation and put in palce quite a lot of counter measures
 
  • Like
Reactions: HideoKojima

djcraze

Well-Known Member
Member
Joined
Jun 19, 2008
Messages
131
Trophies
0
XP
336
Country
United States
The GameCube emulator only emulates the GameCube’s CPU and graphics pipeline. The actual games are recompiled to aarch64. It appears that Nintendo used some kind of automated tool to translate the game’s PPC assembly to aarch64 instead of recompiling from source. This means you can’t just drop in a ROM and bypass some kind of checks and balances. The ROM has to have a aarch64 counterpart in order to work. I believe the memory structure of the ROM is still maintained, so the aarch64 bit is really only for the CPU instructions.


It’s also likely that the emulator was only created to work with Sunshine and may not have full GameCube emulation, and instead it emulates everything that Sunshine uses.


It would be wiser to spend the time on Dolphin to get games to run smoothly rather than work on getting Hagi to work. But that’s my 2¢.
 

m4xw

Ancient Deity
Developer
Joined
May 25, 2018
Messages
2,433
Trophies
1
Age
117
XP
6,787
Country
Germany
The GameCube emulator only emulates the GameCube’s CPU and graphics pipeline. The actual games are recompiled to aarch64. It appears that Nintendo used some kind of automated tool to translate the game’s PPC assembly to aarch64 instead of recompiling from source. This means you can’t just drop in a ROM and bypass some kind of checks and balances. The ROM has to have a aarch64 counterpart in order to work. I believe the memory structure of the ROM is still maintained, so the aarch64 bit is really only for the CPU instructions.


It’s also likely that the emulator was only created to work with Sunshine and may not have full GameCube emulation, and instead it emulates everything that Sunshine uses.


It would be wiser to spend the time on Dolphin to get games to run smoothly rather than work on getting Hagi to work. But that’s my 2¢.
.data is still taken from the dol, the AOT recompiled code only has .text and resolved constants.
Func layouts change since it has some basic heurs like inlining funcs <= 48 opcodes etc.
Also your first sentence is just weird to say, it "actively" emulates the GPU and DSP, CPU emulation is achieved by remapping registers to their counterpart in the context structure, (this ends up purely in aarch64) in the llvm IR optimization pass and emitting that as code -> another compiler optimization pass
Yields on back branches, interrupts, etc..
Honestly probably easier to make that work than optimizing dolphin to run on 1020mhz... both are huge undertakings and months to years of work

--------------------- MERGED ---------------------------

It’s also likely that the emulator was only created to work with Sunshine
Also huge bs, the emu couldnt be farther away from being only created for sunshine.
Its tons of state-of-the-art stuff and should run almost all of the library.
I also found leftovers of a interpreter which isnt compiled in etc. (and would absolutely suck anyway :P, use-case are games with self modifying code I guess tho)
As far I can tell it targets the whole fucking library, also for the use case where source code isnt available and compat should be great.
 
Last edited by m4xw,

Nero075

New Member
Newbie
Joined
Sep 23, 2020
Messages
2
Trophies
0
Age
30
XP
17
Country
United States
Probably a stupid question, but if hagi roms are recompiled, why does the rom file for sunshine extracted from 3das work in dolphin?
 

m4xw

Ancient Deity
Developer
Joined
May 25, 2018
Messages
2,433
Trophies
1
Age
117
XP
6,787
Country
Germany
Probably a stupid question, but if hagi roms are recompiled, why does the rom file for sunshine extracted from 3das work in dolphin?
Because its a normal rom, but not a single line of code in the dol is executed.
Its the matching copy to the recompiled version (which is not part of the gcm) where every single global data access is referenced to.
 
  • Like
Reactions: Nero075

Nero075

New Member
Newbie
Joined
Sep 23, 2020
Messages
2
Trophies
0
Age
30
XP
17
Country
United States
So the original dol section is there as well as a recompiled version of that? Interesting. Sounds like they're being clever doing compatibility/performance and anti-hacking stuff in one go.

Btw thanks for the patience answering a noobs questions.
 

djcraze

Well-Known Member
Member
Joined
Jun 19, 2008
Messages
131
Trophies
0
XP
336
Country
United States
Also huge bs, the emu couldnt be farther away from being only created for sunshine.

My fault, I wasn't clear in what I meant. I meant that this version of Hagi is likely a happy-path implementation to get Sunshine working. My thought is that as more and more games are ported, it will have full compatibility. I'm mostly basing this off of the fact that I found a couple of instances in the executable that throw an error due to lack of support, or log messages saying that something was executed and may not work. But reverse engineering isn't my day job, so I'm talking out of my ass mostly.
 
General chit-chat
Help Users
    Veho @ Veho: https://i.imgur.com/gYVvLQ2.mp4