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 » C.Basic Projets
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

C.Basic Projets

Posté le 30/04/2017 11:08

Hello, everyone.

I am Sentaro21, and I am developing C.Basic, a Basic interpreter that allows high-speed execution of Basic programs while maintaining compatibility with genuine Casio Basic.

Here is an English site, by Krtyski, about the C.Basic project (I helped him with the translation, but it's still unfinished) :
https://egadget2.web.fc2.com/CBasic/Interpreter/CBasic_interpreter.html

The articles and various programs from this site served as a reference to evaluate the compatibility level of C.Basic. Results were not good every time I tested them, but compatibility increased over time.

These programs have been ported experimentally. Many thanks to their authors.

Block Tower (C.Basic version)
https://pm.matrix.jp/CB/CB_BlockTower.zip

Sudoku (C.Basic version)
https://pm.matrix.jp/CB/CB_Sudoku.zip

Maze Generator (C.Basic version)
https://pm.matrix.jp/CB/CB_MazeGene.zip

Graph 3D (C.Basic version)
https://pm.matrix.jp/CB/CB_Graph3D.zip

TokiTori (C.Basic version 25/11/2018)
https://pm.matrix.jp/CB/CB_Tokitori.zip
(added Save/Load feature)

Ice slider (C.Basic version 25/11/2018)
https://pm.matrix.jp/CB/CB_IceSlider.zip
(added Save/Load feature)

Clonelab (C.Basic version 25/11/2018)
https://pm.matrix.jp/CB/CB_Clonlab.zip
(added Save/Load feature)

Arkenstone (C.Basic version 25/11/2018)
https://pm.matrix.jp/CB/CB_Arkenstone.zip
(added Save/Load feature)

Aventura (C.Basic version 25/11/2018)
https://pm.matrix.jp/CB/CB_Aventura.zip
(added Save/Load feature)

Electricity (C.Basic version 10/2/2019)
https://pm.matrix.jp/CB/CB_Electric.zip
(added Save/Load feature)

Here are examples of programs that reach near-C performance :

BallGame (C.Basic version)
https://pm.matrix.jp/CB/CB_BallGame.zip

Asprin (C.Basic version)
https://pm.matrix.jp/CB/CB_Aspirin.zip


The C.Basic project is still yet to be completed, thus I would like to get your feedback.

This is the latest version of C.Basic 2.47 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC247beta02.zip (updated 11/12/2023)

This is the latest version of C.BasicCG 1.47 beta for Graph90+E/fx-CG10/20/50:
https://pm.matrix.jp/CB/CBASICCG147beta02.zip (updated 11/12/2023)

C.Basic manuals
https://gitlab.com/sentaro21/cbasic

Currently C.Basic exists thanks to this site.
Thank you very much.


Précédente 1, 2, 3 ··· 6, 7, 8, 9, 10, 11, 12 ··· 20 ··· 30, 31, 32 Suivante
Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 08/03/2019 06:58 | #


@Sentaro21 : Sorry but I dont understand how to select the data type. Using witch function ?
Lephenixnoir En ligne Administrateur Points: 24146 Défis: 170 Message

Citer : Posté le 08/03/2019 08:03 | #


Voici un extrait de la documentation :

-------------------------------------------------------------------------------
Peek(                   [SHIFT]+[VARS](PRGM)-[F6]-[F6]-[F5](EXEC)-[F4](Peek)
-------------------------------------------------------------------------------
Lit des données en mémoire. Quand la taille n'est pas spécifiée par l'utilisation de [.B], [.W], [.L] ou [.F], le comportement par défaut est de lire 1 octet.

(Format) Peek(adresse)[.B|.W|.L|.F]
(Format) *(addresse)[.B|.W|.L|.F]

(Exemple) Peek(0x8802E000).B -> A%
(Exemple) *(0x8802E000).B -> A%
Charge dans A% 1 octet de données (byte) lu à l'adresse 0x8802E000.

(Exemple) Peek(0x8802E000).W -> A%
(Exemple) *(0x8802E000).W -> A%
Charge dans A% 2 octets de données (word) lus à l'adresse 0x8802E000.

(Exemple) Peek(0x8802E000).L -> A%
(Exemple) *(0x8802E000).L -> A%
Charge dans A% 4 octets de données (longword) lus à l'adresse 0x8802E000.

(Exemple) Peek(0x8802E000).F -> A
(Exemple) *(0x8802E000).F -> A
Charge dans A% 8 octets de données (flottant double précision) lus à l'adresse 0x8802E000.

Tu spécifies avec Peek().B ou Peek().L, etc.

Par contre ça permet juste de lire de la mémoire arbitraire, pas des fichiers ?
Mon graphe (24 Mars): (gint#27 ; (Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; ...) || (shoutbox v5 ; v5)
Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 08/03/2019 10:23 | #


Oui, pour les fichiers j'ai trouvé "Save " et "Load " qui permettent de charger dans un ficher dont on spécifie le nom, les données d'une matrice. Avec ça on peut déjà faire des choses. Il y a aussi "IsExist ".
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 08/03/2019 14:09 | #


@Disperseur
Disperseur a écrit :
@Sentaro21 : Sorry but I dont understand how to select the data type. Using witch function ?
It is as the manual presented by Lephenixnoir,
Please be careful with memory operation.(especially poke)
If you have anything you do not understand, please ask a question.

@Lephenixnoir
Thanks for your quick support again.
Je continue à développer C.Basic. (Il est compatible avec Basic Casio.)
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 27/03/2019 18:14 | #


J'arrete pas d'avoir un nesting error lorsque j'utilises un getkey pour sortir et rentrer dans un while :

Juste un exemple simplifé :

Lbl 1
While 1
Getkey→A
A=48⇒Goto 2
WhilEnd
Lbl 2
"Hi!"◢
Goto 1



Et puis j'aimerais savoir comment charger un fichier de sauvegarde ( genre xml ou ini pour les logiciels sur PC ) , des bmp ( aussi ), ?

Et ça serait superbe si on pouvait exécuter ces programmes sans avoir le g1a installé
Les bons artistes copient, les grands artistes volent. Picasso
Synthwave/Musique électro 80s sur ma chaine Youtube

Jouez à Mario sans arrêt sur votre Casio !
Cliquez pour découvrir
Cliquez pour recouvrir
Lephenixnoir En ligne Administrateur Points: 24146 Défis: 170 Message

Citer : Posté le 27/03/2019 19:11 | #


Eh oui, le programme n'a jamais remarqué que tu étais sorti du while lors du Goto 2. Il a donc l'impression que tu re-rentres dans un While 1 sans en être sorti, et du coup ça fait plein de While imbriqués ("nested")... et ça se termine en nesting error.

La solution : utiliser des vraies structures de contrôles, pas des Goto.

Lbl 1
While 1
Getkey→A
A=48⇒Break
WhileEnd
"Hi!"◢
Goto 1

Break permet de sortir d'une boucle.
Mon graphe (24 Mars): (gint#27 ; (Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; ...) || (shoutbox v5 ; v5)
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 27/03/2019 19:36 | #


Lephenixnoir a écrit :
Eh oui, le programme n'a jamais remarqué que tu étais sorti du while lors du Goto 2. Il a donc l'impression que tu re-rentres dans un While 1 sans en être sorti, et du coup ça fait plein de While imbriqués ("nested")... et ça se termine en nesting error.

La solution : utiliser des vraies structures de contrôles, pas des Goto.

Lbl 1
While 1
Getkey→A
A=48⇒Break
WhileEnd
"Hi!"◢
Goto 1

Break permet de sortir d'une boucle.


Ouais , mais c'est plus très clean si il y a plusieurs goto dans ce whileEnd.
( surtout ça va manger des octets.)
En plus ça veut dire que c'est moins stable que celui de Casio ...
Merci beaucoup quand même .

Ajouté le 27/03/2019 à 19:37 :
Et pour le reste de mes questions ?

Les bons artistes copient, les grands artistes volent. Picasso
Synthwave/Musique électro 80s sur ma chaine Youtube

Jouez à Mario sans arrêt sur votre Casio !
Cliquez pour découvrir
Cliquez pour recouvrir
Lephenixnoir En ligne Administrateur Points: 24146 Défis: 170 Message

Citer : Posté le 27/03/2019 20:42 | #


Et puis j'aimerais savoir comment charger un fichier de sauvegarde ( genre xml ou ini pour les logiciels sur PC ) , des bmp ( aussi ), ?

La doc, la doc !

Et ça serait superbe si on pouvait exécuter ces programmes sans avoir le g1a installé

Impossible, c'est le g1a qui les exécute...
Mon graphe (24 Mars): (gint#27 ; (Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; ...) || (shoutbox v5 ; v5)
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 27/03/2019 21:22 | #


Lephenixnoir a écrit :
Et puis j'aimerais savoir comment charger un fichier de sauvegarde ( genre xml ou ini pour les logiciels sur PC ) , des bmp ( aussi ), ?

La doc, la doc !

Et ça serait superbe si on pouvait exécuter ces programmes sans avoir le g1a installé

Impossible, c'est le g1a qui les exécute...


Oui , mais le guide des fonctions étendues ( backlight , refreshctrl , etc ) , est en ... japonais :https://egadget2.web.fc2.com/CBasic/Interpreter/MiscCom.html#Selector

Ajouté le 27/03/2019 à 21:27 :
Un guide ici ça serait super
Les bons artistes copient, les grands artistes volent. Picasso
Synthwave/Musique électro 80s sur ma chaine Youtube

Jouez à Mario sans arrêt sur votre Casio !
Cliquez pour découvrir
Cliquez pour recouvrir
Lephenixnoir En ligne Administrateur Points: 24146 Défis: 170 Message

Citer : Posté le 27/03/2019 21:34 | #


Et hop : https://gitlab.com/sentaro21/cbasic/blob/master/FX/Manual_FR.txt#L1144
Mon graphe (24 Mars): (gint#27 ; (Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; ...) || (shoutbox v5 ; v5)
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 28/03/2019 06:14 | #


@Captainluigi
1.91 and later support Goto that exit the loop.
(However, can not Goto into the loop.)
Please try the latest version.

Please refer to the manual for extended commands.
C.Basic manuals.
https://gitlab.com/sentaro21/cbasic

@Lephenixnoir
Thanls a lot.
Je continue à développer C.Basic. (Il est compatible avec Basic Casio.)
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 28/03/2019 07:18 | #


@Sentaro21: I have a question for you: I you are able to make a C program running a Basic one, do you think that you're able to make a Basic to C program converter ?
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 28/03/2019 07:25 | #


Manually I can convert Basic programs to C.
What is the Basic program you want to convert?

Je continue à développer C.Basic. (Il est compatible avec Basic Casio.)
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 28/03/2019 12:15 | #


This one (I'm actually trying to convert it): https://www.planet-casio.com/Fr/forums/lecture_sujet.php?id=15651&page=1#164199
This is the first one in my post.
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 28/03/2019 14:56 | #


I tried to fix your C source program.
https://www.planet-casio.com/Fr/forums/lecture_sujet.php?id=15651&page=last#164239
Je continue à développer C.Basic. (Il est compatible avec Basic Casio.)
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 28/03/2019 17:34 | #


Thank you for your help. The program works. The next step would be to program the collisions with the walls coded using "1" in the two dimensions board..
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 04/04/2019 10:05 | #


I downloaded the last version for Graph 75+e , and it is not the 1.95, but the 1.84
Les bons artistes copient, les grands artistes volent. Picasso
Synthwave/Musique électro 80s sur ma chaine Youtube

Jouez à Mario sans arrêt sur votre Casio !
Cliquez pour découvrir
Cliquez pour recouvrir
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 04/04/2019 10:18 | #


Please from here.
https://pm.matrix.jp/CB/CBASIC195beta.zip


Ajouté le 23/04/2019 à 10:26 :
Sorry for the late update.
Here is new updated version.

for for Graph 35+USB/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC196beta.zip
-Added the help dispyay at the command input of editor.
(Set enable/disable in setup.)
("~~ HELP1.txt" / "~~ HELP1.g1m" files in the HELP folder are Help files.
Please put it in the root folder or the same folder as the program.

-Added nPc/nCr function.
-Fixed the file name is broken bug when converting from text to g1m.
-Fixed the bug that external fonts may not be loaded.
-The default storage folder for PICT/CAPT files has been changed to "PICT" and "CAPT" in all uppercase.
-Fixed the bug that the folder of file mode was not saved.
-Fixed the bug of MSC that can not be saved even though MCS free area is sufficient.

-Fixed the bug that could not use List1~List6.
-Fixed the bug of getting an element address incorrectly in 1-bit and 4-bit matrices.
-Fixed the problem with continuous operation of matrix and List.
-In the case of negative argument in StrShift, fixed that the result was different.
(Example) StrShift ("1234567", -2)->"12345"
-Fixed graph drawing commands bug.

for Graph90+E/fx-CG10/20/50
https://pm.matrix.jp/CB/CBASICCG080.zip


Please transfer "~~HELP1.g1m"/"~~HELP3.g3m" in the HELP folder of zip to the root folder.
If Syntax Help is turned on in setup, help will be displayed each time you enter a command in the editor.
Je continue à développer C.Basic. (Il est compatible avec Basic Casio.)
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 23/04/2019 14:20 | #


Sentaro21 a écrit :
Please from here.
https://pm.matrix.jp/CB/CBASIC195beta.zip


Ajouté le 23/04/2019 à 10:26 :
Sorry for the late update.
Here is new updated version.

for for Graph 35+USB/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC196beta.zip
-Added the help dispyay at the command input of editor.
(Set enable/disable in setup.)
("~~ HELP1.txt" / "~~ HELP1.g1m" files in the HELP folder are Help files.
Please put it in the root folder or the same folder as the program.

-Added nPc/nCr function.
-Fixed the file name is broken bug when converting from text to g1m.
-Fixed the bug that external fonts may not be loaded.
-The default storage folder for PICT/CAPT files has been changed to "PICT" and "CAPT" in all uppercase.
-Fixed the bug that the folder of file mode was not saved.
-Fixed the bug of MSC that can not be saved even though MCS free area is sufficient.

-Fixed the bug that could not use List1~List6.
-Fixed the bug of getting an element address incorrectly in 1-bit and 4-bit matrices.
-Fixed the problem with continuous operation of matrix and List.
-In the case of negative argument in StrShift, fixed that the result was different.
(Example) StrShift ("1234567", -2)->"12345"
-Fixed graph drawing commands bug.

for Graph90+E/fx-CG10/20/50
https://pm.matrix.jp/CB/CBASICCG080.zip


Please transfer "~~HELP1.g1m"/"~~HELP3.g3m" in the HELP folder of zip to the root folder.
If Syntax Help is turned on in setup, help will be displayed each time you enter a command in the editor.


Good job , you added a lot in the changelog

Les bons artistes copient, les grands artistes volent. Picasso
Synthwave/Musique électro 80s sur ma chaine Youtube

Jouez à Mario sans arrêt sur votre Casio !
Cliquez pour découvrir
Cliquez pour recouvrir
Shadow15510 Hors ligne Administrateur Points: 5498 Défis: 18 Message

Citer : Posté le 23/04/2019 17:21 | #


Yeppe !!
I download it the help on calc is a very good idea !
"Ce n'est pas parce que les chose sont dures que nous ne les faisons pas, c'est parce que nous ne les faisons pas qu'elles sont dures." Sénèque

Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 25/04/2019 09:05 | #


@Captainluigi
@Shadow15510
Thanks very much!
The help file is not complete yet and will be updated.

Ajouté le 27/04/2019 à 09:31 :
Here is new updated version.

for Graph 35+USB/75/85/95 (SD).
https://pm.matrix.jp/CB/CBASIC197beta.zip

for Graph90+E/CG10/20/50
https://pm.matrix.jp/CB/CBASICCG081.zip
-Fixed the incompatibility Fix and Sci in EngOn.
(Example) EngOn:Sci 3
1.23456789e12->12.3M

-Added Strings variable or Numeric variable to the argument of Save/Load command.
(Example) Save "TEST",A
(Example) Load "TEST",Str 1

-Fixed that the upper line of the function key flickered at the help display.

-Help file updated little.

Ajouté le 01/05/2019 à 12:49 :
Here is new updated version.

for Graph 35+E/75/85/95 (SD).
https://pm.matrix.jp/CB/CBASIC198beta.zip
-Changed specification that the case-insensitive of the file name of strage/SD mode.
so it possible to rename each other from upper case to lower case.
(Example) "ABC.bmp"->"abc.bmp"

-Changed the cursor initial position of file input to before the extension.

-Corrected the cursor position for canceling debug mode.
-Fixed the bug that debug mode is not released by the confirmation popup of cancellation of debug mode.

for Graph90+E/CG10/20/50
https://pm.matrix.jp/CB/CBASICCG082.zip

Ajouté le 02/05/2019 à 15:27 :
Fixed exiting Goto bug from Switch~SwitchEnd.
and re-updated (1.98beta/0.82alpha)


Ajouté le 04/05/2019 à 10:32 :
Re-updated v1.98beta again.

for Graph 35+E/75/85/95 (SD).
https://pm.matrix.jp/CB/CBASIC198beta.zip
-Added pop-up when external font is not enabled in SetFont 1.

-Changed specification of maximum loop stack level.
(for~Next :upto 4 level -> 7)
(While~WhileEnd :upto 6 level -> 7)
(Do=LpWhile :upto 6 level -> 7)
(Switch~SwithEnd:upto 4 level -> 7)
Je continue à développer C.Basic. (Il est compatible avec Basic Casio.)
Overclocking utilitaire Ftune/Ptune2/Ptune3 est également disponible.
Si vous avez des questions ou un rapport de bogue, n'hésitez pas à me le faire savoir.
Précédente 1, 2, 3 ··· 6, 7, 8, 9, 10, 11, 12 ··· 20 ··· 30, 31, 32 Suivante

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 - 2024 | Il y a 102 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