Register | Login | |||||
Main
| Memberlist
| Active users
| ACS
| Commons
| Calendar
| Online users Ranks | FAQ | Color Chart | Photo album | IRC Chat |
| |
1 user currently in Rom Hacking: |
Acmlm's Board - I2 Archive - Rom Hacking - Sanity check - disassembled code | | | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
User | Post | ||
neviksti Goomba Level: 8 Posts: 21/25 EXP: 1510 For next: 677 Since: 06-09-05 Since last post: 36 days Last activity: 30 days |
| ||
While looking in the XBand ROM I have seen lots of strange code as a result of the C compiler they used. Some of the stranger situations require several double takes before I can figure out what happenned. However this time it is strange enough that I'm afraid I'm just having a brain fart and misunderstanding. Can someone confirm for me that yes indeed the code block I marked as "NEVER EXECUTED" will indeed always be skipped here? C4/CE20: A26D01 LDX #$016D If I am not insane, and it always skips it ... what the heck c code would compile to that? The best guess I have is something like if ( 0 > Routine016D(...) ) where Routine016D returns an unsigned int. But then what did the programmer mean for the code to accomplish? Hopefully I am just missing something obvious. |
|||
MathOnNapkins Math n' Hacks Level: 67 Posts: 2059/2189 EXP: 2495887 For next: 96985 Since: 03-18-04 From: Base Tourian Since last post: 1 hour Last activity: 32 min. |
| ||
I believe you are correct, and I had to go back to my own docs to check. CMP does unsigned subtraction: A - operand -> result. If(result < 0) clearcarry( ); This clearly will never happen if I understand this correctly. Could it be that the state of the carry flag before the CMP occurs has some bearing? For example, if you do ADC #$0000, if the carry flag is set it will add one to the result. But I really don't think that is the case for CMP. I will have to consult some other docs. Edit: If you are right... then the compiler they wrote erroneously used BCC when it should have used BMI. (edited by MathOnNapkins on 07-15-05 02:46 AM) |
|||
Omega45889 Panser Level: 30 Posts: 289/335 EXP: 148978 For next: 16891 Since: 03-22-04 From: Vancouver Canada Since last post: 5 days Last activity: 6 hours |
| ||
Im not sure, i only have experience with x86 assembly. I could easily figure it out given notes, but i have great confidence in MoN. Im sure hes right. | |||
HyperLamer <||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people Sesshomaru Tamaranian Level: 118 Posts: 5770/8210 EXP: 18171887 For next: 211027 Since: 03-15-04 From: Canada, w00t! LOL FAD Since last post: 2 hours Last activity: 2 hours |
| ||
The code may not be executed from there, but maybe a jump further back in the routine could jump to it? Or maybe this code has just been 'disabled' for some reason, like Super Mario World's debugging functions (still intact, but never executed). | |||
Violent J Melon Bug Level: 41 Posts: 482/749 EXP: 479154 For next: 991 Since: 05-05-04 From: Since last post: 8 hours Last activity: 8 hours |
| ||
On the topic of XBand, I got from a friend Doom95, and in it was a really odd file...XBand.ID...Anything it has to do with the same XBand we're talking about? | |||
neviksti Goomba Level: 8 Posts: 22/25 EXP: 1510 For next: 677 Since: 06-09-05 Since last post: 36 days Last activity: 30 days |
| ||
I believe there was a PC version of the "XBand" as well. I'm not sure what that file is, and I'm not sure how the PC version fit in with the other versions. (I think by then it was owned by MPlayer or something. So maybe it was completely different?) |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread |
Acmlm's Board - I2 Archive - Rom Hacking - Sanity check - disassembled code | | | |