MCPcopy Create free account
hub / github.com/TASEmulators/fceux / EncodeGG

Function EncodeGG

src/drivers/Qt/GameGenie.cpp:407–434  ·  view source on GitHub ↗

---------------------------------------------------------------------------- The code in this function is a modified version of Chris Covell's work - I'd just like to point that out

Source from the content-addressed store, hash-verified

405//The code in this function is a modified version
406//of Chris Covell's work - I'd just like to point that out
407void EncodeGG(char *str, int a, int v, int c)
408{
409 uint8 num[8];
410 int i;
411
412 a&=0x7fff;
413
414 num[0]=(v&7)+((v>>4)&8);
415 num[1]=((v>>4)&7)+((a>>4)&8);
416 num[2]=((a>>4)&7);
417 num[3]=(a>>12)+(a&8);
418 num[4]=(a&7)+((a>>8)&8);
419 num[5]=((a>>8)&7);
420
421 if (c == -1){
422 num[5]+=v&8;
423 for(i = 0;i < 6;i++)str[i] = GameGenieLetters[num[i]];
424 str[6] = 0;
425 } else {
426 num[2]+=8;
427 num[5]+=c&8;
428 num[6]=(c&7)+((c>>4)&8);
429 num[7]=((c>>4)&7)+(v&8);
430 for(i = 0;i < 8;i++)str[i] = GameGenieLetters[num[i]];
431 str[8] = 0;
432 }
433 return;
434}
435//----------------------------------------------------------------------------
436void GameGenieDialog_t::ListGGAddresses(void)
437{

Callers 3

addrChangedMethod · 0.70
cmpChangedMethod · 0.70
valChangedMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected