-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assorted labels in mobile related code #702
Conversation
Part of an MD5 implementation
mobile/mobile_46.asm
Outdated
@@ -956,7 +956,7 @@ Function11878d: | |||
.asm_118803 | |||
ld a, $d3 | |||
|
|||
Function118805: | |||
Mobile46_SetErrorCode: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just Mobile_
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I used Mobile46 since there'll be equivalent functions in other bank
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright then, though it'd be better if you could name them something else. Are they identical or are they serving for different purposes or deal with different data/codes?
If not this name is ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If its a problem i can just undo that change, the only reason i named it is so at call sites its apparent that branch is handling an error
Having another look i actually cant find an equivalent function, its unique to bank 46 and other banks just have its code inlined, but given that it Is unique to that bank a generic name like "Mobile_" could be misleading
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the value it's setting is wMobileErrorCodeBuffer
, how about SetMobileErrorCode
? It's fine if the function is unique to this bank, there's no implication that it has to be usable in every bank (and if it were, it could always be farcall
ed, not that any hacks are editing the mobile system anyway.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Rangi42 feel free to merge
mobile/mobile_45.asm
Outdated
@@ -5026,27 +5024,27 @@ endr | |||
jp nz, .asm_115c64 | |||
ret | |||
|
|||
Function115cfd: | |||
cp $2b | |||
Function115cfd: ; Base64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this encoding or decoding Base64? Please change the Function115cfd
label to clarify.
@@ -559,18 +557,18 @@ Function114412: | |||
inc bc | |||
inc e | |||
call z, Function1144c8 | |||
cp $d ; CR | |||
cp $d ; "\r" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(I've updated issue #686 to remind us to use "\r"
here when rgbds 0.4.0 supports it.)
mobile/mobile_46.asm
Outdated
pushc | ||
setcharmap ascii | ||
|
||
Function119c3e: ; Base64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Likewise for this function; Base64 encode or decode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just label Function115cfd
, Function119c3e
, and Mobile46_SetErrorCode
and this can be merged.
Not entirely sure Mobile46_SetErrorCode the a good name, but its good enough to show which branches are error handlers