Seuls les membres ayant 30 points peuvent parler sur le chat.

Forum Casio - Projets de programmation


Index du Forum » Projets de programmation » C.Basic Projets
Sentaro21 Hors ligne Membre Points: 862 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.45 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC245beta20.zip (updated 21/5/2020)

This is the latest version of C.BasicCG 1.45 beta for Graph90+E/fx-CG10/20/50:
https://pm.matrix.jp/CB/CBASICCG145beta20.zip (updated 21/5/2020)

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 ··· 20, 21, 22, 23, 24, 25, 26 Suivante
Calcloverhk Hors ligne Membre Points: 229 Défis: 4 Message

Citer : Posté le 02/01/2020 16:09 | #


Hi Sentaro21

Sentaro21 a écrit :

(example) ∫(cos ln X,0,1)
"Not met Accuracy" pop up.



Isn't it "Not met Accuracy"?

Sentaro21 a écrit :

(example) ∫(cos ln X,0,1,5)
result is 0.5




Cheers
CalcLoverHK

Ajouté le 02/01/2020 à 16:32 :
Wait... "A="?A is not equal to "A="?()A!
@Sentaro21, what does () do?
2045, the bright or dark future to the humanity?
https://youtu.be/WY4XLDBDyuk
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 03/01/2020 03:06 | #


@Shadow15510
Sorry, the BMP files that can be used with BmpLoad/BmpSave command were either 1-bit or 24-bit format.
BmpLoad("Sprite")[,x,y]

"Sprite.bmp" must be 1-bit or 24-bit color BMP file.
It is slow to display directly from BmpLoad command, so it is recommended to read it into a matrix and display it.
Please refer to the sample in the "C.Basic_sample/BMP_sample_CG" folder in zip.


@Calcloverhk
If X is 0, the first expression evaluation resulted in "Ma Error".
I'll fix it.

Calcloverhk a écrit :
Wait... "A="?A is not equal to "A="?()A!

"A="?A is entered on the next line of the prompt string.
A=
(input area)

"A="?()A is entered right after the prompt string.
A=(input area)


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.
Shadow15510 Hors ligne Administrateur Points: 4610 Défis: 16 Message

Citer : Posté le 03/01/2020 08:09 | #


Ok, Thank you !! my bmp was in 16-bit colors ! I'll try in 24-bit But I've a question… How CG can display a 24-bit color bmp ? The screen is 16-bit color…
"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

Moral
   98%
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 03/01/2020 08:45 | #


Yes!
The BmpLoad/BmpSave commands can read and write 24-bit color BMP files.
It converts between RGB888(24-bit color) and RGB565(16-bit color of CG screen format) and treats it as 16 bit color inside 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.
Shadow15510 Hors ligne Administrateur Points: 4610 Défis: 16 Message

Citer : Posté le 03/01/2020 13:49 | #


Is there possible to load an imageand to draw just a part of this image ?
"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

Moral
   98%
Kikoodx Hors ligne Membre Points: 2150 Défis: 11 Message

Citer : Posté le 03/01/2020 14:25 | #


Shadow15510 a écrit :
Is there possible to load an imageand to draw just a part of this image ?

Once you load it in a Matrice it should be possible to split it in multiple parts, I don't know if there is a native fonction for this task though.
2+2=5
Perdu
Calcloverhk Hors ligne Membre Points: 229 Défis: 4 Message

Citer : Posté le 03/01/2020 17:48 | #


Hi Sentaro21

I noticed different behaviour between text-based and g1m/g3m-based programs. Despite the text program is converted inside (pop up "text converting..."), its speed is slower than g1m one.

Does C.Basic actually just emulate the text program, or create the temporary converted g1m file and delete when not in use?

Cheers
CalcLoverHK
2045, the bright or dark future to the humanity?
https://youtu.be/WY4XLDBDyuk
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 04/01/2020 04:28 | #


