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 ··· 10 ··· 16, 17, 18, 19, 20, 21, 22 ··· 30, 31, 32 Suivante
Lephenixnoir En ligne Administrateur Points: 24145 Défis: 170 Message

Citer : Posté le 11/11/2019 13:52 | #


It is well-known that Bfile_WriteFile() must never be called with an odd number of bytes as parameter. This could be an instance of this problem.
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 11/11/2019 13:53 | #


Exactly , I think it add one secure byte to care if the file is empty
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: 24145 Défis: 170 Message

Citer : Posté le 11/11/2019 14:29 | #


Captainluigi a écrit :
Exactly , I think it add one secure byte to care if the file is empty

No, this is a very different problem, independent of file sizes and empty files. It might be a bug or an implementation oversight.
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 12/11/2019 07:10 | #


@Captainluigi
Thanks for reporting the bug.
I fixed and updated.

@Lephenixnoir
Is writing an odd byte file NG?
In fact, Python creates an odd byte file.
It seems that odd bytes can be read and written.


2.35 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC235beta.zip
-Fixed the bug that Clip & Paste of the matrix editor stopped working due to memory exhaustion error. (Enbug in 1.88)
-Fixed the bug that the file size becomes +1 by the Save command of the character string.
(example) Load "test.txt"->Str 1
Save("Test.txt"),Str 1
The file size of "Test.txt" is increased by 1 byte.

1.35 beta for CG10/20/50/Graph90+E.
https://pm.matrix.jp/CB/CBASICCG135beta.zip
-Fixed the bug that the file size becomes +1 by the Save command of the character string.
(example) Load "test.txt"->Str 1
Save("Test.txt"),Str 1
The file size of "Test.txt" is increased by 1 byte.
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: 24145 Défis: 170 Message

Citer : Posté le 12/11/2019 07:56 | #


Sentaro21 a écrit :
Is writing an odd byte file NG?
In fact, Python creates an odd byte file.
It seems that odd bytes can be read and written.

Writing an odd number of bytes in a single call to Bfile_WriteFile() should be considered undefined behavior. I have experienced it first-hand for years. It makes Bfile becomes very unpredictable, leading to corrupt data or crashes... it is probably an implementation bug.

Simon Lothar himself says it pretty explicitly: https://bible.planet-casio.com/simlo/chm/v20/fx_legacy_Bfile.htm

SimLo a écrit :
Never write an odd number of bytes (size). Never use the flash directly as source memory (*buf).

Of course there is no easy fix. This is why I believe Bfile to be insufficient and too buggy to support general filesystem operations such as those Python requires.
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 12/11/2019 08:36 | #


Thanks!
In C.Basic, an odd number of bytes writing occurs only in the Save command, so that bug may not have been revealed.
The warning of Bfile_WriteFile() is not found in CG SysCalls,
Is it still not fixed now? (35+EII?)
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: 24145 Défis: 170 Message

Citer : Posté le 12/11/2019 08:45 | #


Good question. In the 35+E II the syscalls change so much that we are currently unable to even perform basic operations. Neither C.Basic nor Micropython work fully for example.

I have a bit of hope the Casio may relay our questions to the Japanese developers, but this is up to them.
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 12/11/2019 08:55 | #


Thanks again.

The current C.Basic seems to work in 35+EII without probrem.
What kind of trouble remains?
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: 24145 Défis: 170 Message

Citer : Posté le 12/11/2019 09:12 | #


Wait, really? What happened to problems such as not being able to list files in the storage memory? Did you change the Bfile calls to make it work?
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 12/11/2019 09:28 | #


Yes!

The reason why 35+EII did not work is that heap memory was moved to the middle of the hidden memory area.
Therefore, it seems that it works without problems by avoiding the heap memory area by halving the hidden memory 256KB.


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: 24145 Défis: 170 Message

Citer : Posté le 12/11/2019 09:56 | #


Then I ought to look at the C.Basic code to try it out in more detail. My own tests have failed, but there might be other reasons.
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 12/11/2019 10:26 | #


There seems to be no problem for file access at present.
If possible, I would like to know more about the 35+EII problem in C.Basic.
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.
Piu58 Hors ligne Membre Points: 111 Défis: 0 Message

Citer : Posté le 12/11/2019 15:10 | #


I added a few programs to the library here. All these programs are written in c.basic:

Map projections:
https://www.planet-casio.com/Fr/programmes/programme3961-1-KARTPRJ-piu58-cours-physique.html

Diffraction at a slit:
https://www.planet-casio.com/Fr/programmes/programme3959-1-DIFFSLIT-piu58-cours-physique.html

How long can a conspiracy kept sectret (moon hoax):
https://www.planet-casio.com/Fr/programmes/programme3960-1-moonhoax-piu58-cours-maths_mathematiques.html

Gamma function:
https://www.planet-casio.com/Fr/programmes/programme3958-1-gamma-function-piu58-cours-maths_mathematiques.html

I like the proram library here, thank you for providing.
CG20, fx-9860G
Shadow15510 En ligne Administrateur Points: 5496 Défis: 18 Message

Citer : Posté le 12/11/2019 18:24 | #


I have an idea a feature ! It's possible to call a program with Prog by a string ? Such as :
"PROG1"→Str 1
Prog Str 1

And the program named PROG1 was executed…
"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

Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 12/11/2019 19:38 | #


@Sentaro21: Is it possible to send a list from a g90 to a g35 tweakée using the Send() and Receive() commands ? Because I try this and I get a Type Mismatch ERR ...
Lightmare Hors ligne Membre de CreativeCalc Points: 690 Défis: 0 Message

Citer : Posté le 12/11/2019 20:27 | #


@Disperseur : you can do it like this :

{...}->List 1   // sending program
Send(List 1)



Receive(List 1) //receiving program

NOTE : with Receive command, you must use the same format or variable than the sent one.
example : here i sent the List 1, so the receiving program must specify that it receives the List 1. It won't work if I write Receive(List 2) when I wrote Send(List 1)
"Quand je dis à la cour : "Sautez ! ", tout le monde me demande "jusqu'où ?" "
Dijkstra - The Witcher
Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 12/11/2019 20:41 | #


Nope, I always gets the same "Type Mismatch ERR"...
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 12/11/2019 21:22 | #


J'ai réessayé du coté du multi , et je vous promet un truc énorme !

Ajouté le 12/11/2019 à 21:26 :
Shadow15510 a écrit :
I have an idea a feature ! It's possible to call a program with Prog by a string ? Such as :
"PROG1"→Str 1
Prog Str 1

And the program named PROG1 was executed…


C'est ce que j'ai proposé .
Sentaro21 a écrit :
Prog command is a specification that cannot use string variables in Prog command.

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


Mrvoxy Invité

Citer : Posté le 12/11/2019 23:39 | #


I have a suggestion for C.Basic:
When using the mini font, and scrolling through a program in edit mode, when the blinking cursor moves to a new location it is always set to first be off before it goes on. This makes it impossible to see where the cursor is when moving it rapidly.

Can a change be made where the blinking cursor will first be on, and then off, so even while moving it is easy to see?

This can also be useful in standard font, but it is less of a problem.

Thank you, sentaro21, for this amazing program.
Redcmd Hors ligne Membre Points: 380 Défis: 7 Message

Citer : Posté le 12/11/2019 23:41 | #


When the cusor moves, reset the blinking timer to on


Mrvoxy Invité

Citer : Posté le 13/11/2019 01:23 | #


Yes, that is what I would like
Your way of saying it is much clearer
There is no way to make the cursor behave that way right now in version 2.35, correct?
Précédente 1, 2, 3 ··· 10 ··· 16, 17, 18, 19, 20, 21, 22 ··· 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 104 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