-
Notifications
You must be signed in to change notification settings - Fork 0
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
Silicon8 for Thumby v2.0.0 #3
base: main
Are you sure you want to change the base?
Conversation
This method doesn't work... I'm working on a small grayscale library now, that others may also be able to use for their Thumby games / programs. When that gets somewhat stable, I'll add it here. |
c03be1b
to
4bb9163
Compare
Technically works like a charm now. Issues left:
That last point (and a bit of the first) is why half of this PR is spiralling into doing code optimizations 🙈 Also there's a memory leak somewhere which exacerbates the last issue. I could reset the Thumby on every CHIP-8 program start, just like the main Thumby menu does, that would contain the issue between program starts. But I'm having really random crashes sometimes, that look like we just happen to run out of memory at that point... that's a bit of a more serious problem. Not entirely sure where to take this from here, so I'm sleeping on this for a bit. Maybe try precompiling some of the files to |
Done so far
There's now only just enough memory left to allocate the full 64K 🤯 Issues left
|
…n. Sound pattern can be bytearray.
….mpy files from .py files where possible
… files more reliably
Rebased this on main, which messes up the order of things, but hey :) Things seem to be quite stable now! Just a couple of things left to test and to iron out before this may turn into Silicon8 for Thumby version 2.0! 🎉 |
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.
Some reminders to myself
file.readinto(memory) | ||
return size | ||
except Exception as err: | ||
print('Could not read CH8 file ' + filename + ':', err) |
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.
This message isn't correct, plus we will want to throw this exception and handle it elsewhere
) | ||
class Display: | ||
def __init__(self): | ||
self._colourMap = 0b00011011 |
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.
This makes no sense anymore
if self._colourMap == "BWDL": | ||
return chipDisp.frameBuffers[0], chipDisp.frameBuffers[1] | ||
if self._colourMap == "BDWL": | ||
return chipDisp.frameBuffers[1], chipDisp.frameBuffers[0] |
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.
Maybe double check these?
Needs some love, and testing on actual hardware...