Les membres ayant 30 points peuvent parler sur les canaux annonces, projets et hs du chat.
La shoutbox n'est pas chargée par défaut pour des raisons de performances. Cliquez pour charger.

Forum Casio - Projets de programmation


Index du Forum » Projets de programmation » prog-tools add-in for programming on CG50
Druzyek Hors ligne Membre Points: 52 Défis: 0 Message

prog-tools add-in for programming on CG50

Posté le 05/04/2025 18:42

I've been working on an add-in to do programming on the CG50. It has tabs like tmux, and each tab can be split once either vertically or horizontally allowing for up to 12 programs to run at once. Only the currently selected program runs until you switch to another tab or split. I think this will work better than the way the built-in Python does it where you have to save the file and lose your place every time you want to run something.


Each of the 12 splits has its own memory in the 2MB of RAM starting at 0x8c200000. When you start a program or move back to a program that's already running, the add-in shifts the memory for the selected program to the top of the heap so it's contiguous with the rest of the free memory and easy to expand.

I'm close to being finished with a simple shell so I can manipulate files without having to leave the add-in. Thanks to LephenixNoir for the help with file system operations and everything else. I plan to add a Forth interpreter next to write programs that run on the calculator.

I made a small framework with SDL2 for testing the add-in. It configures the video memory the same as the CG50 so writing a pixel there works exactly the same as on the calculator. It reimplements some of the gint functionality too so I can compile the add-in for linux which is very convenient for testing.

I'll add some more information as I finish more features. Please let me know if you have any suggestions! GitHub repo here.


Druzyek Hors ligne Membre Points: 52 Défis: 0 Message

Citer : Posté le 28/04/2025 17:50 | #


The calculator shell is finished now and supports these commands: cat, cd, clear, cp, exit, help, ll, ls, mkdir, mv, rm, rmdir and touch. I started on the Forth interpreter and a little over half of the words (ie functions or commands) I have planned are working.


Forth usually has one large area of memory called the dictionary where global variables, arrays and compiled words (ie functions) are stored. The user can read and write any address as in C or assembly so it's possible to accidently write outside of the dictionary or write data over compiled code and cause a crash. Since this Forth is running on a calculator, I made a few changes so that crashing should be impossible. Addresses used for reading and writing dictionary data start at 0 and refer to the beginning of the dictionary rather than the actual address of the dictionary in memory. Those addresses are masked before each read and write so access is guaranteed to be within the bounds of the dictionary. The data stack is also masked and wraps in the same way so there can be no crashes from underflow or overflow. Masking also prevents alignment problems since the bottom bits can be cleared for 32 and 16 bit accesses to round addresses down. Compiled words are stored in a separate part of memory so there's no way for the use to accidentally change them.
Lephenixnoir En ligne Administrateur Points: 25058 Défis: 174 Message

Citer : Posté le 28/04/2025 18:33 | #


I just need to say this UI is gorgeous. @^@
Mon graphe (28 Janvier): (MPM ; serial gint ; (Rogue Life || HH2) ; PythonExtra ; ? ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Yannis300307 Hors ligne Membre Points: 313 Défis: 4 Message

Citer : Posté le 28/04/2025 19:05 | #


Wow impressive work! The project is amazing and so useful for system management tasks!
Développeur sur calculatrice mais qui, contre toutes attentes, prend des douches
Bianxy Hors ligne Membre Points: 1 Défis: 0 Message

Citer : Posté le 30/04/2025 17:09 | #


It's very cool. May I ask when the release of fx-cg50 can be released?

LienAjouter une imageAjouter une vidéoAjouter un lien vers un profilAjouter du codeCiterAjouter un spoiler(texte affichable/masquable par un clic)Ajouter une barre de progressionItaliqueGrasSoulignéAfficher du texte barréCentréJustifiéPlus petitPlus grandPlus de smileys !
Cliquez pour épingler Cliquez pour détacher Cliquez pour fermer
Alignement de l'image: Redimensionnement de l'image (en pixel):
Afficher la liste des membres
:bow: :cool: :good: :love: ^^
:omg: :fusil: :aie: :argh: :mdr:
:boulet2: :thx: :champ: :whistle: :bounce:
valider
 :)  ;)  :D  :p
 :lol:  8)  :(  :@
 0_0  :oops:  :grr:  :E
 :O  :sry:  :mmm:  :waza:
 :'(  :here:  ^^  >:)

Σ π θ ± α β γ δ Δ σ λ
Veuillez donner la réponse en chiffre
Vous devez activer le Javascript dans votre navigateur pour pouvoir valider ce formulaire.

Si vous n'avez pas volontairement désactivé cette fonctionnalité de votre navigateur, il s'agit probablement d'un bug : contactez l'équipe de Planète Casio.

Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2025 | Il y a 64 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire non affilié à Casio. Toute reproduction de Planète Casio, même partielle, est interdite.
Les programmes et autres publications présentes sur Planète Casio restent la propriété de leurs auteurs et peuvent être soumis à des licences ou copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd