Last edited by Dmalenke on 15 May 2021 02:09:11 pm; edited 1 time in total
This is a project that I've been working on for a while, but I finally finished the screen mirroring part and decided to release it.
Calc2KeyCe allows you to bind calculator keys to keyboard/mouse keys to control your computer and optionally mirror your main display to your calculator.
Let me know what you all think, I'm open to suggestions and some help improving the speed and stability of the screen mirroring part.
I'm hoping to improve the fps of the screen mirroring, but I can't seem to store more than around 51200 bytes in a buffer on the calculator to perform a multipart usb transfer and decompress.
I can't seem to store more than around 51200 bytes in a buffer on the calculator to perform a multipart usb transfer and decompress.
That's a limitation of how much heap space there is. There are a couple potential ways around it though. We recently determined that a bug in the OS will corrupt a specific portion of the heap if you use certain OS display routines; if you don't use the offending routines, you can get another 10 K of heap space. If you're using 8-bit color mode and aren't using double buffering, then you could use the unused buffer as extra buffer space for decompression. Finally, you could create a variable in RAM and use it for buffer space. By bypassing FileIOC, you can even allocate a buffer bigger than 64 K, assuming that the user has left you more than 64 K of free RAM. This is done by just calling _InsertMem more than once on the same variable, but you have to undo it before the program quits or else you'll leak a ton of memory.
This is such an awesome project! I really want to see this released one day (hopefully soon). If you're looking for beta testers, then please consider me one.
This is such an awesome project! I really want to see this released one day (hopefully soon). If you're looking for beta testers, then please consider me one.
I can't seem to store more than around 51200 bytes in a buffer on the calculator to perform a multipart usb transfer and decompress.
That's a limitation of how much heap space there is. There are a couple potential ways around it though. We recently determined that a bug in the OS will corrupt a specific portion of the heap if you use certain OS display routines; if you don't use the offending routines, you can get another 10 K of heap space. If you're using 8-bit color mode and aren't using double buffering, then you could use the unused buffer as extra buffer space for decompression. Finally, you could create a variable in RAM and use it for buffer space. By bypassing FileIOC, you can even allocate a buffer bigger than 64 K, assuming that the user has left you more than 64 K of free RAM. This is done by just calling _InsertMem more than once on the same variable, but you have to undo it before the program quits or else you'll leak a ton of memory.
I'm currently decompressing directly into lcd_Ram, so I don't think I'm using any display routines??, but switching color modes is a good idea and it could be implemented on the PC side to reduce the amount of data that needs to be transferred on more complicated screens.
For now, I'm just turning off decompression and sending data from usb directly into lcd_Ram if the compressed data is too large.
one word: YESSSSSS!!!!!!! I'm so excited to try this out!
TIny_Hacker only has a mac and is sad
RoccoLox Programs wrote:
This is such an awesome project! I really want to see this released one day (hopefully soon). If you're looking for beta testers, then please consider me one.
I'm definitely planning on working on Mac and Linux ports of this project, so it would be greatly appreciated if people are willing to test it out because I don't have a Mac or a true Linux device.
TheLastMillennial wrote:
RoccoLox Programs wrote:
This is such an awesome project! I really want to see this released one day (hopefully soon). If you're looking for beta testers, then please consider me one.
Here's a link to the .NET 5.0 download if you haven't found it yet.
tr1p1ea wrote:
Wow that's really cool!
Have you thought about only sending parts of the screen that have changed, could speed things up in some circumstances?
I've thought about it, but a diffing algorithm would probably be difficult to implement in a fashion that can be easily transmitted and read into the lcd_Ram. It's a good idea though
Here's a link to the .NET 5.0 download if you haven't found it yet
Yes I've tried installing it, running repair tools, and restarting my computer multiple times. I dunno why my laptop still can't recognize it's there. I really want to try this program so I'll just find a different computer to use.
This is really impressive work As for decompressing only the changing parts, do it using only the y-coordinate, so that way decompression spans the width of the screen.
When the run the program on my calculator, it quickly shows a black screen and then returns to the home screen? (My calculator is plugged into the computer.) Am I doing something wrong?
Last edited by TheLastMillennial on 16 May 2021 04:09:24 pm; edited 1 time in total
RoccoLox Programs wrote:
When the run the program on my calculator, it quickly shows a black screen and then returns to the home screen? (My calculator is plugged into the computer.) Am I doing something wrong?
I get this issue with my revision M CE but not my pre-A. I finally got .NET working, but now I'm having issues using zadig.
EDIT: TLM 1700th post
When the run the program on my calculator, it quickly shows a black screen and then returns to the home screen? (My calculator is plugged into the computer.) Am I doing something wrong?
I get this issue with my revision M CE but not my pre-A. I finally got .NET working, but now I'm having issues using zadig.
Interesting. I'm using a revision O. I guess there might be a difference in how the program handles different hardware revisions. (I'm not an expert though, so... )
When the run the program on my calculator, it quickly shows a black screen and then returns to the home screen? (My calculator is plugged into the computer.) Am I doing something wrong?
I get this issue with my revision M CE but not my pre-A. I finally got .NET working, but now I'm having issues using zadig.
Interesting. I'm using a revision O. I guess there might be a difference in how the program handles different hardware revisions. (I'm not an expert though, so... )
It could be something with the faster flash in the newer models loading the program faster than planned and windows sending a three byte transfer? Currently I'm checking for any three byte message and exiting the program as a way for the windows program and calculator to "safely" disconnect from each other.
I can add something in to check if the data is garbage or the zero bytes the windows program is sending.
I cannot seem to get the program to compile. I have the header file in the right folder and it starts to compile fine, but then it just stops. This is the error that I'm getting:
Command Prompt wrote:
D:\CEdev\meta\ld.alm [1463] macro ? [1206] :read? [7] obj\\main.c.src [1954]:
extern _usb_GetDescriptor
extern? [12] (CALM)
Error: symbol ':globals._usb_GetDescriptor' is undefined or out of scope.
make: *** [bin/DEMO.bin] Error 2
When the run the program on my calculator, it quickly shows a black screen and then returns to the home screen? (My calculator is plugged into the computer.) Am I doing something wrong?
It's possible that you're running the program with a different USBDRVCE version than it was compiled with - the interface isn't stable yet.
As for the compilation error, make sure you've installed the usbdrvce branch of the toolchain, or at least the .lib and .h files for it.
When the run the program on my calculator, it quickly shows a black screen and then returns to the home screen? (My calculator is plugged into the computer.) Am I doing something wrong?
It's possible that you're running the program with a different USBDRVCE version than it was compiled with - the interface isn't stable yet.
As for the compilation error, make sure you've installed the usbdrvce branch of the toolchain, or at least the .lib and .h files for it.
It looks like usbdrvce.lib in CEdev/lib hasn't been updated.
Is there a place where we can get a prebuilt/nightly version of usbdrvce.8xv? Or would I be allowed to add a prebuilt version for download in the Calc2KeyCE repo?
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum