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
Sentaro21Hors ligneMembrePoints: 642 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

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.40 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC240beta.zip (updated 6/12/2019)

This is the latest version of C.BasicCG 1.40 beta for Graph90+E/fx-CG10/20/50:
https://pm.matrix.jp/CB/CBASICCG140beta.zip (updated 6/12/2019)

C.Basic manuals
https://gitlab.com/sentaro21/cbasic

Currently C.Basic exists thanks to this site.
Thank you very much.


Pages : Précédente1 ... , 14, 15, 16, 17, 18, 19, 20, 21, 22Suivante
LephenixnoirHors ligneAdministrateurPoints: 16442 Défis: 140 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.
CaptainluigiHors ligneMembrePoints: 675 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
Jouez à Mario sans arrêt sur votre Casio !
Ma chaine YouTube : Tutodev
Cliquez pour découvrir
Cliquez pour recouvrir
City Heroes
Piano Casio
Micro GIMP
Merci d'avoir lu.
De rien !
Super !

M'en fout
C'est pas très bien ...
LephenixnoirHors ligneAdministrateurPoints: 16442 Défis: 140 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.
Sentaro21Hors ligneMembrePoints: 642 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.
LephenixnoirHors ligneAdministrateurPoints: 16442 Défis: 140 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.
Sentaro21Hors ligneMembrePoints: 642 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.
LephenixnoirHors ligneAdministrateurPoints: 16442 Défis: 140 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.
Sentaro21Hors ligneMembrePoints: 642 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.
LephenixnoirHors ligneAdministrateurPoints: 16442 Défis: 140 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?
Sentaro21Hors ligneMembrePoints: 642 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.
LephenixnoirHors ligneAdministrateurPoints: 16442 Défis: 140 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.
Sentaro21Hors ligneMembrePoints: 642 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.
Piu58Hors ligneMembrePoints: 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
Shadow15510Hors ligneAdministrateurPoints: 4005 Défis: 16 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

Moral
   95%
DisperseurHors ligneMembrePoints: 1703 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 ...
Mes meilleurs jeux
N'hésitez pas, notez !

Jeux BasicCasio / CBasicCasio:
-World Tank War II
-Apollo 11
-GeoGraph ! Élu Jeu du Mois de Mars 2019 !
Jeux C:
-Planétarium 2 ! Chef d'Oeuvre !


√(2+2-2+2-2+2+2-2-2-2) = 0
LightmareHors ligneMembre de CreativeCalcPoints: 530 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)
42
DisperseurHors ligneMembrePoints: 1703 Défis: 1 Message

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


Nope, I always gets the same "Type Mismatch ERR"...
Mes meilleurs jeux
N'hésitez pas, notez !

Jeux BasicCasio / CBasicCasio:
-World Tank War II
-Apollo 11
-GeoGraph ! Élu Jeu du Mois de Mars 2019 !
Jeux C:
-Planétarium 2 ! Chef d'Oeuvre !


√(2+2-2+2-2+2+2-2-2-2) = 0
CaptainluigiHors ligneMembrePoints: 675 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.

Jouez à Mario sans arrêt sur votre Casio !
Ma chaine YouTube : Tutodev
Cliquez pour découvrir
Cliquez pour recouvrir
City Heroes
Piano Casio
Micro GIMP
Merci d'avoir lu.
De rien !
Super !

M'en fout
C'est pas très bien ...
Mrvoxy
Statut : 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.
RedcmdHors ligneMembrePoints: 201 Défis: 5 Message

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


When the cusor moves, reset the blinking timer to on
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Mrvoxy
Statut : 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?
Pages : Précédente1 ... , 14, 15, 16, 17, 18, 19, 20, 21, 22Suivante

Planète Casio v42 © créé par Neuronix et Muelsaco 2004 - 2019 | Il y a 51 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