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 ··· 20, 21, 22, 23, 24, 25, 26 ··· 30, 31, 32 Suivante
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

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


Thanks for bug report!

This program example seems to work like Basic Casio.
ViewWindow 1,127,0,1,63,0
For 0->A To 30
Cls
Graph(X,Y)=(2A{1,1,2,2},1A{1,2,1,2})
Next

It is slower than Basic Casio.
I think MultiDrawstat's compatibility is still insufficient.


Could you please show the program sample which occurs 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.
Lephenixnoir En ligne Administrateur Points: 24145 Défis: 170 Message

Citer : Posté le 23/12/2019 07:20 | #


I don't know exactly about the wonders of Multi DrawStat. However, the command Arcky showed just looks like a "normal" Multi DrawStat. The fact that there is a multiplication by a number and a variable should not affect the semantics:

First you compute the list {VLx} for every x in the first list.
Then you compute the list {VMx} for every x in the second list.
Then it is normal Multi DrawStat.

If my explanation is correct but the picture is not, then either C.Basic does not peform the multiplication as expected (unlikely) or the line rendering algorithm is not exactly as in Basic Casio.

When working on reproducing the turtle program of the fx-92 SC+, I found that there are multiple parameters in the line rendering algorithm which affect the output in several ways and are not easy to determine. Sentaro, have you checked that your lines are rendered exacly as in Basic Casio?
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 23/12/2019 08:42 | #


Thanks!
Sorry, sample program was not MultiDrawStat.

I don't think there is a problem with the List operation,
however there may be a problem with the processing of "Graph(X,Y)=”with T.(So-called MultiDrawStat.)
It supported the addition and subtraction, but the multiplication seems to have a problem.
I will fix it soon because it is a fatal bug.

related link
https://www.planet-casio.com/Fr/forums/topic14097-2--Tutoriel--Le-Multi-DrawStat.html
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.
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 23/12/2019 13:45 | # | Fichier joint


I will upload the bug fix version of MultiDrawStat.
This is not an officially updated version yet.
The following syntax allows for fast execution.
Other syntaxes are slower.
Graph(X,Y)=({...},{...})
Graph(X,Y)=(A+{...},C+{...})
Graph(X,Y)=(B{...},D{...})
Graph(X,Y)=(B*{...},D*{...})
Graph(X,Y)=(A+B{...},C+D{...})
Graph(X,Y)=(A+B*{...},C+D*{...})

A,B:unary.

[Fichier joint]C.Basic 2.41 beta test 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.
Calcloverhk En ligne Membre Points: 333 Défis: 10 Message

Citer : Posté le 23/12/2019 15:17 | #


Hi all C.Basic enthusiasts

Progress: https://www.planet-casio.com/Fr/forums/topic14738-22-c-basic-projets.html#172331

The first official version of Guide_EN has been released.
DOCX: https://drive.google.com/file/d/17IJQ3JAWuB-9EfSzBPPSoGmkDHmWHDVU/view?usp=sharing
PDF: https://drive.google.com/open?id=1iCR7MC7SNo6U2aPKtaY3b11mTFVmz_3e

@Sentaro21, @Lephenixnoir
You can start the translation work.

Cheers
CalcLoverHK
C.Basic Wiki Project progress as of 2024/2/12
   30%


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

Citer : Posté le 24/12/2019 04:14 | #


Congratulations on the release of Guide_EN.
I'm working on the Japanese version,
then work on the French 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.
Calcloverhk En ligne Membre Points: 333 Défis: 10 Message

Citer : Posté le 24/12/2019 15:29 | # | Fichier joint


Hi Sentaro21

Thanks for help as always.
But I will still change something big such as splitting Guide_EN and adding more examples (this version still lacks some examples in command reference), can you handle it?

Cheers
CalcLoverHK
-------------------------------------
@Sentaro21, @Lephenixnoir
Here is the splitted version of Guide_EN for CG: GuideCG_EN.
It is attached above.
(It is in .zip format because the system does not allow me to attach .docx file)

