Search found 88 matches: casio

Searched query: casio

by Zezombye
Thu Jan 03, 2019 1:15 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

I "solved" the shell problem (really it's more like a workaround, it still kind of prints character by character, but I have no idea how to avoid that). Basically I first reprogrammed shell_draw() to only execute in case of a new line (\n or character wrapping). This works fine, but now I also have ...
by Zezombye
Tue Dec 04, 2018 4:48 pm
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

Yeah, I knew about this port - in fact Casio not releasing MPy for monochrome calcs is why I'm doing this port myself :p

Shame they used the big font though, you could fit much more letters in the screen.
by Zezombye
Sun Dec 02, 2018 6:32 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

I refactored that because it was a simple way to automatically send the string "from xxx import *" to the shell. So pyexec_friendly_repl(char *text), through a bunch of ifs, ultimately calls int readline(vstr_t *line, const char *prompt, char *text), which is the following function: int readline_ind...
by jickster
Sun Dec 02, 2018 3:45 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

Why and how have you refactored the py code?

You’re sending the first line into pyexec_friendly_repl() though that function is normally void.

If this is part of a script why are you using REPL functions?



Sent from my iPhone using Tapatalk Pro
by Zezombye
Sat Dec 01, 2018 5:30 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

No, it's the string "from xxx import *": char str[30]; char filename[13]; strcpy(filename, _sFile); filename[strlen(filename)-3] = '\0'; sprintf(str, "from %s import *\r", filename); for (int k = 0; str[k]; k++) { str[k] = tolower2(str[k]); } _iAppMode = SHELL; mpy_main(str); The actual text of the ...
by jickster
Sat Dec 01, 2018 4:57 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

Zezombye wrote:Thanks, works fine now :D
Thank god. I was gonna be exasperated otherwise.

I’ll address your REPL issue next.

To be clear, does your

Code: Select all

char * text
represent ALL the lines of a .py script?


Sent from my iPhone using Tapatalk Pro
by jickster
Sat Dec 01, 2018 4:28 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

You forgot to call mp_stack_ctrl_init() which takes care of what you’re trying to do with the variable stack_dummy.


Sent from my iPhone using Tapatalk Pro
by Zezombye
Sat Dec 01, 2018 4:13 am
Forum: Development of MicroPython
Topic: How do I make a port of MicroPython for Casio calculators?
Replies: 66
Views: 59069

Re: How do I make a port of MicroPython for Casio calculators?

There you go: int mpy_main(char *text) { mp_stack_set_limit(256); int heapLen = 32768; #if MICROPY_ENABLE_GC heap = malloc(heapLen); #endif if (heap == NULL) { int key; locate(1,1); Print("Couldn't alloc!"); GetKey(&key); } ML_clear_vram(); ML_display_vram(); shell_init(); readline_index = 0; initNb...