├── .gitignore ├── LICENSE ├── README.md ├── _images ├── anamorphic_scaling.png ├── coag_1080p.png ├── debug_mode.png └── hd_resolutions.png ├── hd_config.ini └── src ├── Config.asm ├── Debug.asm ├── DirectX.asm ├── DirectX_h.asm ├── Utilities.asm ├── Utilities_h.asm ├── XboxKrnl_h.asm └── halo2_hd_patches.asm /.gitignore: -------------------------------------------------------------------------------- 1 | *.bin -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2025 Ryan Miceli 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Halo 2 HD 2 | Halo 2 HD is a mod for the original Xbox version of Halo 2 to add support for HD resolutions as well as some quality of life updates. This mod will let you play the game in 480p (proper), 720p, and 1080i (1080p internally). 3 | 4 | ![](/_images/coag_1080p.png) 5 | 6 | ## Features 7 | This mod adds the following features to the game: 8 | - Support for 480p (proper), 720p, and 1080i (1080p) resolutions. 9 | - Triple buffering support to increase FPS performance. 10 | - Utilizes extra RAM if you have 128MB RAM upgrade. 11 | - GPU overclocking for performance improvements. 12 | - Increased HDD transfer speed for faster load times. 13 | - Customizable field of view. 14 | - Customizable split screen divider (horizontal or vertical). 15 | 16 | All of these features are customizable through an ini config file and are explained in detail in the wiki: [Configuration File](https://github.com/grimdoomer/Halo-2-HD/wiki/Configuration-File). 17 | 18 | #### HD Resolutions 19 | Halo 2 claims it supports 480p on the box but this isn't entirely accurate. It DOES support 480p output but it does NOT render in 480p natively. Regardless of what video settings are set on the console the stock game will always 20 | render in 640x480. When 480p output is enabled the console will upscale the final 640x480 image to 480p for display on TV. If you enable widescreen mode the game will also apply anamorphic scaling to the image which causes it to 21 | appear "compressed" width wise. 22 | 23 | This patch addresses those issues by rendering in proper 480p resolution and disabling the anamorphic scaling that would normally get applied. It also allows you to play the game in 720p and 1080i. When 1080i mode is enabled 24 | the game is actually rendering at 1080p internally before being encoded into interlaced video signal. The 1080i mode is not considered "playable" as it puts an extreme load on the console GPU (even with overclocking), and typically 25 | plays at single digit FPS at best. I added support for it mostly because I wanted to see if I could get it to work and also so I could take some sweet screenshots before the frame buffer gets converted into interlaced video. 26 | 27 | ![](/_images/hd_resolutions.png) 28 | 29 | #### RAM Upgrades 30 | If your console has 128MB of RAM this patch will utilize the extra RAM available which will enable use of 720p and 1080i video modes as well as increase the size of in-memory caches for textures and geometry. The size increase for the 31 | texture and geometry caches will significantly reduce pop-in issues to the point of being almost non-existent. 32 | 33 | #### GPU Overclocking 34 | In order to maximize performance of the game when running in higher resolutions I've added support to overclock the GPU on startup. This is customizable and can be fine tuned to better suit each console's unique GPU qualities. This is 35 | highly recommended for 720p mode as it can increase FPS by as much as 10 FPS. However, overclocking the GPU comes with risks and precautions should be taken to ensure you don't cause your GPU to overheat and burn out. The risks are 36 | outlined in the wiki and should be thoroughly read and understood before attempting to enable and configure GPU overclocking. 37 | 38 | #### HDD Transfer Speeds 39 | This patch can increase the speed at which the HDD transfers data to the console which will improve loading times and help reduce pop-in. This value is customizable via the config file and is explained in detail [here](https://github.com/grimdoomer/Halo-2-HD/wiki/Configuration-File#hddspeed). In order to 40 | use transfer speeds faster than UDMA 3 you will need an 80-pin IDE cable. Trying to use UDAM 4 or 5 with the stock 40-pin cable will result in read errors and the game crashing on startup. 41 | 42 | #### Quality of Life Improvements 43 | A few quality of life improvements have been added such as customizable field of view and options to control whether split screen divides the screen horizontally or vertically. 44 | 45 | ## Compatibility 46 | Due to how this patch works it is not compatible with the Xbox 360 back-compat emulator, nor will it ever be. It would require complex changes to the emulator itself and I have no plans on ever investigating it further. This patch has also not been tested on 47 | XQEMU or any other Xbox emulator for PC. It has only been tested on real hardware and I have no plans for providing additional support for any other means of running original Xbox games. 48 | 49 | ## Hardware Requirements 50 | This patch can be used on any soft or hard modded Xbox console with no additional hardware modifications. However, if you don't have the 128MB RAM mod you will only be able to play the game in 480p mode. There is NOT enough RAM to play the game 51 | in 720p or 1080i without the RAM upgrade. Additionally you will need an 80-pin IDE cable if you want to use HDD transfer speeds faster than UDMA 3. You do not need a CPU upgraded console to use this patch and having one does not provide any additional 52 | performance gains that I've been able to measure during testing. 53 | 54 | ## Known Issues/Limitations 55 | This patch currently only works with the base version of the game (1.0) and does not work with the 1.5 update. I plan to port the patch to the 1.5 update at some point in the future. In addition to that there are a couple limitations/known issues such as: 56 | - Campaign checkpoints may not work between this patch and other versions of the game. When loading a campaign save game you may have to start the most recent level from the beginning instead of from the last checkpoint reached. 57 | - You will not be able to take screenshots using Xbox Neighborhood or other tools based on Xbdm when running with 128MB of RAM. You will need to use a tool I wrote that can handle taking screenshots when using 128MB of RAM: [XboxImageGrabber](https://github.com/grimdoomer/XboxImageGrabber) 58 | - HUD elements will get smaller when using higher resolutions. Scaling the HUD elements is non-trivial and will most likely not be fixed. 59 | - Bink videos (intro, attraction, credits) still play in 640x480 resolution. I may look into fixing this in a future update but will most likely result in the videos being stretched. 60 | - Campaign loading screen, player sign-in screen, and pre-game lobbies still render in 640x480, adjusting this is non-trivial and most likely won't be fixed. 61 | 62 | ## Installation & Compiling 63 | You can find a precompiled version of the patch in the Releases section, you'll need [XDelta](https://www.romhacking.net/utilities/598/) to apply the patch to the clean v1.0 xbe file (SHA1: 78BCC597D9A30AE91DF6FC5EB44FDC62A28EE7F2). 64 | 65 | Once the patch is applied you will 66 | need to copy the patched xbe file and the hd_config.ini file into your Halo 2 game folder on your Xbox console. You'll also want to edit the config file and adjust any settings you'd like to change. Additional information for what the settings are and how to change them can 67 | be found in the wiki: [Configuration File](https://github.com/grimdoomer/Halo-2-HD/wiki/Configuration-File). 68 | 69 | Compiling the patch from scratch requires a few different tools. The process is explained in detail in the wiki: [Compiling](https://github.com/grimdoomer/Halo-2-HD/wiki/Compiling). 70 | 71 | ## FAQ 72 | **Q**: Do I need a CPU upgraded console in order to use this patch? \ 73 | **A**: No, having a CPU upgrade is not required nor does it provide any benefits over a non-CPU upgraded console. 74 | 75 | **Q**: Does this work with Insignia? \ 76 | **A**: Currently no, the patch only works with the 1.0 version of the game and Insignia requires the 1.5 version to connect. I plan to update the patch in the future to support the 1.5 version of the game. 77 | 78 | **Q**: Will this work with such-n-such BIOS? \ 79 | **A**: The patch does not require any specific BIOS to be used and all features should work on all BIOS images. If you have 128MB of RAM you will need a BIOS image that supports the RAM upgrade or the patch will not be able to make use of the additional RAM. 80 | 81 | **Q**: Does this work on the Xbox 360 back-compat emulator? \ 82 | **A**: Due to how this patch works it does not work on the Xbox 360 back-compat emulator, nor will it ever. I have no plans to make it compatible with the emulator. 83 | 84 | **Q**: Does this work on XQEMU/other Xbox emulators for PC? \ 85 | **A**: This patch is most likely not compatible with Xbox emulators on PC and I have no plans for providing support for them. 86 | 87 | **Q**: I'm no longer able to take screenshots with Xbox Neighborhood and it just gives me a white image? \ 88 | **A**: Due to how the patch utilizes the extra RAM for video memory you will no longer be able to use Xbox Neighborhood or other apps that utilize Xbdm to take screenshots. You'll need to use a separate tool I wrote for this: [XboxImageGrabber](https://github.com/grimdoomer/XboxImageGrabber). 89 | -------------------------------------------------------------------------------- /_images/anamorphic_scaling.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grimdoomer/Halo-2-HD/650be3f9864a756b9419c14d1362089534ab9485/_images/anamorphic_scaling.png -------------------------------------------------------------------------------- /_images/coag_1080p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grimdoomer/Halo-2-HD/650be3f9864a756b9419c14d1362089534ab9485/_images/coag_1080p.png -------------------------------------------------------------------------------- /_images/debug_mode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grimdoomer/Halo-2-HD/650be3f9864a756b9419c14d1362089534ab9485/_images/debug_mode.png -------------------------------------------------------------------------------- /_images/hd_resolutions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/grimdoomer/Halo-2-HD/650be3f9864a756b9419c14d1362089534ab9485/_images/hd_resolutions.png -------------------------------------------------------------------------------- /hd_config.ini: -------------------------------------------------------------------------------- 1 | ; 2 | 3 | ; Set to true to enable 1080i support or false to disable. Setting this to false will 4 | ; let you keep 1080i enabled on the console but ignore it in-game (defaults to next highest 5 | ; resolution enabled). 6 | Enable1080iSupport = false 7 | 8 | ; Set to true to enable 720p support or false to disable. Setting this to false will 9 | ; let you keep 720p enabled on the console but ignore it in-game (defaults to next highest 10 | ; resolution enabled). 11 | Enable720pSupport = true 12 | 13 | ; Set to true to disable anamorphic scaling or false to leave it enabled. Without this patch the 14 | ; game would always use anamorphic scaling when in wide screen mode. The patch disables it by 15 | ; default. If you're not sure what this is just leave it set to true. 16 | DisableAnamorphicScaling = true 17 | 18 | ; Set to true to disable atmospheric fog or false to leave it enabled. Disabling atmospheric fog 19 | ; can provide a slight FPS increase but will cause things like water to have a loss of quality. 20 | DisableAtmosphericFog = false 21 | 22 | ; Field of view adjustment, the normal field of view for Halo 2 is 70 degrees. 23 | ; Supports whole numbers or decimals ex: 70 and 70.125 are both valid. 24 | FieldOfView = 70 25 | 26 | ; Determines how the screen will be split when playing with 2 players, only used when widescreen is enabled: 27 | ; 1 = horizontal split 28 | ; 2 = vertical split (default) 29 | SplitScreenFavor = 1 30 | 31 | ; Set to true to disable the HUD. 32 | DisableHud = false 33 | 34 | ; Set to true to enable on screen performance counters including: FPS counter, GPU clock speed. 35 | DebugMode = false 36 | 37 | ; Set to true to change HDD transfer speed, false to leave at default speed set by BIOS. Increasing the HDD transfer speed 38 | ; can help read in data faster which decreases loading times and reduces pop-in. 39 | SetHddSpeed = false 40 | 41 | ; UDMA transfer speed to set on the HDD, only used when SetHddSpeed is set to true. Possible values are 2 - 5, when using 42 | ; UDMA 4 or 5 you MUST have an 80-pin IDE cable or errors will occur when trying to read/write from the HDD. UDMA 43 | ; 3 is the fastest you can go when using the stock IDE cable or any other 40-pin IDE cable. If you set HddSpeed to 44 | ; a value that the HDD doesn't support the highest value the HDD supports will be used instead. 45 | HddSpeed = 3 46 | 47 | ; WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 48 | ; 49 | ; Overclocking your GPU can result in system instability or permanent damage if you do not 50 | ; understand the risks. Please read the following information carefully in order to prevent 51 | ; permanent damage to your console. The following options have been set with default values 52 | ; that are deemed reasonable for most xbox consoles. You should be able to change OverclockGPU to 53 | ; true and leave the other values alone and get decent results on any console. Only change these values if 54 | ; you read and understand all the information provided. If you do not understand something 55 | ; then you should not change these settings from their default values. 56 | ; 57 | ; There's really no reason to overclock the GPU if you're only running the game at 480p. If you have 58 | ; a RAM upgrade and want to run the game at 720p I recommend overclocking the GPU using the default 59 | ; settings at the very least. For the best experience you'll want to fine tune the overclocking settings, 60 | ; but please read and make sure you understand all of the risks associated with it before proceeding. 61 | ; 62 | ; When overclocking the GPU it will produce significantly more heat and failure to keep it 63 | ; cool can result in the GPU cooking itself to death. If this happens the GPU will suffer 64 | ; permanent damage and your xbox motherboard will be toast. Please take the following precautions 65 | ; when enabling overclocking: 66 | ; 67 | ; 1. Ensure the thermal paste on the GPU (and preferably CPU as well) has been replaced 68 | ; with new thermal paste. The console is over 20 years old, that factory thermal paste 69 | ; has turned to dust a long time ago. 70 | ; 71 | ; 2. If possible attach a small fan to the GPU heatsink, look at the 1.0 revision xbox 72 | ; motherboards to see what this looks like. You can also just use the heatsink/fan from a 73 | ; 1.0 console as well. 74 | ; 75 | ; 3. If possible attach a temperature probe to the GPU heatsink and monitor the temperature 76 | ; while adjusting overclocking settings to ensure your cooling is adequate. 77 | ; 78 | ; Please keep in mind that THE ORIGINAL XBOX DOES NOT HAVE A BUILT IN TEMPERATURE PROBE IN/ON THE GPU!!!!! 79 | ; This means that the GPU temperature shown by ALL HOMEBREW APPLICATIONS IS INCORRECT!!!!! 80 | ; 81 | ; The only way to get accurate GPU temperature is to attach a temperature probe yourself. 82 | ; 83 | ; 84 | ; All values for setting the GPU clock and fan speed overrides have been set to reasonable defaults. 85 | ; Before making additional changes read the documentation for those values to understand how they work. 86 | ; 87 | ; By enabling GPU overclocking you acknowledge that you have read and understood the risks outlined above. 88 | ; You also acknowledge that: 89 | ; 90 | ; 1. I am not responsible for any damage that may happen to your console as a result of overclocking 91 | ; the GPU. You are proceeding at your own risk. 92 | ; 93 | ; 2. Every GPU is unique in how much you can overclock it, some may overclock very high, others may hardly overclock 94 | ; at all. The default values below are set such that *most* GPUs should run fine at these speeds. 95 | ; 96 | ; If the default values causes your console to crash or result in system instability you can consider your 97 | ; GPU to be on the weaker end and I would recommend trying this patch on another box that hopefully 98 | ; has a better GPU. 99 | ; 100 | ; If you want a technical explanation of this "better or worse" phenomenon you can google "GPU binning". 101 | ; 102 | ; 3. Running the game at 1080i (1080p internally) is going to run like shit no matter how high your GPU 103 | ; can overclock. I only added support for it to see if I could get it to work and to take sweet screenshots. 104 | ; It's not intended to be used for actually playing the game, though you're free to try it and see for yourself. 105 | ; 106 | ; 4. Overclocking will only help so much. There will be times when the GPU isn't maxed and further overclocking 107 | ; doesn't cause the FPS to increase. The GPU simply wasn't meant to handle this much load and even 108 | ; with overclocking it only has so much processing power considering how many pixels it needs to 109 | ; draw when running in 720p+. 110 | ; 111 | ; WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING 112 | 113 | ; Set to true to enable GPU overclocking, false to disable. 114 | OverclockGPU = false 115 | 116 | ; Controls the "step" value for how the GPU clock frequency is calculated. You can use the following 117 | ; equation to calculate the expected clock frequency based on the step value: 118 | ; 119 | ; clock frequency = (step * 16.6667) / 2 120 | ; 121 | ; A stock xbox console will have a step value of 28 to give a clock frequency of 233 Mhz. The recommended 122 | ; value of 32 (266 Mhz) has been chosen as a reasonable default that should work on most consoles. The highest 123 | ; we've seen a GPU clock and be considered stable is upwards of 400Mhz and that is considered a "cream of the crop" GPU. 124 | ; Others have failed to overclock passed 300Mhz and some will not even make it that hight at all. 125 | ; 126 | ; If you increase this value it's recommended you only add +1 and then let the console run for upwards 127 | ; of 20-30 minutes before making additional changes. 128 | ; 129 | ; The best test is one that will put the most stress on the GPU, increasing this value and then idling at 130 | ; the main menu doesn't mean it's stable. 131 | GPUClockStep = 32 132 | 133 | ; If set to true the stock fan speed will be overridden using the fan speed value below. If you try to enable 134 | ; GPU overclocking and disable the fan speed override the fans will be forced to max to protect your xbox 135 | ; from yourself, who clearly didn't read the warnings above. Fan speed override will only take effect if 136 | ; GPU overclocking is enabled. If you don't want GPU overclocking but do want fan speed increased while playing 137 | ; you should change the settings in your dashboard/BIOS instead. 138 | EnableFanSpeedOverride = true 139 | 140 | ; Integer value from 10 to 100 that represents the speed the fans should be set to (in percent). Ex: 75 = 75% speed. 141 | ; The default fan speed the console runs with is 10%. 142 | FanSpeedValue = 75 143 | -------------------------------------------------------------------------------- /src/Config.asm: -------------------------------------------------------------------------------- 1 | 2 | 3 | ;--------------------------------------------------------- 4 | ; Config file definitions: 5 | ;--------------------------------------------------------- 6 | struc ConfigFileValue 7 | .NameCrc: resd 1 8 | .Type: resd 1 9 | .Value: resd 1 10 | endstruc 11 | 12 | ; Config file option types: 13 | %define CFG_TYPE_INT 0 ; Value is a signed integer 14 | %define CFG_TYPE_FLOAT 1 ; Value is a 32-bit float 15 | %define CFG_TYPE_STRING 2 ; Value is a pointer to a null terminated ascii string 16 | %define CFG_TYPE_BOOL 3 ; Value is a 32-bit integer with value 0 or 1, config file value must be either "false" or "true" 17 | 18 | ; CFG_OPTION