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 ··· 15, 16, 17, 18, 19, 20, 21 ··· 30, 31, 32 Suivante
Kikoodx Hors ligne Ancien labélisateur Points: 3011 Défis: 11 Message

Citer : Posté le 10/11/2019 14:39 | #


Disperseur a écrit :
@CaptainLuigi: Tu veux avoir plus de possibilités et quitter les restrictions du Basic en gardant une certaine simplicité de programmation ? Apprends le python

En gardant à l'esprit que le Python de Casio est plus lent que C.Basic, et qu'on peut pas dire qu'il soit optimal pour faire des jeux.
ouais ouais
Disperseur Hors ligne Membre Points: 1830 Défis: 1 Message

Citer : Posté le 10/11/2019 14:39 | #


Oui c'est sur, mais je fonde de nombreux espoirs sur l'arrivée du module graphique de Casio sur python
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

Citer : Posté le 10/11/2019 16:09 | #


@Sentaro21 , is there any commands that list files ? ( I'm trying to port the tree command , for my Linux port )
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
Palpatine_78 Hors ligne Membre Points: 264 Défis: 0 Message

Citer : Posté le 10/11/2019 16:32 | #


38 times faster on CG-50!!!
Massena Hors ligne Ancien rédacteur Points: 2219 Défis: 11 Message

Citer : Posté le 10/11/2019 17:52 | #


Maybe i'm going to create a new game with C.Basic (Maybe Evocalc ????).
That's really seem useful, i will make some test
Lephenixnoir En ligne Administrateur Points: 24232 Défis: 170 Message

Citer : Posté le 10/11/2019 17:53 | #


Ooooh did I just read Evocalc ? :o
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Kikoodx Hors ligne Ancien labélisateur Points: 3011 Défis: 11 Message

Citer : Posté le 10/11/2019 17:53 | #


Tu as teasé Evocalc Massena, c'est trop tard pour reculer maintenant.
ouais ouais
Massena Hors ligne Ancien rédacteur Points: 2219 Défis: 11 Message

Citer : Posté le 10/11/2019 18:07 | #


Holy shit.
Sentaro21 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 11/11/2019 02:32 | #


Thank you everyone!

@Captainluigi
Wildcard "*" can be used as an argument for IsExist command.
The result is returned to Mat Ans.

' listing file list
IsExist("*.g1m")
Mat Ans->Mat A
For 1->I To RowSize(A)
  Disp $Mat A[I]
Next

How to display character string in [SHIFT]+[F2] matrix display.
After selecting the matrix, press [VARS] to change to the character string display.
[OPTN] changes to the simple graphic editor.


@Disperseur
@Kikoodx
CASIO's official Python is for educational purposes, but C.Basic does not have that limitation.
However adding the graphics module for Python is interesting.
I hope that it won't be a very slow implementation like Basic Casio.


@Massena
In C.Basic, the memory capacity is increased and more faster while maintaining compatibility with Basic Casio.
I expect your new C.Basic application.


@Palpatine_78
Using C.Basic specific features will make it even faster.

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 11/11/2019 07:08 | #


Dear Sentaro, the Casio forum seems to have a problem so I answer here.

I tried the new version with the improved editing. It does not work fully.

If I change something, exit the program and edit it again, the cursor position is restored.

If I exit the editor and run EXE the cursor position is lost and I get the first line first position.

If I stop a running (and perhaps erroneous program), I enter the debugger first. Here I get the position where I stopped the program (which is correct). When I exit the debugger I expect to come to the cursor position where I left the editor last. This is the last place I changed something and the most probable place to change further.

~

I hope it is acceptable that I write in English here. My French is very rusty.
CG20, fx-9860G
Sentaro21 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 11/11/2019 07:38 | #


Sorry, maybe I misinterpreted the specification.
The current specification is that the cursor position returns to the beginning after program execution.
It means that it is better to return to the previous place always?
I will fix it.

Ajouté le 11/11/2019 à 08:50 :
Fix completed.
Even after the program is executed, the cursor returns to the previous position.

2.34 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC234beta.zip (re-uploaded)

1.34 beta for CG10/20/50/Graph90+E.
https://pm.matrix.jp/CB/CBASICCG134beta.zip (re-uploaded)

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

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


I hope it is acceptable that I write in English here. My French is very rusty.

Yes, sure. The help and fun are for everyone!
Mon graphe (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Piu58 Hors ligne Membre Points: 111 Défis: 0 Message

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


That was fast!

Much better now, thank you.
CG20, fx-9860G
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

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


Sentaro21 a écrit :
@Captainluigi
Wildcard "*" can be used as an argument for IsExist command.
The result is returned to Mat Ans.

' listing file list
IsExist("*.g1m")
Mat Ans->Mat A
For 1->I To RowSize(A)
Disp $Mat A
Next

How to display character string in [SHIFT]+[F2] matrix display.
After selecting the matrix, press [VARS] to change to the character string display.
[OPTN] changes to the simple graphic editor.

Thanks a lot , I didn't think it was so easy !
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
Massena Hors ligne Ancien rédacteur Points: 2219 Défis: 11 Message

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


I don't understand very well...
The _BMP() function can have in input a .bmp file or it must have in input a matrix ?
Sentaro21 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 11/11/2019 10:39 | #


@Massena
The _Bmp command provides the same functionality as ML_bmp of MonochromeLib.
https://wiki.planet-casio.com/fr/MonochromeLib

' refer to C.Basic_sample\ML_sample\BMP.txt
[[60,126,251,253,253,255,126,60]]->Mat B.B

Screen.G
_ClrVram

_Rectangle 1,11,12,42,0,(-)1,1
_Bmp8 &Mat B,3,13,O
_Bmp8 &Mat B,3,23,A
_Bmp8 &Mat B,3,33,X

_Bmp8 &Mat B,15,13,O,C
_Bmp8 &Mat B,15,23,A,C
_Bmp8 &Mat B,15,33,X,C

PutDispDD


If you use a BMP file, load it into the matrix with the BmpLoad command.
Please refer to sample program of C.Basic_sample\BMP in zip.


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.
Massena Hors ligne Ancien rédacteur Points: 2219 Défis: 11 Message

Citer : Posté le 11/11/2019 10:41 | #


Ok, thanks !

Ajouté le 11/11/2019 à 10:54 :
Can I make a suggestion ?
I think a function to import List from the main storage may be very useful, because sometimes we can't initialize List directly in the app (Like with Picross, because data is stocked in List transmitted with the programm)
Sentaro21 Hors ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 11/11/2019 11:56 | # | Fichier joint


Thanks for your suggestion.

List data can be initialized by a program.
What Basic Casio was unable to do due to program size limitations,
C.Basic is possible because of the large storage.
{1,2,3,4,5}->List 1
{3,4,5,6,7}->List 2


Or it is a method with another data.
I tried to work Picross in C.Basic.
Converted List data to CSV file by 35+EII.
LLOADA.g1m is a program that inputs it to the C.Basic List.

[Fichier joint] PicrossCB.zip

After transferring the entire folder to storage memory,
After running LLOADA.g1m, Run -PICROSS.g1m.

' LLOADA.g1m
ClrList
ClrMat
'#_Str __<r>_,5,1000
For 1->F To 6
  ClrMat <r>
  "FILE"+ToStr(F)+".CSV"->Str 1
  Locate 1,1,Str 1+"     "
  If IsExist(Str 1)
    File F
    Load(Str 1)->Str 2
    StrLen(Str 2)->L
    1->S
    1->N
    1->P
    
    Do
      '_Locate _11,1,N
      StrSrc(Str 2,StrChar(13),P)->S
      StrMid(Str 2,P,S-P)+","->Str 3
      1->Q
      For 1->I To 6
        StrSrc(Str 3,",",Q)->T
        If T>Q
          StrMid(Str 3,Q,T-Q)->Str 4
          Exp(Str 4)->List I[N]
        Else
        IfEnd
        T+1->Q
      Next
      
      S+1->P
      N+1->N
    LpWhile S<L
  IfEnd
Next
"Done"

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.
Massena Hors ligne Ancien rédacteur Points: 2219 Défis: 11 Message

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


Thanks
I'm going to look at the programm.
Captainluigi Hors ligne Membre Points: 815 Défis: 1 Message

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


@Sentaro21 , i am one big user of file commands, and i found one very creepy bug that corrupt a bit the files ( I have one 1-week old version of C.basic , I don't think that's why I have this bug ) .
So if I save any file loaded or created with C.Basic , the save add one byte at the end of the file , and I can't open this saved file in : for example : Edit , CasioPython , it says that's one binary file.
Any fix to this ?
( Because it corrupts all copied file with my Unix Calbian port ( mv , cp , touch commands )
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: 24232 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 (11 Avril): ((Rogue Life || HH2) ; PythonExtra ; serial gint ; Boson X ; passe gint 3 ; ...) || (shoutbox v5 ; v5)
Précédente 1, 2, 3 ··· 10 ··· 15, 16, 17, 18, 19, 20, 21 ··· 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 126 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