Debug mode: Difference between revisions

m
MMMMMMMMMMMMM moved page Debug Mode to Debug mode: Sentence casify the wiki
(unfinished, remind me to finish this tomorrow)
 
m (MMMMMMMMMMMMM moved page Debug Mode to Debug mode: Sentence casify the wiki)
 
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
This debug menu was one of the first found in-game with the use of a [[GameShark]]. It displays information on Mario's angle, speed, and action, as well as memory info.
This debug menu was one of the first found in-game with the use of a [[GameShark]]. It displays information on Mario's angle, speed, and action, as well as memory info.
===Access===  
===Access===  
[[File:SM64Debug.png|320px|right]]
To enable the classic debug display, enter the appropriate Gameshark code for your version of the game.  
To enable the classic debug display, enter the appropriate Gameshark code for your version of the game.  


Line 37: Line 34:


{{clear}}
{{clear}}
==Complex Debug Display==  
==Complex Debug Display==  


Line 118: Line 116:
| WZ || World Z || Mario's current Z coordinate. ||  
| WZ || World Z || Mario's current Z coordinate. ||  
|-
|-
| BGY || Boundrary Ground Y || Y coordinate of the ground below Mario. ||  
| BGY || Boundary Ground Y || Y coordinate of the ground below Mario. ||  
|-
|-
| ANGY || Angle Y || Y angle of the ground below Mario. ||  
| ANGY || Angle Y || Y angle of the ground below Mario. ||  
|-
|-
| BGCODE || Boundrary Ground Code || Type of the triangle below Mario. || Terrain types can denote slipperyness, camera mode, special properties (sand, snow, wind, water flow), special triangles (painting entrances)
| BGCODE || Boundary Ground Code || Type of the triangle below Mario. || Terrain types can denote slipperiness, camera mode, special properties (sand, snow, wind, water flow), special triangles (painting entrances)
|-
|-
| BGSTATUS || Boundrary Ground  Status || Status bits of triangle below Mario. || 1 means the triangle is part of an object, 2 means the camera won't collide with this triangle. 3 means both apply.
| BGSTATUS || Boundary Ground  Status || Status bits of the triangle below Mario. || 1 means the triangle is part of an object, 2 means the camera won't collide with this triangle. 3 means both apply.
|-
|-
| BGAREA || Boundrary Ground Area || Which room the floor triangle belongs to. || In the castle, Hazy Maze Cave and Big Boo's haunt the area is split up into rooms which are defined by this property of triangles.  
| BGAREA || Boundary Ground Area || Which room the floor triangle belongs to. || In the castle, Hazy Maze Cave and Big Boo's haunt the area is split up into rooms which are defined by this property of triangles.  
|-
|-
| DPRINT OVER || Debug Print Overflow || Appears when text doesn't fit on the screen anymore. ||  
| DPRINT OVER || Debug Print Overflow || Appears when text doesn't fit on the screen anymore. ||  
|-
|-
| WATER || Water level || Y coordinate of surface of water if Mario is standing or swimming in it || Only appears when you ensure DPRINT OVER doesn't happen
| WATER || Water level || Y coordinate of the surface of the water if Mario is standing or swimming in it || Only appears when you ensure DPRINT OVER doesn't happen
|-  
|-  
| OBJ || Objects || Number of objects currently loaded. || Only appears when you ensure DPRINT OVER doesn't happen
| OBJ || Objects || Number of objects currently loaded. || Only appears when you ensure DPRINT OVER doesn't happen
Line 233: Line 231:
The profiler shows how well the game can maintain its frame rate of 30 fps.
The profiler shows how well the game can maintain its frame rate of 30 fps.


There are four colored bars acting as a time scale on the bottom. Each bar represents 1/60th of a second. On top of it, the time of the audio thread (red), game logic thread (yellow) and video thread (orange) are plotted. When the top bars reach the orange reference bar, it means they took more than 1/30th of a second so a lag frame is introduced. A little red bar is drawn in the middle left when that occurs.
There are four colored bars acting as a timescale on the bottom. Each bar represents 1/60th of a second. On top of it, the time of the audio thread (red), game logic thread (yellow) and video thread (orange) are plotted. When the top bars reach the orange reference bar, it means they took more than 1/30th of a second so a lag frame is introduced. A little red bar is drawn in the middle left when that occurs.
When it reaches red, two lag frames are introduced. During room transitions, tens of lag frames are introduced because loading takes several frames. The profiler will spike for a frame then.
When it reaches red, two lag frames are introduced. During room transitions, tens of lag frames are introduced because loading takes several frames. The profiler will spike for a frame then.
When you press L, the bars are shown in a different way.
When you press L, the bars are shown in a different way.
The time bars are moved to the right, and on top of the blue bar a yellow bar is now drawn. It seems like in this view, the red, yellow and orange times are not grouped. It rather shows a timeline of which thread is active.
The time bars are moved to the right, and on top of the blue bar, a yellow bar is now drawn. It seems like in this view, the red, yellow and orange times are not grouped. It rather shows a timeline of which thread is active.


[[File:press l.png|400px|right]]
[[File:press l.png|400px|right]]
Line 461: Line 459:
Every time a floor check returns a null pointer a counter is incremented, and if it is positive it will be drawn with the label NULLBG. In the image, Mario’s four quarter steps are Out of Bounds so the counter is 4.
Every time a floor check returns a null pointer a counter is incremented, and if it is positive it will be drawn with the label NULLBG. In the image, Mario’s four quarter steps are Out of Bounds so the counter is 4.


In some courses, you’ll see NULLBG in the corner whenever an object spawns. That’s because these object aren’t in the right position right from the start: on the first frame they are at (0, 0, 0). So if you’re in a stage where this origin point is not above a floor, NULLBG shows up whenever an object spawns.
In some courses, you’ll see NULLBG in the corner whenever an object spawns. That’s because these objects aren’t in the right position right from the start: on the first frame, they are at (0, 0, 0). So if you’re in a stage where this origin point is not above a floor, NULLBG shows up whenever an object spawns.


Similar to NULLBG, there is a WALL counter. It only pop ups when the wall counter is higher than 0, but that never happens. The counter gets reset to 0 every frame, but nowhere does it get incremented.
Similar to NULLBG, there is a WALL counter. It only pop-ups when the wall counter is higher than 0, but that never happens. The counter gets reset to 0 every frame, but nowhere does it get incremented.


===SL Penguin===
===SL Penguin===
[[File:penguin.png|400px|right]]
[[File:penguin.png|400px|right]]
In Snowman’s Land, the X and Z coordinates of the penguin are shown. (The NULLBG in the image is because the snowman’s windparticles spawn on the origin, which is Out of Bounds in Snowman’s Land)
In Snowman’s Land, the X and Z coordinates of the penguin are shown. (The NULLBG in the image is because the snowman’s wind particles spawn on the origin, which is Out of Bounds in Snowman’s Land)


==Break free of Chuckya==
==Break free of Chuckya==