I recommended you translate the content based on this file in CG manual.
For FX series, I will release FX manual later for you. Please wait.
C.Basic Wiki Project progress as of 2024/2/12
   30%


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

Citer : Posté le 25/12/2019 01:04 | #


Ok! I'll add examples.
Thanks!

Ajouté le 28/12/2019 à 08:08 :
Sorry for late update.
Support for packed g1m/g3m will be available in the next version or later.
I'll fixes this year’s known bugs this year.

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

1.41 beta for CG10/20/50/Graph90+E.
https://pm.matrix.jp/CB/CBASICCG141beta.zip
-Fixed the bug that the alpha mode icon was not displayed when line input mode.
-Includes the font manager and system manager of the system operation application by Colon.
(They are in the C.Basic_application folder in zip.)
(*These programs are password protected to prevent accidental editing of the source code due to heavy use of syscalls.)
(*You are free to modify the source code, but please do so at your own risk.)

---Common update---
-Fixed the "Graph (X,Y)=(" command bug that did not work when multiplying List with T as argument.
(Example) Graph (X,Y)=(2*{1T,2T}, 3*{3T,4T})
-Fixed "ExitDM PopUp" bug that pop-up did not appear when exiting the debug mode and re-executing.
-Fixed the bug that garbage might be attached at the end of the program when the indent function was enabled.
-Added integration function based on Gauss-Kronrod quadrature. (acapde's program has been implemented.)
https://community.casiocalc.org/topic/7637-cbasic-international-release/page-14#entry62978

(integration function) [OPTN]-[F4](CALC)-[F2](∫dx)
(format) ∫( f(x), lower limit, upper limit [,tol])
[,tol] 0<tol<1 this value is tolerance.
1<tol this valee is a significant digit.
default [tol] is 10.
(example) ∫(2X^2+3X+4,1,5)
result is 134.6666667
(example) ∫(sin X*cos X,0,1)
result is 0.354036091
(example) ∫(cos ln X,0,1)
"Not met Accuracy" pop up.
(example) ∫(cos ln X,0,1,5)
result is 0.5

Ajouté le 29/12/2019 à 07:02 :
As usual, bugs in new features have been found, so I'll fix and re-upload.

2.41 beta for for 9860G/GII series/Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC241beta.zip (re--uploaded)

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

-Fixed integration calculation bug that sign of result is not correct when lower is greater than upper.
-Fixed integration calculation bug that X variable is changed after execution.
-Changed "Graph (X,Y)=(" specification that the screen is updated during command execution.
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 En ligne Membre Points: 333 Défis: 10 Message

Citer : Posté le 31/12/2019 11:59 | #


Hi Sentaro21

Yes! Finally the calculus function made possible in C.Basic.
Big thanks to acapde (UCF member) for the program!

Cheers
CalcLoverHK

Ajouté le 01/01/2020 à 07:40 :
Bonne année!/Happy New Year!
I hope C.Basic is alive and active as always
(And wish I can use C.Basic more frequently in 2020 )
C.Basic Wiki Project progress as of 2024/2/12
   30%


Lephenixnoir En ligne Administrateur Points: 24145 Défis: 170 Message

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


C.Basic did an excellent job in 2019. I can only imagine better for 2020. Good luck!
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 01/01/2020 12:01 | #


Happy new year.
Thanks to those who have used C.Basic and those who are interested, it has evolved steadily.
It may be little by little, I’ll intend to evolve C.Basic again this year.
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 01/01/2020 12:30 | #


Happy New Year !

Keep up the good work !
Casio Basic Web Interpreter, c'était le basic Casio dans votre navigateur web !
Sentaro21 En ligne Membre Points: 877 Défis: 0 Message

Citer : Posté le 01/01/2020 12:47 | #


Thanks!!
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: 5496 Défis: 18 Message

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


Hey, I started a new project : RimWold on CG-20 I use C.Basic for this game, and I have some problems… ^^'
I don't know how I can draw a matrice on the screen with colors ? And how I can change the font ? I have the sample font bmp's file, I have turned on the option Enable ExFont, I have write SetFont 1 in my program, but it doesn't work…
"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 02/01/2020 03:53 | #


@Shadow15510
Thanks for starting new game for C.Basic CG!

About drawing bitmap from matrices for CG version,
Monochrome drawing by 1-bit matrices and 16-bit color drawing by 16-bit matrices are possible.
16-bit matrices cannot change color when drawing.
In that case, modify the matrices data to change the color.
Since the 1-bit matrix is a mono color, the color can be changed using the conventional syntax.
{...}->Mat A.P  // 1bit matrices
Red DrawMat Mat A, X, Y, dx, dy
If you use a BMP file, create it in 1-bit or 16-bit color.

About changing external font,
Load the 1-bit BMP format font file renamed to the following file name in the current folder.
"@LFONTA.bmp" //standard fixed pitch font (24dot height)
"@MFONTA.bmp" //mini proportional font (18dot height)
When the external font is enabled by SetFont 1, it is switched to the external font.
SetFont 1


Or,BMP files with arbitrary file names are also possible.
In that case, specify the file name in "BmpLoad(@" command.
SetFont 1
BmpLoad(@AL"@LFONTA1")
BmpLoad(@AM"@MFONTA1")


The following programs are available for font files.
FEINT35C.g3m can be used for the font editor.(FontEdit folder in zip)
FFM0123.g3m can be used for the managing of font files.(C.Basic_application folder 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.
Shadow15510 Hors ligne Administrateur Points: 5496 Défis: 18 Message

Citer : Posté le 02/01/2020 08:30 | #


I'm really glad to program with C.Basic !

Ok ! Thank you ! The external font fully work now !

But for the bmp, I didn't all understand… I would like to draw a sprite 16-bit color on the screen and this sprite is in a matrice. So for the 16-bit color, what is the format of the matrice ? And what numbers match with what colors ?
"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 02/01/2020 09:02 | #


Thanks!

To draw 16-bit color sprites, use a word-type matrix.
The structure of a 16-bit color value has the following bit configuration.
RRRRR GGGGGG BBBBB
Upper  5 bits: Red   (0~31)
Middle 6 bits: green (0~63)
Lower  5 bits; blue  (0~31)


A 16-bit color value can be specified as a numerical value in the range of 0 to 255 for each RGB by using the RGB() command.
RGB(0,0,0)        // black  0x0000(hex)     0(double)     0(word)
RGB(255,255,255)  // white  0xFFFF(hex) 65535(double)    -1(word)
RGB(255,0,0)      // red    0xF800(hex) 63488(double) -2048(word)
RGB(0,255,0)      // green  0x07E0(hex)  2016(double)  2016(word)
RGB(0,0,255)      // blue   0x001F(hex)    31(double)    31(word)

Furthermore, it is also possible to specify the color in HSV () and HSL ().

To display a 16-bit matrix sprite image,
Pressing [OPTN] in the matrix data screen switches to the simple dot editor mode.

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: 5496 Défis: 18 Message

Citer : Posté le 02/01/2020 10:10 | #


Yeah ! Ok I see ! Thank you very much !

It is possible to write : RGB(255,0,0)→Mat A[1,1] ? Or to get the hex code automatically just with the RGB parameters ? (I don't know how convert RGB code to hex )

(Mat A is word type)
"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 02/01/2020 10:31 | #


The internal data is the same for both hexadecimal and decimal.
That is a notational difference.
So this works fine.
RGB(255,0,0)->Mat A[1,1]

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: 5496 Défis: 18 Message

Citer : Posté le 02/01/2020 12:59 | #


This line RGB(255,0,0)->Mat A[1,1] draw a black pixel… I found the RGB( command on [SHIFT] [F4] [F6] [F6] [F1] [F3].

Ajouté le 02/01/2020 à 13:37 :
For my game, I have a lot of tiles… Is it possible to draw a 16-bit bmp image on the screen ? And, if yes, how I can draw it ?
"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

Calcloverhk En ligne Membre Points: 333 Défis: 10 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?
C.Basic Wiki Project progress as of 2024/2/12
   30%


Précédente 1, 2, 3 ··· 10 ··· 20, 21, 22, 23, 24, 25, 26 ··· 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 91 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