News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: Changing the internal name of an N64 Rom? [REWARD]  (Read 5857 times)

IllumiNavi

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Changing the internal name of an N64 Rom? [REWARD]
« on: July 08, 2014, 03:58:32 am »
I've been trying to change SUPER MARIO 64 to THE FINAL STAR which have the same amount of characters using HexEdit but everytime i do, it doesn't change the name, but it does somehow make the begining intro with the lakitu happen in the edited course. I want to know what i'm doing wrong so I need some assistance. If someone can solve this issue they will be featured in the game with a shoutout at the end of the game.

Also, how would one go about removing the HUD in SM64?
« Last Edit: July 08, 2014, 11:53:35 pm by IllumiNavi »

Zoinkity

  • Hero Member
  • *****
  • Posts: 562
    • View Profile
Re: Changing the internal name of an N64 Rom? [REWARD]
« Reply #1 on: July 09, 2014, 12:22:52 pm »
The internal name, as in the name that appears at 0x20 in the ROM header?  That's freely editable up to 20 (0x14) bytes.  That string isn't used in-game.

If you're talking about the "ROM name" displayed in emulators, that's usually set using external lookup tables (the .rdb files, for instance).  These tables are also used by HLE for settings to run the games.  Different emulators use different methods of identifying ROMs in their databases.
PJ64, Nemu, and any others built on that database use the CRC from the header and it's internal region code.  In that case, copy the existing entry for Super Mario 64 and add a new one with the hacked game's checksum from the header (0x10 - 0x18).
Mupen (and maybe others) uses md5s or some crazy thing.  You'll want to ask somebody who doesn't get a restart without BSOD just opening that emu for advice on how to change entries.

I'm guessing if it has any impact on gameplay regardless of settings then you're playing around with a hacked version of the game.  You'll have to backtrace whatever comparison test they do against the header, but header tests are rather unlikely to be honest.
There aren't that many paranoid sorts in the N64 "community", but of them the only schemes I've seen to prevent rehacking are checksum tests, obscure undocumented code usage (usually involving dynamic code generation), disabling GameShark support in evil ways, intentionally breaking common emulators, and encryption applied to compressed files (usually involving changing the compression type too). 
Easter eggs, on the other hand, are very common.

IllumiNavi

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Changing the internal name of an N64 Rom? [REWARD]
« Reply #2 on: July 10, 2014, 05:11:44 pm »
If I were to send you the rom file would you be able to change it? I'm using PJ64 by the way.

Zoinkity

  • Hero Member
  • *****
  • Posts: 562
    • View Profile
Re: Changing the internal name of an N64 Rom? [REWARD]
« Reply #3 on: July 11, 2014, 02:07:39 pm »
Lakitu shows up once at first-run.  Afterward, they save a flag in eeprom to indicate he shouldn't show up any longer. 

PJ64's save file names are based on the internal name of the ROM.  Up until now you haven't seem Lakitu because it's been using a save file name akin to "SUPER MARIO 64.eep" rolled over from the uneditted game.  Changing the internal name causes it to create a new save file using that internal name, and since the new file is blank Lakitu shows up on first-run.

So, what you really need is a fix to kill Lakitu showing up at all.

The name displayed in the menu is based on the .rdb entry.  Open the .rdb in a text editor (even something like notepad works), copy the entry for the original SMB64, paste it at the end of the file, then change the line in brackets to this:
[FD8F0EBE-1D831B13-C:45]
The good name and internal name can be changed as well.  This affects what's listed in the ROM file manager.

Sorry, I'm on a public computer and can't get back to you again until Sunday.

July 13, 2014, 09:05:11 am - (Auto Merged - Double Posts are not allowed before 7 days.)
It's a double-post, but whatever.

Here's an IPS to disable Lakitu from showing up first run.  That also prevents the fatal error that would have occured if he had.
https://www.mediafire.com/?t8p4le81c64ork4

  The provided patch renames the ROM, corrects the checksum, and disables Lakitu.  Breaking it down:
Code: [Select]
checksum correction:
0x10 D0A0A6F8 01534641
Internal rename:
0x20 54686520 46696E61 6C205374 6172
Disable Lakitu:
0x34E44 03E00008 24020001

You'll also want to copy this at the end of "Project64.rdb".  Note that unless the user has this entry it will not have a "good name" or correct runtime information.
Code: [Select]
[D0A0A6F8-01534641-C:45]
Good Name=Super Mario 64: the Final Star (U)
Internal Name=The Final Star
RDRAM Size=8
Counter Factor=2
Save Type=First Save Type
CPU Type=Recompiler
Self-modifying code Method=Cache
Use TLB=Yes
Linking=Global
Reg Cache=Yes
Use Large Buffer=No
Delay SI=No
SP Hack=No
Status=Compatible
Plugin Note=[video] missing:dissolve effect (see GameFAQ)
Core Note=
Clear Frame=0
Self Texture=0
Primary Frame Buffer=0
Resolution Width=-1
Resolution Height=-1
Culling=1
Emulate Clear=0
MD5=F818201AAADF04008C3160745C93C1DC

  Incidentally, the tools used to make this hack limit it to running on PJ64 and offshoots.  Unaligned hardware IO (odd addresses, in other words) will cause any remotely accurate emulator to fail, much less console. 

  Not interested in a callout.  Actually, you might run into trouble if you did. 
« Last Edit: July 13, 2014, 09:05:11 am by Zoinkity »

IllumiNavi

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Changing the internal name of an N64 Rom? [REWARD]
« Reply #4 on: July 13, 2014, 12:32:36 pm »
Thanks! The name appears correctly in the header but when I actually try to play it gives the stuck in permanent loop error.

Zoinkity

  • Hero Member
  • *****
  • Posts: 562
    • View Profile
Re: Changing the internal name of an N64 Rom? [REWARD]
« Reply #5 on: July 15, 2014, 11:53:57 am »
That would be due to a bad checksum.  On a software level a bad checksum will catch with a BNEAL, endlessly looping within the boot thread.  So if you ever get that error, that's what it's about.

I re-ran the checksum for this patch based on the version of your patch and presumed the thing was not byteswapped.  Did you apply the patch or just the changes listed here? 

IllumiNavi

  • Jr. Member
  • **
  • Posts: 26
    • View Profile
Re: Changing the internal name of an N64 Rom? [REWARD]
« Reply #6 on: July 15, 2014, 01:06:05 pm »
I tried applying the patch two different times, should I try the patch on just a normal un-edited rom and see if it does those changes without getting that error?

July 15, 2014, 07:23:08 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
It seems that even with a fresh ROM I get the same result.
« Last Edit: July 15, 2014, 07:23:08 pm by IllumiNavi »