Skip to content
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

Binary Coded Decimal Values Do Not Get Decoded #34

Closed
MaxStrange opened this issue Apr 25, 2018 · 1 comment
Closed

Binary Coded Decimal Values Do Not Get Decoded #34

MaxStrange opened this issue Apr 25, 2018 · 1 comment

Comments

@MaxStrange
Copy link

Issue summary

When adding a new game that uses binary coded decimal (four bytes) to store its score, I
added this to the appropriate data.json:

{                                  
  "info": { 
    "lives": {
        "address": 16722333,
        "type": "|u1"
    }, 
    "score": {                     
        "address": 16722328,       
        "type": ">b4"              
    },                             
    "wave": {                      
        "address": 16722414,       
        "type": "|u1"              
    }                              
  }                                
}                                  

But when I do an env.step(action), I end up with:

{'lives': 3, 'score': 5456, 'wave': 1}   # The info dict returned from step()
  • Lives should be 3 (and is);
  • Wave should be 1 (and is);
  • Score should be 1550, but is instead the raw BCD value 5456 (i.e. 0x00001550 converted to decimal as if it were not BCD).

System information

  • Windows 10
  • Python Version: 3.6
  • Retro version: 0.5.4
  • Genesis
@MaxStrange
Copy link
Author

MaxStrange commented Apr 25, 2018

My mistake. Should be "type": ">d4" - I had the wrong letter. With the right letter it works as expected. Derp.

squishyhuman pushed a commit to RetroAI/retro3 that referenced this issue Mar 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant