N64Recomp / N64Recomp

Tool to statically recompile N64 games into native executables

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to find entry point?

TheCoolPup opened this issue · comments

Is it possible to use a program to find the entry point in a n64 rom needed for the recomp to do its magic, or should i wait for the documentation? Cause i got the elf files ready, just finding the entry point isn’t really my cup of tea.

The entry point ram address is at offset 0x08 of the rom, though depending on the cic lockout chip it can be relocated. It will have a structure very close to this
image

Curious what program you used to find this, been trying to get mischief makers to work with this

The screenshot is project64's disassembler, but using a hex editor to open the rom says that mischief makers entry point is at 0x80000400 (rom 0x1000), which is also what i see here of this decomp https://github.com/blackgamma7/mischief-makers/blob/1272fe2b06f2b53e3258543e1972056f9e52d3fb/mischiefmakers.yaml#L23

coolpup@LAPTOP-K7L4TO43_ ~_N64Recomp_build 5_15_2024 12_22_31 AM
im curious whats causing this

if you have a discord, i would love to continue the conversation over there.

Beyond this step I can't really help much, but here's what my working toml for chameleon twist looks like

# Config file for Chameleon Twist 1 JP Recompilation.

[input]
entrypoint = 0x80025C00
# Paths are relative to the location of this config file.
elf_path = "chameleontwist.jp.elf"
output_func_path = "RecompiledFuncs"

How does one access the disassembler in project64?

alright so i did the recomp for chameleon twist, how do i get that to run on a windows machine or is that a completely seperate process on its own

Building a recompiled game is indeed its own process.
There are currently no instructions to do this, but you could try reusing the files from the Zelda64Recomp repository, but you will need to make a number of adjustments to get it working.

WAIT YOU GUYS AR DOING MISCHIEF MAKERS? I was gonna do that too!

The screenshot is project64's disassembler, but using a hex editor to open the rom says that mischief makers entry point is at 0x80000400 (rom 0x1000), which is also what i see here of this decomp blackgamma7/mischief-makers@1272fe2/mischiefmakers.yaml#L23

@TheCoolPup @Rainchus I started a Mischief Makers recomp repository right now, and am working on it. so you you want to help, here's the repository.

Technically there was already a mischief makers decomp but another one wouldn’t hurt

@LandonAndEmma do you possibly have a discord? Would love to get in contact about your recomp.

@LandonAndEmma Of course it's: "landonandemma"

Has anyone solved this issue yet? I'm working on Goldeneye right now, and I'm certain the entrypoint is 0x80000400. I verified with multiple hex editors.

Just out of interest, how are you guys able to get a working .elf for N64Recomp?

Normally, almost any n64 decomp project will create a elf file, just gotta follow the decomp’s build instructions

Also you can’t just convert a z64,n64 file to a elf either, it needs the required funcs in that elf file to work correctly

Seems like I got it to work now for two different games:
n64comp@cellenser:/mnt/N64Recomp-Project/SuperMario64# ./N64Recomp supermario64.toml Sections Num symbols: 6676 Found entrypoint, original name: func_80246000 Function count: 5988
and
n64comp@cellenser:/mnt/N64Recomp-Project/SiliconValley# ./N64Recomp siliconvalley.toml Sections Num symbols: 1170 Found entrypoint, original name: func_80125900 Function count: 1030 Working dir: /mnt/N64Recomp-Project/SiliconValley

Got four files generated (funcs.h, lookup.cpp, recomp_entrypoint.c and recomp_overlays.inl).
But how to progress from there?

That’s currently the road block I’m stuck at unfortunately, except i was doing chameleon twist and got a bunch of func files

@Rainchus curious if you’ve gotten anything out of that chameleon twist decomp, cause i try but it says I’m missing a recomp.h file

I assume you mean the chameleon twist recomp and yeah, it doesn't build currently. I'm still working on setting up everything correctly. I needed to revise a couple of things in the decomp to accommodate what recomp expects.

Has anyone solved this issue yet? I'm working on Goldeneye right now, and I'm certain the entrypoint is 0x80000400. I verified with multiple hex editors.

a way around it i found is you can comment out the entrypoint line in the toml but you'll need to make the recomp_entrypoint function yourself