Forums Casio - Projets de programmation

Index du Forum > Projets de programmation > C.Basic Projets
Sentaro21
Hors ligne
Membre
Points: 152
Défis: 0
Message
Posté le 30/04/2017 11:08

C.Basic Projets :

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)


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 beta version of C.Basic 1.89beta for Graph 35+USB/75/85/95 (SD) : https://pm.matrix.jp/CB/CBASIC189beta.zip (updated 9/12/2018)

This is the latest alpha version of C.Basic for Graph90+E/fx-CG10/20/50:
https://pm.matrix.jp/CB/CBASICCG062.zip (updated 9/12/2018)

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



Lightmare
Hors ligne
Membre de CreativeCalc
Points: 318
Défis: 0
Message
Dernier message de la page précédente :Posté le 26/11/2018 08:47 |
hi sentaro ! i did what you said, but the problem persists...
Also, the command "DispVram" sometimes needs a -Disp- command to be executed.
Don't be sorry ! i'm glad to help your project !
----------------------------------
While 1
WhileEnd

une boucle encore plus optimisée que celle de Kikoodx



Pages: Précédente | 1, 2, 3, 4, 5

Sentaro21
Hors ligne
Membre
Points: 152
Défis: 0
Message
Citer : Posté le 26/11/2018 09:08 | #
Hi,
Thanks very much for your help.
I'm sorry not to solve the problem.
Could you show me the program that the error occurs?

About _DispVram probrem,
Is there ':' after "_DispVram"?
Drak
Hors ligne
Rédacteur
Points: 1917
Défis: 38
Message
Citer : Posté le 26/11/2018 19:13 | #
@Sentaro21

Your super program helped the debugging of the string function very much.

Yeah, I can imagine that, I used the strings so much in my game, in many ways !
----------------------------------
Eon the Dragon : version 1.2
Let's have a look!
Marre de ces RPGs qui t'imposent des classes, des compétences et des sorts ? Crée tes propres capacités sur Eon the Dragon ! Des monstres, des dragons et des combats aussi épiques que difficiles t'attendent !
Un RPG unique et immense t'attend ! Joue dès maintenant à Aventura, le Royaume Poudingue !
Vous aussi, soyez swag et rejoignez Planète Casio !
Lightmare
Hors ligne
Membre de CreativeCalc
Points: 318
Défis: 0
Message
Citer : Posté le 27/11/2018 20:37 | # | Fichier joint
hey ! i've downloaded the 1.88 version, and all is ok with the subprogram calling !
but the DispVram problem is here...

so i put the prog in this comment.
to play, execute TEST, the problem is on the first DispVram command ( there is a ◢ just after, and i tested to remove it, but the map is not correctly loaded...)
----------------------------------
While 1
WhileEnd

une boucle encore plus optimisée que celle de Kikoodx
Sentaro21
Hors ligne
Membre
Points: 152
Défis: 0
Message
Citer : Posté le 28/11/2018 02:11 | #
@Drak
Your technique to use string function is splendid!!
You showed me possibility of Casio Basic.


@Lightmare
Thanks for download and showing the program.
When I looked at your program I realized what was causing it.
It is Cls command problem.

Top of Cls command of your program do not work first.
When the graphics command of genuine Casio Basic (Plot or Line or StoPict etc..) were executed, Cls work for the first time.
The MonochromeLib command works regardless of specifications of genuine Casio Basic.
Therefore Cls worked for StoPict command run time, and the graphics screen was cleared.

The solution to problem is here.
Please use Screen.G instead of Cls.
Screen command is to change the graphics screen mode.
from this the ML command works on the graphics screen.
Lightmare
Hors ligne
Membre de CreativeCalc
Points: 318
Défis: 0
Message
Citer : Posté le 28/11/2018 07:00 | #
wow ! thanks ! so, no more problems ! all is fine !

