Skip to content

Script bindings: Debug

Verified against: SLUS_212.15 (NTSC-U, SHA1 e9cb2cc49aa046b9e494313dce2f5038ed17b2f4).

Bindings for developer leftovers: network debugging, sample capture, detail flags: 5 in all. Conventions, the other categories and how to read an entry are on the masterlist.

Binding Returns Scripts Boot Mission 1 Evidence
CapturePVSSamplePoint - 0 no no speculative
clearDetailFlag - 8 no no confirmed (code)
DoorCRCCheck - 62 no yes confirmed (code)
SetBugstarIP - 0 no no inferred
setDetailFlag - 18 no no confirmed (code)

CapturePVSSamplePoint

CapturePVSSamplePoint()

No arguments.

Returns nothing.

Development tool for building visibility (PVS) data: calls 0x0040cc68. No shipped script calls it.

  • Evidence: speculative; detail: brief
  • Wrapper 0x0036c868 (registered by RegisterBindings); calls 0x0040cc68
  • Used by no script on the disc
  • Coney: not implemented

clearDetailFlag

clearDetailFlag(index, mask)
# Argument Read as Meaning
1 index number, truncated to an integer Which flag byte, 0-3; not range-checked.
2 mask number, truncated to an unsigned integer Bits to clear (only the low byte is used).

Returns nothing.

Clears the mask bits in one of the four detail-flag bytes at W_GameState + 0x3e8 (0x0041cf58), the reverse of setDetailFlag. Like it, it has no visible effect: nothing reads the bytes.

  • Evidence: confirmed (code) at 0x0041d860; detail: traced
  • Wrapper 0x0036c698 (registered by RegisterBindings); calls 0x0041d860 GameState_ClearDetailFlag
  • Used by 8 of 467 script chunks (14 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 6 of 28 levels, first level80 (mission 2)
  • Coney: implemented

DoorCRCCheck

DoorCRCCheck(a, b, c, d)
# Argument Read as Meaning
1 a number, truncated to an integer Byte 1 of a checksum, ignored.
2 b number, truncated to an integer Byte 2, ignored.
3 c number, truncated to an integer Byte 3, ignored.
4 d number, truncated to an integer Byte 4, ignored.

Returns nothing.

Does nothing in this build: its callee 0x00397330 returns at once. Every level script calls it once with four bytes, presumably a checksum of the level's door data in development builds.

  • Evidence: confirmed (code) at 0x00397330; detail: traced
  • Wrapper 0x00379978 (registered by RegisterBindings); calls 0x00397330
  • Used by 62 of 467 script chunks (62 references); boot to menu: no; mission 1: yes; result used: no
  • Later in the story: 28 of 28 levels, first level80 (mission 2)
  • Coney: implemented

SetBugstarIP

SetBugstarIP(address)
# Argument Read as Meaning
1 address string An IP address string.

Returns nothing.

Development tool: sets the address of Rockstar's bug-reporting server (0x00418bf0). No shipped script calls it.

  • Evidence: inferred; detail: brief
  • Wrapper 0x0036b4c0 (registered by RegisterBindings); calls 0x0041d5e8
  • Used by no script on the disc
  • Coney: not implemented

setDetailFlag

setDetailFlag(index, mask)
# Argument Read as Meaning
1 index number, truncated to an integer Which flag byte, 0-3 (W_GameState + 0x3e8 + index); not range-checked.
2 mask number, truncated to an unsigned integer Bits to set (only the low byte is used).

Returns nothing.

ORs mask into one of four game-state bytes at W_GameState + 0x3e8 (0x0041cf40). The bytes are cleared to 0 when a level starts or resets (0x00418588, 0x00418c68), but no code in the executable reads them, so the call has no visible effect in the shipped game.

Notes. No load of W_GameState + 0x3e8-0x3eb was found (every 0x3e8-0x3eb offset access in the program belongs to another object); the scripts' use (indices 0-3) suggests a leftover development switch.

  • Evidence: confirmed (code) at 0x0041d830; detail: traced
  • Wrapper 0x0036c620 (registered by RegisterBindings); calls 0x0041d830 GameState_SetDetailFlag
  • Used by 18 of 467 script chunks (26 references); boot to menu: no; mission 1: no; result used: no
  • Later in the story: 13 of 28 levels, first level80 (mission 2)
  • Coney: implemented