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

solver: tool that can take in solver generated algorithm #15

Open
JohnDMcMaster opened this issue Oct 6, 2020 · 1 comment
Open

solver: tool that can take in solver generated algorithm #15

JohnDMcMaster opened this issue Oct 6, 2020 · 1 comment

Comments

@JohnDMcMaster
Copy link
Owner

Need some way to generically save solver results. ie you can get a single output right now, but you can't save that algorithm for a new chip

@travisgoodspeed
Copy link

travisgoodspeed commented Nov 3, 2022

It looks like most of the code for this is already in solver.py. The trick is to provide a poor hint of a single bit, and to revise that bit if it's wrong.

So if my ROM solves like this:

air% solver.py --bytes 0x00:0x78,0x20:0x18 bits.txt --bin-out bits
Loaded 50x x 64 h => 3200 bits (400 words)
19 match True, score 1.000
  r-270_flipx-0_invert-1_cols-left
Tries: 24
Best score: 1.000, r-270_flipx-0_invert-1_cols-left
Keep matches: 1
  Writing bits
air% md5sum bits
feb69eb119ab8109b6f9865a11990b1c  bits
air% 

I can reproduce the decoding like this. If it were to fail, I'd just flip the lowest bit of the second --bytes parameter to get a working decoding. (Setting the mask byte to zero causes a division by zero error.)

air% solver.py --rotate 270 --no-flipx --layout-alg cols-left --invert --bytes "0x00:0x00:0x01" bits.txt --bin-out bits
air% md5sum bits
feb69eb119ab8109b6f9865a11990b1c  bits
air% 

So properly resolving this issue might be so easy as resolving the bodge of guessing one single bit?

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

2 participants