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

Author Topic: In-Game Camera Mod hack for various games  (Read 2221 times)

Aurorans

  • Newbie
  • *
  • Posts: 1
    • View Profile
In-Game Camera Mod hack for various games
« on: November 25, 2017, 09:30:32 pm »
Hello. I've been digging through the internet for the Random access memory addresses or Read Only Memory Addresses for a universal camera hack for Nintendo 64 games. In case you didn't know, Super Smash Bros original for Nintendo 64 already has a said Gameshark code to allow you to zoom the camera in (I read this from another website, can't say or remember which one)

I was thinking that you could probably do this with any game, but it may take some tweaking around. I'm specifically talking about games with 3D world and models made for the Nintendo 64. (Instance, Super Smash Bros or Pokemon Stadium 1 and 2)

As of right now, there is little knowledge of Pokemon Stadium 2's Random Access Memory Addresses and Read Only Memory Addresses and their function, and not all of Pokemon Stadium 1's RAM (Random Access Memory) Addresses and ROM (Read-Only Memory) Addresses' functions on DataCrystal's list for ROMhacking.net wiki are known/revealed.

This leaves me baffled as to how the ROMhackers got all of the addresses for mostly every details about the graphics... but nothing about the camera.

I am on Windows 10 Pro 64bit, Nvidia Geforce GT 1060, Intel i7 7700K Performance, ASUStek Motherboard (Make unknown, custom built)

I use Project 64's debug function to search for the memory addresses (I used to use Cheat Engine, but as I found out, it uses my Computer's RAM or something that utilizes dynamic addresses that change with each restart, save state save and load, etc. I need something that finds the STATIC addresses for the cameras)

If someone could point me towards a smaller set of addresses that might control the camera (should be a set of 8 or less addresses.), this may actually work, as Project 64 takes forever to find a large range of addresses (and eventually throws an "Outofmemory" like error before finishing)

My theory is that the address may be located in the 0x8000000 to 0x8FFFFFF addresses, just like everything else pointed out in the romhacking datacrystal wiki for Pokemon Stadium 1, but this still leaves 268435455 addresses, and typically, a 32 GB ram of computer cannot search that much within Project 64's own debug memory interface... too much memory involved.

Perhaps someone with more knowledge of exactly how camera addresses work could point me to the correct range of addresses (No more than 50000 addresses, or, within a C350 hex address range, example, 0x80000000-0x8000C350)

To make it simpler, you only need to search when the camera changes positions (goes from one place to another, you would search for a "Changed Value") or simply seem to stand "Completely still" (You would search for an Unchanged value). By searching during these times (like I did with cheat engine), you can narrow down the results dramatically. However, if your results are limited to 50000 results, you will only recieve 50000 results, of which, have about a 50,000/4,294,967,295 chance of even finding the correct address, which means, your said address may not exist within the 50000 results!

That's why I need it narrowed down. I have 4,294,967,295 addresses, and only 50,000 of them are returned, and always the same ones. If I seach the 0x80000000 to 0x8FFFFFF address range, that still leaves me with 268,385,455 of 268,435,455 unsearched addresses.

I don't know any way to do this through project 64. And the address range in cheat engine (0x30000000 - 0x3FFFFFFF) are not the same ones as in the actual Project64 emulator (Dynamic Addresses VS. static addresses)

NERV Agent

  • Restricted Access
  • Sr. Member
  • *
  • Posts: 497
  • Eva Unit 01
    • View Profile
    • Watch my anime shitposts on YouTube! Smell them, too!
Re: In-Game Camera Mod hack for various games
« Reply #1 on: November 27, 2017, 06:01:14 am »
Admittedly this is way beyond my level, but I had an idea.

In Super Mario 64, the camera is set at specific distances and angles away from Mario, depending on what C button you pressed. This is opposed to modern games where you use an analog stick to freely move the camera around the character; Mario 64 has limited "stiff" camera movement.

Maybe while running Super Mario 64 in an emulator, make Mario stand still, then change one of the camera angles, and research what changes in RAM could correspond to it, which could give some clue as to where that information in the ROM could be. Maybe, the way the camera works in Super Mario 64 might also apply to other N64 games.


Disregard this I chuck blocks.

This really is beyond my level.

I'm just wondering, is the debugger dumping all the RAM, or just the VRAM? Maybe narrowing it down to only the VRAM might get you closer to what you are trying to find.
« Last Edit: November 27, 2017, 06:13:37 am by NERV Agent »

FAST6191

  • Hero Member
  • *****
  • Posts: 2966
    • View Profile
Re: In-Game Camera Mod hack for various games
« Reply #2 on: November 27, 2017, 07:53:52 pm »
I am not overly versed in N64 specifics and the hardware docs are not giving me the most (I started looking at the viewport stuff but did not get so far).
However I am seeing things like the guLookAt function family in the SDK stuff.
http://n64devkit.square7.ch/n64man/gu/guLookAt.htm

It takes 10 arguments (though one is a pointer so 9 values it uses -- camera pos, direction and direction of up) which makes your 8 addresses thing tricky. Smash brothers is tricky as it does some odd things with the camera and more as part of the game design. I shall have to have a look at that though as some people have expressed interest in fiddling with aspect ratios and the off screen mechanic it uses makes that a bit more tricky. I am not sure of its prevalence on the N64 but there is also the option to move the world instead of the camera.

"but nothing about the camera"
Most hacks don't involve the camera's behaviour being changed from the stock game. Smash brothers is the exception owing to its camera being a mechanic and most of the rest of the time people only touch the camera's code if it is bad in some way (it being immediately obvious in play testing and if not then it probably does not have the fan base to bother hacking it), not to mention you might also have things like Mario 64 fixed cameras in certain positions as a function of the level editor (I don't know if Mario 64 did this or did it at a lower level -- neither would surprise me, though the latter would be frowned upon today).