Ajouté le 01/12/2018 à 18:26 :
hi !
this time, no more problems : i have a question. How i can interrupt thé execution of Receive() command ? i read the manual, but nothing seems explain this point...
----------------------------------
While 1
WhileEnd

une boucle encore plus optimisée que celle de Kikoodx
Sentaro21
Hors ligne
Membre
Points: 152
Défis: 0
Message
Citer : Posté le 02/12/2018 07:46 | #
Hi
Sorry, only [AC]break has the interruption of the serial command.
and so,
I added the option which it could interrupt with {EXIT]key.
Please try this.

https://pm.matrix.jp/CB/CBASIC188beta2.zip
-Added interrupt option of serial command.
(format) Send( data [,baudrate][,enable_exit])
(format) Recv( data [,baudrate][,enable_exit])
(format) OpenComport38K[,baudrate][,transfermode][,enable_exit]
[baudrate]: 0=300, 1=600, 2=1200, 3=2400, 4=4800, 5=9600, 6=19200, 7=38400, 8=57600, 9=115200 baud
default baudrate is 38400
[transfermode]: 0:binary data transfer mode 1:necessary to match data type (default)
When OpenComport38K with [transfermode:0]option, Send38K/Receive38k is binary data transfer.
[enable_exit]: 0:not interrupt 1:interrupt

(example) Send(A,,1)
(example) Recv(A,,1)
[EXIT] interrupt enable.



As for 0.61 of CG version, a bug was found in the string processing.
Please use hidden RAM by setup in Graph90+E/CG50.

Please use 0.60 in CG10/20.
https://pm.matrix.jp/CB/CBASICCG060.zip
Wait a minute until fix it.

Lightmare
Hors ligne
Membre de CreativeCalc
Points: 318
Défis: 0
Message
Citer : Posté le 03/12/2018 20:37 | # | Fichier joint
Sorry for the late reply : it works very well i made an "advanced" chat between 2 calculators with nicknames, banned words ( with a private joke between me and some friends ), some commands like /ban or /pseudo

i put the file in the comment for insterested people
----------------------------------
While 1
WhileEnd

une boucle encore plus optimisée que celle de Kikoodx
Sentaro21
Hors ligne
Membre
Points: 152
Défis: 0
Message
Citer : Posté le 04/12/2018 11:00 | #
It is very interesting.
I'm happy to work well.
This is the first serial communication application of C.Basic.
Thanks very much !

Ajouté le 09/12/2018 à 10:27 :
Hi,
Here is new update version.
(neary 1.88beta2)
https://pm.matrix.jp/CB/CBASIC189beta.zip


for CG10/20/50/Graph90+E version.
https://pm.matrix.jp/CB/CBASICCG062.zip
-Fixed strings/Mat/List bug of CG10/20.

-Changed specification of the status area display as much as possible.
It is the status display mode at the start of program,
It becomes the status no-display mode when use drawing command in the status area.
It return to the status display mode again when use PutDispDD command.

-Added interrupt option of serial command.
(format) Send( data [,baudrate][,enable_exit])
(format) Recv( data [,baudrate][,enable_exit])
(format) OpenComport38K[,baudrate][,transfermode][,enable_exit]
[baudrate]: 0=300, 1=600, 2=1200, 3=2400, 4=4800, 5=9600, 6=19200, 7=38400, 8=57600, 9=115200 baud
default baudrate is 38400
[transfermode]: 0:binary data transfer mode 1:necessary to match data type (default)
When OpenComport38K with [transfermode:0]option, Send38K/Receive38k is binary data transfer.
[enable_exit]: 0:not interrupt 1:interrupt

(example) Send(A,,1)
(example) Recv(A,,1)
[EXIT] interrupt enable.


@Ne0tu's games came to work by this update in CG10/20.
Lightmare
Hors ligne
Membre de CreativeCalc
Points: 318
Défis: 0
Message
Citer : Posté le 09/12/2018 10:46 | #
Hey !
This time i explored possibilities of matrix commands ! i saw that it's not possible to remove/add columns or lines to a matrix with C.basic, but we can do it in genuine casio basic.
Also is there a way to save data ( like player profile ) in a list even if we restart C.Basic ? Because at the starting of C.Basic, all the matrices and lists are deleted.
----------------------------------
While 1
WhileEnd

une boucle encore plus optimisée que celle de Kikoodx
Lephenixnoir
Hors ligne
Administrateur
Points: 13069
Défis: 136
Message
Citer : Posté le 09/12/2018 10:48 | #
Are you sure we can do this is Casio Basic? Adding rows at the end is certainly possible, but I remember from the time I wrote my small computer algebra entry for the CPC that you can't remove rows in any possible way without reconstructing the matrix.
----------------------------------
Rise.
Lightmare
Hors ligne
Membre de CreativeCalc
Points: 318
Défis: 0
Message
Citer : Posté le 09/12/2018 10:53 | #
in genuine casio basic, we can't edit matrix size, but we can do it manually ( RUN -> Mat -> select an existing matrix -> ROW -> ADD/DEL/INS )
----------------------------------
While 1
WhileEnd

une boucle encore plus optimisée que celle de Kikoodx
Sentaro21
Hors ligne
Membre
Points: 152
Défis: 0
Message
Citer : Posté le 09/12/2018 12:46 | #
Lightmare a écrit :
This time i explored possibilities of matrix commands ! i saw that it's not possible to remove/add columns or lines to a matrix with C.basic, but we can do it in genuine casio basic.

Sorry, there is no functions.
In the program,
Please use Mat->List(,List->Mat(,Agument( command.

Lightmare a écrit :
Also is there a way to save data ( like player profile ) in a list even if we restart C.Basic ? Because at the starting of C.Basic, all the matrices and lists are deleted.

It uses Save/Load( command.
For example,when you save/load List 1.(number of element is 10)
Save "SAVEDATA",List 1

"SAVEDATA.bin" is made in the current folder.

If IsExist("SAVEDATA"):Then
  10->Dim List 1
  Load("SAVEDATA")->List 1
IfEnd

load List 1 data from "SAVEDATA.bin"

Save/Load command is used by the following programs ported to C.Basic

Ice slider (@Ne0tux)
https://pm.matrix.jp/CB/CB_IceSlider.zip
Clonelab (@Ne0tux)
https://pm.matrix.jp/CB/CB_Clonlab.zip
Arkenstone (@Ne0tux)
https://pm.matrix.jp/CB/CB_Arkenstone.zip

TokiTori (@Riptor)
https://pm.matrix.jp/CB/CB_Tokitori.zip

Aventura, le Royaume Poudingue (@Drak)
https://pm.matrix.jp/CB/CB_Aventura.zip

Ajouté le 09/12/2018 à 13:35 :
@Lephenixnoir
I tried your very interesting "Formel" .
I found the bug of the Seq command in C.Basic.
I'll checking it and fix bug.
Lephenixnoir
Hors ligne
Administrateur
Points: 13069
Défis: 136
Message
Citer : Posté le 09/12/2018 19:25 | #
Trying many programs is the key! Thanks for using Formel and good luck finding the problem!
----------------------------------
Rise.

Pages: Précédente | 1, 2, 3, 4, 5

Index du Forum > Projets de programmation > C.Basic Projets

Planète Casio v42 © créé par Neuronix et Muelsaco 2004 - 2018 | Il y a 28 connectés | Nous contacter | Qui sommes-nous ? | Licences et remerciements

Planète Casio est un site communautaire indépendant, géré bénévolement et n'est donc pas affilié à Casio | Toute reproduction de Planète Casio, même partielle, est interdite
Les fichiers, programmes et autres publications présents sur Planète Casio restent la propriété de leurs auteurs respectifs et peuvent être soumis à des licences ou des copyrights.
CASIO est une marque déposée par CASIO Computer Co., Ltd