mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	Fix 16bit comparison operations
This commit is contained in:
		
							parent
							
								
									d3b1b5f22c
								
							
						
					
					
						commit
						2f3142e192
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -280,25 +280,25 @@ void GatewayCheat::Execute(Core::System& system) { | ||||||
|         case CheatType::GreaterThan16WithMask: |         case CheatType::GreaterThan16WithMask: | ||||||
|             // 7XXXXXXX ZZZZYYYY - Execute next block IF YYYY > ((not ZZZZ) AND half[XXXXXXX])
 |             // 7XXXXXXX ZZZZYYYY - Execute next block IF YYYY > ((not ZZZZ) AND half[XXXXXXX])
 | ||||||
|             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { |             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { | ||||||
|                 return static_cast<u16>(line.value) > ~(static_cast<u16>(~line.value >> 16) & val); |                 return static_cast<u16>(line.value) > (static_cast<u16>(~line.value >> 16) & val); | ||||||
|             }); |             }); | ||||||
|             break; |             break; | ||||||
|         case CheatType::LessThan16WithMask: |         case CheatType::LessThan16WithMask: | ||||||
|             // 8XXXXXXX ZZZZYYYY - Execute next block IF YYYY < ((not ZZZZ) AND half[XXXXXXX])
 |             // 8XXXXXXX ZZZZYYYY - Execute next block IF YYYY < ((not ZZZZ) AND half[XXXXXXX])
 | ||||||
|             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { |             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { | ||||||
|                 return static_cast<u16>(line.value) < ~(static_cast<u16>(~line.value >> 16) & val); |                 return static_cast<u16>(line.value) < (static_cast<u16>(~line.value >> 16) & val); | ||||||
|             }); |             }); | ||||||
|             break; |             break; | ||||||
|         case CheatType::EqualTo16WithMask: |         case CheatType::EqualTo16WithMask: | ||||||
|             // 9XXXXXXX ZZZZYYYY - Execute next block IF YYYY = ((not ZZZZ) AND half[XXXXXXX])
 |             // 9XXXXXXX ZZZZYYYY - Execute next block IF YYYY = ((not ZZZZ) AND half[XXXXXXX])
 | ||||||
|             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { |             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { | ||||||
|                 return static_cast<u16>(line.value) == ~(static_cast<u16>(~line.value >> 16) & val); |                 return static_cast<u16>(line.value) == (static_cast<u16>(~line.value >> 16) & val); | ||||||
|             }); |             }); | ||||||
|             break; |             break; | ||||||
|         case CheatType::NotEqualTo16WithMask: |         case CheatType::NotEqualTo16WithMask: | ||||||
|             // AXXXXXXX ZZZZYYYY - Execute next block IF YYYY <> ((not ZZZZ) AND half[XXXXXXX])
 |             // AXXXXXXX ZZZZYYYY - Execute next block IF YYYY <> ((not ZZZZ) AND half[XXXXXXX])
 | ||||||
|             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { |             CompOp<u16>(line, state, &Memory::Read16, [&line](u16 val) -> bool { | ||||||
|                 return static_cast<u16>(line.value) != ~(static_cast<u16>(~line.value >> 16) & val); |                 return static_cast<u16>(line.value) != (static_cast<u16>(~line.value >> 16) & val); | ||||||
|             }); |             }); | ||||||
|             break; |             break; | ||||||
|         case CheatType::LoadOffset: |         case CheatType::LoadOffset: | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue