TEXT 48
Xbox-patch.txt Guest on 15th August 2020 10:40:54 PM
  1. //8B 0D F8 DA 37 00
  2. //A1 F4 DA 37 00
  3. 8A 15 E4 C6 37 00
  4. 84 D2
  5. 6A 00  
  6. 6A 00
  7. 6A 30
  8. 6A 06
  9. 6A 00
  10. 6A 16
  11. //51
  12. 68 00 05 00  00
  13. //50
  14. 68 D0 02 00  00
  15.  
  16. 90 90 90 90 90
  17.  
  18.  
  19. 8b 46 28     mov eax, [esi+28]
  20. 51           push ecx
  21. 8b 4e 2c     mov ecx, [esi+2c]
  22. 52           push edx
  23. 8b 56 04     mov edx, [esi+4]
  24. 50           push eax
  25.  
  26. 51
  27. 8b 4e 2c
  28. 52
  29. 8b 56 04
  30. 90
  31. 6a 40
  32. 90
  33.  
  34.  
  35.  
  36. The 6th 'x' in CreateDevice(x,x,x,x,x,x,x) is the struct _D3DPRESENT_PARAMETERS_.
  37. This describes the presentation parameters. It just so happens that this struct holds a Dword 'Flags'.
  38. Flags is what all previous patches have been looking for i.e. patching a 20 (interlaced) /
  39. 120 (interlaced 10x11 aspect to 00 (autoslect) / 40 (progressive). Flags can be set to 0,
  40. or to one or more flags ORed together. Within the CreateDevice call the struct is broken down,
  41. 'Flags' being the 11th value is stored at +28h.
  42.  
  43. Below you can see that the original XBE movs edi+28h to edx (mov edx, [edi+28h]), this
  44. however isn't pushed to SetVideoMode this the end (push edx), this means the the 1st arg of the
  45. setVideoMode must be the value for 'Flags'. If i could push a value of 0 and cause it to ignor the
  46. original value of edi+28h then it would cause the display to autoselect 480i/p!
  47.  
  48. To do this however would mean to 'nop' out 8B 57 28 with 90 90 90 and as you can see push edx (52)
  49. is only one hex a push 0 (6A 00) requires 2. Now its not possible to push 0 at the location of 90 90 90
  50. since the push(s) need to be in order. So to make this patch work the code was rearanged as shown below.
  51.  
  52.  
  53. CODE
  54.  
  55.  
  56. [b]Original XBE [/b]
  57.  
  58. 8B 57 28           mov     edx, [edi+28h]
  59. 50            push    eax
  60. 8B 47 30           mov     eax, [edi+30h]
  61. 50                 push    eax
  62. 8B 47 2C           mov     eax, [edi+2Ch]
  63. 51     push    ecx
  64. 8B 4F 04           mov     ecx, [edi+4]
  65. 52                 push    edx
  66.  
  67. call    [email protected]@[email protected]@[email protected]@[email protected]; D3D::CMiniport::SetVideoMode(ulong,ulong,ulong,ulong,_D3DFORMAT,ulong,ulong)
  68.  
  69. 8B 57 28 50 8B 47 30-50 8B 47 2C 51 8B 4F 04 52
  70.  
  71.  
  72. [b]Patched XBE[/b]
  73.  
  74. 50            push    eax
  75. 8B 47 30           mov     eax, [edi+30h]
  76. 50                 push    eax
  77. 8B 47 2C           mov     eax, [edi+2Ch]
  78. 51     push    ecx
  79. 8B 4F 04           mov     ecx, [edi+4]
  80. 90     nop
  81. 6A 00             push    0
  82. 90     nop
  83.                
  84. call    [email protected]@[email protected]@[email protected]@[email protected]; D3D::CMiniport::SetVideoMode(ulong,ulong,ulong,ulong,_D3DFORMAT,ulong,ulong)
  85.  
  86. 50 8B 47 30 50 8B 47 2C 51 8B 4F 04 90 6A 00
  87.  
  88.  
  89.  
  90.  
  91.  
  92. The patch biggrin.gif
  93.  
  94. Replace
  95.  
  96. 8B 57 28 50 8B 47 30-50 8B 47 2C 51 8B 4F 04 52
  97.  
  98. with:
  99.  
  100. 50 8B 47 30 50 8B 47 2C 51 8B 4F 04 90 6A 00 90
  101.  
  102.  
  103.  
  104. I-Ninja @ 720p (WIP)
  105.  
  106. I mentioned eons ago that i had managed to get I-Ninja to run 720p. Graphical errors are noticable but if you want to see what it looks like...
  107.  
  108. this should do the trick..
  109.  
  110. replace
  111. CODE
  112.  
  113. C7 02 80 02 00 00 C7 42 04 E0 01 00 00
  114.  
  115.  
  116. with
  117. CODE
  118.  
  119. C7 02 00 05 00 00 C7 42 04 D0 02 00 00
  120.  
  121.  
  122. and
  123.  
  124. replace
  125. CODE
  126.  
  127. 81 C9 00 00 00 00 or 81 C9 00 20 00 00*
  128.  
  129.  
  130. with
  131. CODE
  132.  
  133. 81 C9 00 40 00 00

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.