Commit graph

14246 commits

Author SHA1 Message Date
Lephenixnoir 5b52671c50
ports/sh: improve USB debugging behavior
- Set MP_DEBUG_PRINTER to go through DEBUG_printf instead of the
  console, which is important when the former is USB.
- Disable malloc/gc_alloc messages to avoid spamming USB debug log.
2023-12-19 22:20:12 +01:00
Lephenixnoir 70e15e9ed1
ports/sh: slightly more memory on G-III (32 kB -> ~45 kB) 2023-08-20 21:42:27 +02:00
Lephenixnoir 01036c9611
meta: normalize line endings 2023-08-20 13:06:28 +02:00
Lephenixnoir e35ed0c2fb
ports/sh: enable overloaded operators 2023-08-20 12:59:25 +02:00
mibi88 814b226158 Added scripts where casioplot is not working properly 2023-07-19 12:18:40 +02:00
mibi88 7b7c00842f examples: Bug fix 2022-12-24 11:43:47 +01:00
mibi88 0b74e8cfb1 A better gint flappy bird 2022-12-23 13:11:25 +01:00
mibi88 553af9b9c9 examples: A super fast flappy bird for fx and a shitty script
A super fast flappy bird for fx and a shitty flappy bird for fx that can do a SysERROR.
2022-12-22 23:27:02 +01:00
mibi88 38f340cecd examples: add a gint based Flappy Bird for fx 2022-12-22 19:35:04 +01:00
Lephenixnoir 3df7eae26c
examples: examples: add Synchro-Donjon
Only AI mode has been tested. Graphical mode suffers from single VRAM
combined with naive updates. A custom version would solve that.
2022-12-21 19:37:39 +01:00
Lephenixnoir 7ecc558700
examples: add Chute tridimensionnelle 2022-12-21 18:11:15 +01:00
Lephenixnoir 8a498563b8
modgint: fix rendering conflict with shell; more constants
* dupdate() will now cancel pending shell renders
* import gint will also do that (can be avoided with a single print())
* Provide DWIDTH, DHEIGHT, and some more basic colors
2022-12-21 18:10:39 +01:00
Lephenixnoir 4f63ac05d3
meta: add gint-based Flappy Bird and update README 2022-12-19 08:40:52 +01:00
Lephenixnoir 63c4c8f609
ports/sh: clean up all RAM when resetting the interpreter 2022-12-19 08:37:56 +01:00
Lephenixnoir e001880d5b
pe: disable π input (which freezes) 2022-12-19 08:37:19 +01:00
Lephenixnoir da416f067f
pe: fix incorrect line wrapping precomputation 2022-12-18 21:11:17 +01:00
mibi88 81d4bbdb1a Added fx-9860g colors 2022-12-18 19:39:59 +01:00
mibi88 16bd85a754 Python extra RAM was not disabled correctly. 2022-12-17 22:05:48 +01:00
Lephenixnoir 53b2e6bfed
modgint: add most of <gint/display.h> 2022-12-17 20:19:50 +01:00
Lephenixnoir b5d7c61c91
meta: update README and upload test files 2022-12-17 18:43:26 +01:00
Lephenixnoir 0d20ae7929
ports/sh: provide pe_readline() and enable proper input() 2022-12-17 18:30:02 +01:00
Lephenixnoir ddab477c3e
ports/sh: redraw shell periodically during execution (if changed) 2022-12-17 16:10:27 +01:00
Lephenixnoir 189aadff1c
pe: rotating console lines and basic benchmarks 2022-12-17 16:09:32 +01:00
Lephenixnoir 0da3395e89
pe: take over the REPL from pyexec.c 2022-12-15 18:38:03 +01:00
Lephenixnoir dc062623da
casioplot: clear screen upon import 2022-12-12 07:34:23 +01:00
Lephenixnoir a4d5bc0752
casioplot: replace newlines with spaces in draw_string() 2022-12-12 07:14:56 +01:00
Lephenixnoir dff23463b0
meta: update README 2022-12-12 07:01:56 +01:00
Lephenixnoir e85d84e802 Merge pull request 'Better casioplot.' (#1) from mibi88/PythonExtra:main into main
Reviewed-on: https://gitea.planet-casio.com/Lephenixnoir/PythonExtra/pulls/1
2022-12-12 06:52:50 +01:00
Lephenixnoir 49e3f6a6af
ports/sh: reset shell before GUI import
This allows programs to be started several times from the GUI. Otherwise
MicroPython would just skip importing the already-imported module.
2022-12-12 06:48:52 +01:00
Lephenixnoir 9bdb18f49f
ports/sh: clear keyboard events after shell execution
This helps a lot when running interactive games that don't read their
input (apart from eg. AC/ON). Previously all the events accumulated
during the execution would be executed once the program returns. Now the
queue is reset after execution.
2022-12-12 06:34:53 +01:00
Lephenixnoir 9684b6893f pe: delete old shell lines to avoid filling RAM with history 2022-12-11 20:42:53 +01:00
Lephenixnoir 46ca19aece
pe: delete old shell lines to avoid filling RAM with history 2022-12-11 19:17:43 +01:00
mibi88 cb887885b9 Cleanup in casioplot, Python ram only with PE_DEBUG 2022-12-11 18:04:14 +01:00
Lephenixnoir d7d1df46bb pe: add scrolling in shell 2022-12-11 17:33:27 +01:00
Lephenixnoir 40a2de1a5f pe: add shell scrollbar (render only) 2022-12-11 17:33:27 +01:00
Lephenixnoir 8f5af62f9f ports/sh: fix AC/ON locking after some time
The Python program being run is in charge of keyboard events with the
gint module. Most programs don't care though, and simply let events
accumulate until the queue is full.

The async filter is able to receive events even when the queue is full.
However, it filtered only AC/ON presses, not releases, so the releases
were sent back to the driver to queue. This was impossible as the queue
was full, so the release was never recorded. This failure then repeated
at every tick, forever.

Since the key was never properly released, further presses were just
seen as a continuation of the current press and thus did not produce
any new event, so the async filter was no longer called and the Python
program could no longer be interrupted.
2022-12-11 17:33:27 +01:00
Lephenixnoir edf57c6f07 ports/sh: basic improvements to USB debugging (not quite ready yet)
The USB driver isn't stable enough to support funky uncontrolled async
messages yet. Tends to freeze and need a reconnect. Future problem.
2022-12-11 17:33:27 +01:00
Lephenixnoir e40f8cba15
pe: add scrolling in shell 2022-12-11 17:23:33 +01:00
Lephenixnoir 5051323860
pe: add shell scrollbar (render only) 2022-12-04 17:52:18 +01:00
Lephenixnoir 2cc8fe63e5
ports/sh: fix AC/ON locking after some time
The Python program being run is in charge of keyboard events with the
gint module. Most programs don't care though, and simply let events
accumulate until the queue is full.

The async filter is able to receive events even when the queue is full.
However, it filtered only AC/ON presses, not releases, so the releases
were sent back to the driver to queue. This was impossible as the queue
was full, so the release was never recorded. This failure then repeated
at every tick, forever.

Since the key was never properly released, further presses were just
seen as a continuation of the current press and thus did not produce
any new event, so the async filter was no longer called and the Python
program could no longer be interrupted.
2022-12-04 14:43:33 +01:00
Lephenixnoir ed66b0d6a7
ports/sh: basic improvements to USB debugging (not quite ready yet)
The USB driver isn't stable enough to support funky uncontrolled async
messages yet. Tends to freeze and need a reconnect. Future problem.
2022-12-04 14:34:47 +01:00
mibi88 b664e0ab9c Proper python ram use 2022-11-23 17:11:41 +01:00
mibi88 e3bda720ff 1 more test. 2022-11-23 16:27:27 +01:00
mibi88 b39dc00203 Added python ram in a dirty way 2022-11-23 13:56:48 +01:00
mibi88 f9d6f55625 Forgot to change the default font. 2022-11-21 17:31:22 +01:00
mibi88 c6e1666918 Little fixes 2022-11-20 16:47:22 +01:00
mibi88 2ace52aff9 Fixed draw_string(), font size not ignored anymore on fx9860 2022-11-20 15:49:10 +01:00
mibi88 a6fb6122db Fixed set_pixel() 2022-11-20 13:13:40 +01:00
mibi88 6fcce03e5c Fixed get_pixel() 2022-11-20 12:44:43 +01:00
Lephenixnoir eeae10abc5
ports/sh: start adding decent memory on fx-CG 50 (~ 350 kB) 2022-11-10 23:02:20 +01:00