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 Hors 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 ··· 10, 11, 12, 13, 14, 15, 16 ··· 20 ··· 30, 31, 32 Suivante
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 22/07/2019 17:47 | #


Hi .
I found a bug that wasnt in before version ( i am on 2.0.0 )
The Isexist( fonction doesnt detect files if the name doesnt contain at the end a letter : if used with 1.96 version a save2.sav file i created , detected and now doesnt detect ...
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
Kikoodx Hors ligne Ancien labélisateur Points: 3011 Défis: 11 Message

Citer : Posté le 24/07/2019 13:01 | #


Hello !
I installed C.Basic on my fx-CG50 and it's really fast !
I mean, if C is even faster than this I definitly want to learn how to install gint
A minesweeper I made for my own (I haven't found text based one to download) generate in a instant against 4 to 5 seconds in regular Basic Casio, and I had to change the For delay from 100 to 15e3 for playing it !
(I also really love syntax highlight.)

While seeing this, I was wondering : this is a very accurate emulator, do you think it would be possible for you to "emulate" monochrome Basic for polychrome calculators ? It would be a very handy tool in my guess.
ouais ouais
Sentaro21 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 24/07/2019 14:39 | #


@Captainluigi
Thanks for a bug report.
Save "asave2.sav",A
IsExist("asave2.sav")

This program is Ok.
Sorry, I do not understand the details of the bug a little, so
Could you please explain in more detail the requirements of the bug?


@Kikoodx
Thanks for using C.Basic for CG.

C.Basic is much faster than Basic Casio, but C is even faster (especially for integer programs). I think gint is the fastest because it is optimized.
The advantage of C.Basic is that it can be programmed only on the calculator itself, like Basic Casio.

The current C.Basic also supports g1m programs, but apart from that, I think that full emulation of Monochrome Basic is sufficiently possible.

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 24/07/2019 18:46 | #


Sentaro21 a écrit :
@Captainluigi
Thanks for a bug report.
Save "asave2.sav",A
IsExist("asave2.sav")

This program is Ok.
Sorry, I do not understand the details of the bug a little, so
Could you please explain in more detail the requirements of the bug?


@Kikoodx
Thanks for using C.Basic for CG.

C.Basic is much faster than Basic Casio, but C is even faster (especially for integer programs). I think gint is the fastest because it is optimized.
The advantage of C.Basic is that it can be programmed only on the calculator itself, like Basic Casio.

The current C.Basic also supports g1m programs, but apart from that, I think that full emulation of Monochrome Basic is sufficiently possible.


Hem , very strange : happened with the 2.0 , perhaps the file was corrupted .
Thank you for your time .
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 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 25/07/2019 01:24 | #


Thanks.
File corruption is a bit of a worry.
I wish there were no errors in the latest version.
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.
Lightmare Hors ligne Membre de CreativeCalc Points: 690 Défis: 0 Message

Citer : Posté le 29/07/2019 15:58 | # | Fichier joint


Hello ! while i was programming a new dialogue engine, i got a bug : the condition right below is true, but the code in it is not executed, this is a pretty big problem, because i don't know how the bug can be realized. I put the whole program in this message ( the bug is commented in the TEXT program).


//BUG: condition vraie, mais non execution du dialogue

If Frac Mat A[(E/13),(F/13)]=0.3
Then "J'aime l'air frais de la mer ! Comment ? tu savais pas que ce truc a gauche c'est de l'eau ? Normal, le dev ne sais pas faire des graphismes !"->Str 1
Goto 1
IfEnd

"Quand je dis à la cour : "Sautez ! ", tout le monde me demande "jusqu'où ?" "
Dijkstra - The Witcher
Hackcell Hors ligne Maître du Puzzle Points: 1524 Défis: 11 Message

Citer : Posté le 29/07/2019 16:04 | #


T'es sûr que t'as le droit d'utiliser frac sur une matrice ?
Si oui qu'est-ce que ça voudrais dire que le tout soit égal à 0.3 ?

Pour moi, c'est ta condition qui est fausse...
Lephenixnoir En ligne Administrateur Points: 24228 Défis: 170 Message

Citer : Posté le 29/07/2019 16:15 | #


C.Basic c'est de l'arithmétique de flottants en IEEE 754 non ?
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Lightmare Hors ligne Membre de CreativeCalc Points: 690 Défis: 0 Message

Citer : Posté le 29/07/2019 16:35 | #


@Hackcell : si, la condition est juste, car Frac cible la valeur contenue dans une case de la matrice A, et non pas la matrice en elle même.
De plus, je sais que ca vient très probablement d'un bug, car toutes les autres conditions de ce type ( qui comportent Frac Mat A[x,y]=z ) fonctionnent. En plus, si on affiche juste avant la condition la valeur de Frac Mat A[(E/13),(F/13)], on obtient bien 0,3
"Quand je dis à la cour : "Sautez ! ", tout le monde me demande "jusqu'où ?" "
Dijkstra - The Witcher
Lephenixnoir En ligne Administrateur Points: 24228 Défis: 170 Message

Citer : Posté le 29/07/2019 16:38 | #


Et si tu affiches Frac Mat A[(E/13),(F/13)]=0.3 tu obtiens quoi ?
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Hackcell Hors ligne Maître du Puzzle Points: 1524 Défis: 11 Message

Citer : Posté le 29/07/2019 16:41 | #


Bah cherche pas, comme Senpai l'a dis c'est pas du BCD, mais du binaire tout court et tu peux pas représenter 0.3 en binaire
Lightmare Hors ligne Membre de CreativeCalc Points: 690 Défis: 0 Message

Citer : Posté le 29/07/2019 16:42 | #


@Lephenixnoir : j'obtiens 0 :/
"Quand je dis à la cour : "Sautez ! ", tout le monde me demande "jusqu'où ?" "
Dijkstra - The Witcher
Lephenixnoir En ligne Administrateur Points: 24228 Défis: 170 Message

Citer : Posté le 29/07/2019 16:43 | #


Donc voilà, c'est de l'arithmétique flottante binaire, donc 0.3 n'est pas représentable. Les deux nombres sont en réalité différents, mais tous les deux approximés à 0.3 lors de l'affichage.

La question pertinente est donc : pourquoi as-tu choisir de mettre des informations dans la partie fractionnaire de ta matrice et comment peux-tu le changer ?
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Lightmare Hors ligne Membre de CreativeCalc Points: 690 Défis: 0 Message

Citer : Posté le 29/07/2019 16:48 | #


Alors j'ai choisi de faire ca pour relier chaque PNJ avec un dialogue, mais ce qui me perturbe, c'est que ca marche pour les autres PNJs qui ont des conditions similaires ( avec une partie fractionnaire ), et que ca marche parfaitement.
"Quand je dis à la cour : "Sautez ! ", tout le monde me demande "jusqu'où ?" "
Dijkstra - The Witcher
Hackcell Hors ligne Maître du Puzzle Points: 1524 Défis: 11 Message

Citer : Posté le 29/07/2019 16:49 | #


https://egadget2.web.fc2.com/CBasic/Interpreter/CBasic_interpreter.html#Specification a écrit :
Calculations do not yield the same results as the usual interpreter because C.Basic use double-precision floating point instead of fixed-point BCD.
Lephenixnoir En ligne Administrateur Points: 24228 Défis: 170 Message

Citer : Posté le 29/07/2019 16:52 | #


Tu sais, 0.3 n'est pas représentable mais 0.5 l'est. Donc c'est inutile de chercher à le faire marcher.

Non, le fond pour moi c'est que c'est bizarre (inutile) de mettre des infos dans ce chiffre-là. Multiplie ton nombre par 10. Et si tu as besoin d'un stockage plus compliqué, utilise un stockage plus compliqué, n'essaie pas de tout faire rentrer dans une seule matrice, ça ne sert à rien.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Sentaro21 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 30/07/2019 08:25 | #


@Lightmare
It has an error due to binary arithmetic (IEEE754).
Please change the program like this.
If Frac Mat A[(E/13),(F/13)]-0.3<1e-15

If the program does not require floats, it is recommended to integer mode.

@Hackcell
@Lephenixnoir
Thanks for the quick response.


Ajouté le 04/08/2019 à 13:25 :
Here are new updated version.
Newly supports the indent of editor.
There may still be bugs.
Please report as soon as you find it.

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

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

-Added the indent function to the editor.
When [EXE] is pressed, the indent(blank spaces) at the beginning of the current line is continued to the next line.

-In the setup setting, the indent is added automatically when loading the program. (Edit Indent+)
Programs already indented are not added indent.
You can also delete blank spaces including indents when saving program. (=to compatible with Casio Basic)
The following command adds indents.
If-Else-ElseIf-IfEnd
For-To-Step-Next
While-WhileEnd
Do-LpWhile
Switch-SwithEnd

-Fixed a bug that did not work Dim List1 using the old command List1.


Ajouté le 05/08/2019 à 11:21 :
A severe error is found.
re-uploaded now. (5/8/2019)
-Fixed the bug that create a new program with an existing file name.

Ajouté le 07/08/2019 à 05:02 :
Here is new updated version.
Details of the bug are as follows.
https://community.casiocalc.org/topic/7637-cbasic-international-release/page-7#entry62475

2.21 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC221beta.zip
-Fixed "Range Error" when assigned directly to ViewWindow variable.
-hange specification that Graph 35+E II hidden memory usable size has been changed from 128KB to about 188KB.
-Fixed a bug that the SDK emulator could not be started after initialization.

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

Ajouté le 15/08/2019 à 07:05 :
Here is a little updated version.

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

1.22 beta for Graph90+E/fx-CG10/20/50
https://pm.matrix.jp/CB/CBASICCG122beta.zip
-Fixed MOD( bug in integer mode.
(False) MOD(-5,3)->5
(True ) MOD(-5,3)->1

-Fixed a bug that garbage was generated at the end of the program when the indent function was used on the main memory.

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.
Krevo_ Hors ligne Maître du Puzzle Points: 412 Défis: 2 Message

Citer : Posté le 15/08/2019 09:16 | #


Hi, what is 'integer mode' ?

My Casio Basic web interpreter give -2 for MOD(-5,3)
Casio Basic Web Interpreter, c'était le basic Casio dans votre navigateur web !
Lephenixnoir En ligne Administrateur Points: 24228 Défis: 170 Message

Citer : Posté le 15/08/2019 10:56 | #


It's the default one execution mode of C.Basic where variables are integers. This speeds up computations (a lot I think?). More details in the documentation.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Sentaro21 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 15/08/2019 14:22 | #


@Krevo_
The integer mode is one of the C.Basic execution mode that speeds up by limiting the number to be handled to an integer.
It can be set in setup.

MOD( command of Basic Casio is unique in the negative number.


@Lephenixnoir
Thanks!
The default execution mode of C.Basic is double.
Integer mode was added later.
Complex mode was added last.

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.
Lephenixnoir En ligne Administrateur Points: 24228 Défis: 170 Message

Citer : Posté le 15/08/2019 15:09 | #


Thanks for pointing out my mistake, I edited my message.
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Précédente 1, 2, 3 ··· 10, 11, 12, 13, 14, 15, 16 ··· 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 152 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