xqemu icon indicating copy to clipboard operation
xqemu copied to clipboard

Halo 2 Retail NTSC v1.0 Crashes

Open Ernegien opened this issue 7 years ago • 0 comments

XBE MD5: C1F34EB1BA66A9C8DD77BAF9C088047C Revision: xbox, 5cf813119e9cdb8a3e5485de1bfae458dbb41122

Below is a non-comprehensive list of things currently preventing in-game compatibility status. The workarounds mentioned below should be used to avoid crashes for further run-time investigation and are not intended to be proper/verified solutions.

Audio

XHVNamespace::CXHVEngine::EnableProcessingMode(void *) - sub_33275E
XHVNamespace::CXHVEngine::DoWork(void) - sub_332E98

The workaround is to patch guest address 0x55810 with B00103 and address 0x53580 with C3 to prevent them from being called. There may be other downstream CXHVEngine related issues in sub_55810 which the patches above skip.

Shaders

  • Issue #86
  • nv2a_psh.c
    sum = qstring_from_fmt("((r0.a >= 0.5) ? %s(%s) : %s(%s))",
              caster, qstring_get_str(cd), caster, qstring_get_str(ab));
    

Lack of texture modes

  • PS_TEXTUREMODES_DOT_ST
  • PS_TEXTUREMODES_DOT_RFLCT_DIFF
  • PS_TEXTUREMODES_DOT_RFLCT_SPEC

As a workaround, map these unimplemented texture modes to PS_TEXTUREMODES_PASSTHRU or possibly PS_TEXTUREMODES_NONE in nv2a_psh.c

Graphics Class Method

NV097_SET_VERTEX_DATA2S

As a workaround, remove the asserts in nv2a.c. See #91

Load Map Menu Bypass

Halo games have the concept of "map" files which are composed of tags (structs) of various types used to construct the environment. The main menu is actually a map. Unfortunately, the menu item text is missing and navigation is difficult due to xqemu slowness. By filling out the "map_info" struct identified below in guest memory, and then setting the "load_new_map" integer to 1, you can bypass the need to use the menu for map selection.

So, once at the menu, you can forcefully load maps by poking the following data in guest memory.

// located at 0x4ED3A8
map_info
{
    uint32_t mapType; // 1 for singleplayer, 2 for multiplayer, 3 for mainmenu
    uint32_t unknown; // 0x1E0101
    uint8_t[20] zero;
    uint8_t[256?] internalMapName; // null-terminated ascii format, see list below
}

// valid internal map names (assuming the files exist)
scenarios\solo\01a_tutorial\01a_tutorial // Armory
scenarios\multi\halo\ascension\ascension
scenarios\multi\halo\backwash\backwash
scenarios\multi\halo\beavercreek\beavercreek
scenarios\multi\halo\burial_mounds\burial_mounds
scenarios\solo\01b_spacestation\01b_spacestation // Cairo Station
scenarios\multi\halo\coagulation\coagulation
scenarios\multi\halo\colossus\colossus
scenarios\multi\halo\containment\containment
scenarios\solo\05a_deltaapproach\05a_deltaapproach // Delta Halo
scenarios\multi\halo\derelict\derelict // Desolation
scenarios\multi\halo\elongation\elongation
scenarios\multi\foundation\foundation
scenarios\multi\gemini\gemini
scenarios\solo\07a_highcharity\07a_highcharity // Gravemind
scenarios\multi\headlong\headlong
scenarios\solo\08a_deltacliffs\08a_deltacliffs // High Charity
scenarios\multi\highplains\highplains // Tombstone
scenarios\multi\cyclotron\cyclotron // Ivory Tower
scenarios\multi\lockout\lockout
scenarios\ui\mainmenu\mainmenu
scenarios\solo\03b_newmombasa\03b_newmombasa // Metropolis
scenarios\multi\midship\midship
scenarios\solo\04b_floodlab\04b_floodlab // Oracle
scenarios\solo\03a_oldmombasa\03a_oldmombasa // Outskirts
scenarios\solo\06b_floodzone\06b_floodzone // Quarantine Zone
scenarios\solo\05b_deltatowers\05b_deltatowers // Regret
scenarios\multi\dune\dune // Relic
scenarios\solo\06a_sentinelwalls\06a_sentinelwalls // Sacred Icon
scenarios\multi\deltatap\deltatap // Sanctuary
scenarios\shared\single_player_shared
scenarios\solo\04a_gasgiant\04a_gasgiant // The Arbiter
scenarios\solo\08b_deltacontrol\08b_deltacontrol // The Great Journey
scenarios\solo\00a_introduction\00a_introduction // The Heretic
scenarios\multi\triplicate\triplicate // Terminal
scenarios\multi\turf\turf
scenarios\solo\07b_forerunnership\07b_forerunnership // Uprising
scenarios\multi\warlock\warlock
scenarios\multi\waterworks\waterworks
scenarios\multi\zanzibar\zanzibar
// located at 0x4ED39D
uint32 load_new_map; // 0 for no, 1 for yes

(JayFoxRox: Reformated and moved workarounds to appropriate isues)

Ernegien avatar May 18 '17 04:05 Ernegien