@Shadow15510
If you create a BMP file in which sprite data of the same size are arranged vertically, you can select each sprite from one image data by specifying the elements of the matrix.
For example, 10 sprites of 32x16 are stacked vertically.
Create a BMP file that is 32 width x 160 height.
BmpLoad("sample"->Mat A    // 32x160x16bit matrix
_Bmp &Mat A[0],x,y,32,16    // 1st sprite 32x16
_Bmp &Mat A[16],x,y,32,16    // 2nd sprite 32x16
_Bmp &Mat A[144],x,y,32,16    // 10th sprite 32x16

Or,
Individual sprite data can be extracted by DotPut() command.
BmpLoad("sample"->Mat A     // 32x160x16bit matrix
DotPut(Mat A[0],0,0,31,15)->Mat B      // 1st sprite -> Mat B
DotPut(Mat A[16],0,0,31,15)->Mat C     // 2nd sprite -> Mat C
DotPut(Mat A[144],0,0,31,15)->Mat D    // 10th sprite -> Mat D


When using DotPut, you can extract at any position in the matrix and at any size.
BmpLoad("sample"->Mat A    // 384x192x16bit matrix
// Extract 16x8 size from the X-Y coordinates(16,32) -> Mat B
DotPut(Mat A[32,16],0,0,15,7)->Mat B

// Extract 24x32 size from the X-Y coordinates(128,96) -> Mat C
DotPut(Mat A[96,128],0,0,23,31)->Mat C

(Note) Specifying the matrix index is the opposite of the X-Y coordinates.


@Kikoodx
Although it can be done by the above command processing,
I think that can extract from the matrix even with the existing command.


@Calcloverhk
Text files are converted before execution, so they will be delayed by that amount of time.
After conversion, it is processed in the same way as g1m/g3m format.
When saving after editing, it is converted to text again and saved.

Ajouté le 04/01/2020 à 08:36 :
Sorry,A bug was found in the "DotPut" and "DrawMat" command for 16-bit drawing.
It seems to work only that are the same size widht and height.
For now, the "_Bmp" command doesn't seem to be any problem.
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.
Calcloverhk Hors ligne Membre Points: 229 Défis: 4 Message

Citer : Posté le 04/01/2020 14:50 | #


Hi Sentaro21

No, I mean while running the program (not the time needed to convert the program), the speed of running it in text format is slower than that of in g1m/g3m format.

Cheers
CalcLoverHK

Ajouté le 04/01/2020 à 16:08 :
I tested again and it is OK now in my test. Probably my mistakes in last time.
2045, the bright or dark future to the humanity?
https://youtu.be/WY4XLDBDyuk
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 06/01/2020 10:16 | #


Here is bug fixed updated version.
Bitmap drawing bugs have been fixed.
I don't know if there is still a bug, but I'll fix it soon.

2.42 beta for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC242beta.zip

1.42 beta for CG10/20/50/Graph90+E.
https://pm.matrix.jp/CB/CBASICCG142beta.zip
-Added transparent color drawing with the following command.
_BmpZoom
_BmpRotate
_BmpZmRotate
DrawMat
DotPut
-Fixed the DrawMat command bug that 16-bit bitmap data was not drawn when the width and height were different.
-Fixed the DotPut command bug that 16-bit color drawing could not be performed with the DotPut command.

---Common update---
-Fixed the bug of ML command when there is a drawing range outside the screen.
-Fixed the bug when the integral calculation formula causes Math error.
-Changed the specification of the integration command so that the initial calculation precision is valid 5 digits and the result is not rounded.

Ajouté le 10/01/2020 à 08:04 :
Here is new updated version.

1.43 beta for CG10/20/50/Graph90+E.
https://pm.matrix.jp/CB/CBASICCG143beta.zip
-Improved 16-bit color drawing of _Bmp command and DrawMat command.
Simple 16-bit color bit map drawing without scaling is now 2x faster.
As a result of this update, the Mat data required for the DrawMat command will be changed to the type of matrix used in the _Bmp command (it is a inverse matrix).
-Fixed Graph Y=,Graph X= command bug that the first coordinate was false in g3m mode.
-Fixed the bug that new folder was not displayed after creating new folder.
-Fixed the bug that [/] remained in [F6] when renaming folders.
-Changed specification to not switch to the same mode when switching the memory mode (storage memory/main memory).
-Fixed the bug that [F6](VER) was not displayed in "Skeetch Line" in SETUP.
-Fixed the scroll bar on the variable list screen of mini font.

Ajouté le 12/01/2020 à 09:28 :
Here is little bug fixed updated version.
Same fixed as CG version.

2.43 beta for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC243beta.zip
-Changed specification to not switch to the same mode when switching the memory mode (storage memory/main memory).
-Fixed the bug that [SHIFT]+[F6](debug) failed to debug mode when "Force Return" was set in setup.
-Fixed the bug that Alias for extension variables did not cause an error.

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


@Calcloverhk
Sorry,Please wait a little longer for to support packing g1m/g3m.


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.
Calcloverhk Hors ligne Membre Points: 229 Défis: 4 Message

Citer : Posté le 12/01/2020 09:44 | #


@Sentaro21:
Does the three bugfixs also applies to CG? Then why it is reuploaded?
2045, the bright or dark future to the humanity?
https://youtu.be/WY4XLDBDyuk
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 12/01/2020 09:57 | #


Yes!
There ara same fixed.

Ajouté le 15/01/2020 à 08:56 :
-Fixed the bug that Alias for extension variables did not cause an error.
I was doing en-bug in this part.
Aliased labels and matrices no longer work.
I fixed it and uploaded it again.
Please download 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.
Calcloverhk Hors ligne Membre Points: 229 Défis: 4 Message

Citer : Posté le 17/01/2020 06:18 | #


@Sentaro21:
Is it OK to use C.Basic with Ftune/Ptune?
2045, the bright or dark future to the humanity?
https://youtu.be/WY4XLDBDyuk
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 17/01/2020 10:39 | #


Calcloverhk a écrit :
@Sentaro21:
Is it OK to use C.Basic with Ftune/Ptune?

Yes!
It will be even faster if used together. (Especially Ftune2)
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 En ligne Rédacteur Points: 1304 Défis: 6 Message

Citer : Posté le 23/01/2020 20:43 | #


Hello,
With the FX Version of C.Basic (current version), I've an issue. When I use the Stopict() command, with the S.Mem parameter at Picture mode, it make a Memory Error. I've enough memory to think that it's a bug
Also, Heap mode work but I don't want to lose my pictures. Can we do anything ?
Peace was never an option. - Untitled goose game, 2019
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 24/01/2020 11:59 | #


Thanks for bug report!
and
Sorry for the inconvenience.

Please try this updated version.

2.44 beta6 for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC244beta6.zip

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

---Common update---
-Fixed the bug that Pict file could not be saved to storage/SD. (this is 2.28 en-bug.)
-Changed spacification of the number of string variables by default to th increased to 999 by default .

-Fixed the bug that when the index start value of the matrix is 0, one more than the number set by '#Str '#Fn etc. is allocated.
-Fixed the bug that switching of current folder in setup.
-Fixed the number of digits including decimals to be no more than 16 when specifying Fix.

-Changed the specification to be possible use formulas by arguments as '#Str and '#Fn etc.
(Example) #Str <r>, N+1, A*10

-Fixed the bug that the return value was wrong when searching files with the wildcard in IsExist(.
(Example) IsExist ("*.Bmp")
If the file exists, return value is the number of files.
If the file does not exist, return value is 0.

-Added push [OPTN][VARS] key to display alias/extended variable information in the variable display screen.
-Improved the save destination selection screen when the file name has been modified.
-Added [SHIFT]+[F1][F2][F3] key to matrix/List/Vct selection.
-Fixed the bug that "%" could not be input with [ALPHA]+[(-)] when one line input mode.
-Improved the version pop-up display that added build no.
-Improved the manuals. ( "Initialization of String" and "Display: Fix / Sci / Nrm / Eng" section) ( English translation supported by Krtyski )

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 En ligne Rédacteur Points: 1304 Défis: 6 Message

Citer : Posté le 26/01/2020 19:38 | #


I re-dowloaded C.Basic for 90+e and it's still not working...
When I save a picture in S.Mem mode, it's make a Memory Error.
If you need a more detailled rapport, I will write one tomorrow
Peace was never an option. - Untitled goose game, 2019
Sentaro21 Hors ligne Membre Points: 862 Défis: 0 Message

Citer : Posté le 26/01/2020 23:54 | #


Sorry,
Currently, StoPict in g3m mode does not work.
Please try in g1m mode.

(note) Pict files are stored in the Pict folder.
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 En ligne Rédacteur Points: 1304 Défis: 6 Message

Citer : Posté le 27/01/2020 18:16 | #


Aaah, ok
Peace was never an option. - Untitled goose game, 2019
Farhi Hors ligne Membre Points: 409 Défis: 0 Message

Citer : Posté le 28/01/2020 00:31 | #


Est-ce qu'il y a une commande qui va plus vite que F-Line sur C.Basic pour tracer un trait ?
Is there a command that goes faster than F-Line on C. Basic to draw a line?
"La créativité est contagieuse faites la tourner"
Albert Einstein
Calcloverhk Hors ligne Membre Points: 229 Défis: 4 Message

Citer : Posté le 28/01/2020 00:35 | #


@Farhi:
Maybe try _Line? (MonochromeLib command)
Format: X1,Y1,X2,Y2,Color[,chance][,Width]
2045, the bright or dark future to the humanity?
https://youtu.be/WY4XLDBDyuk
Précédente 1, 2, 3 ··· 10 ··· 20, 21, 22, 23, 24, 25, 26 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
Pour coloriser votre code, cliquez ici.
Sinon cliquez sur le bouton ci-dessous.
: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 v42 © créé par Neuronix et Muelsaco 2004 - 2020 | Il y a 48 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