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: 564 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.28 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC228beta.zip (updated 10/9/2019)

This is the latest version of C.BasicCG 1.28 beta for Graph90+E/fx-CG10/20/50:
https://pm.matrix.jp/CB/CBASICCG128beta.zip (updated 10/9/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 ... , 11, 12, 13, 14, 15, 16
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

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


OK!
Is there any way to avoid memory full errors?
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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

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


Fix the bug

Don't switch between normal and C.Basic

Don't edit the program in normal basic after its been saved by C.Basic if its a multiple of 4 bytes
It has to be saved in normal basic when its a multiple of 4 bytes, then saved in C.Basic and still be on a multiple of 4 bytes - for it to break
If the program was saved in normal basic with 35 bytes (rounded to 32 or 36, IDK which way)
then changed to 36 bytes in C.Basic. If would be fine
and same if it was saved as 36 bytes in normal basic, then 35 bytes in C.Basic

RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

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


Ok!
Is there reproducibility from all clear of the main memory?
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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

Citer : Posté le 09/09/2019 22:09 | # | Fichier joint


Gif showing me recreating the error



Create a program
place two 9's inside
edit the program in C.Basic
delete and replace one of the 9's
save and exit the program
the file size should have dropped from 36 bytes to 32 bytes
Opening the program in normal basic
then pressing [DEL] will cause the Full Memory Error
the error is wrong, it shouldn't say full memory error, but instead corrupted memory error

I tested in the emulator
I cleared all the memories and it still did it
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

Citer : Posté le 10/09/2019 01:36 | #


Thanks very much!!
It was perfectly reproduced.

That is a bug in C.Basic.
I will fix it!
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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

Citer : Posté le 10/09/2019 03:51 | #


"will fix it!"
Yay!

[SHIFT] + [MENU]
"Edit TopLine:on"
is on when off
and off when on
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

Citer : Posté le 10/09/2019 10:34 | #


Redcmd a écrit :

[SHIFT] + [MENU]
"Edit TopLine:on"
is on when off
and off when on

I can't reproduce it yet.

The file size issue has been fixed.
Here is updated.

2.28 beta for Graph 35+USB/35+EII/75/85/95 (SD)
https://pm.matrix.jp/CB/CBASIC228beta.zip
-Fixed the bug that the file size may not be correct when saving the program file.
-Fixed the bug that voltage reading caused a system error in the fx-Manager PLUS Subscription.
-Fixed the FkeyMenu( command bug that icon reading caused a system error when the OS version was old.
-Changed specification that Next/WhileEnd/LpWhile following Isz/Dsz back to 2.26 specification.

1.28 beta for CG10/20/50/Graph90+E.
https://pm.matrix.jp/CB/CBASICCG128beta.zip
-Fixed the bug that the file size may not be correct when saving the program file.
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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

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


Yay!
The mem error is fixed :P

In the C.Basic "Setup Menu"
inside the program list screen, press [SHIFT] + [MENU] to open it
at the top theres
Angle       :rad
Complex Mode:Real
Draw Type   :Connect
...
etc
scroll down to "Edit TopLine:off"
when the setting is off, the top line is visible
when the setting is on, the line is gone
it should be the other way around
on - visible
off - gone
The top line is what is shown at the top of screen when editing a program
"==TestName==[DBL#1] "

Feature Requests
When editing a program, pressing [F6] (EXE) will run the program
can there be a setting to turn on a shortcut for that?
like [SHIFT] + [EXE] maybe?
After a program has fininshed, it says "Done" pressing [EXE] will take me back to the program list screen and I have to press [F2] (EDIT) to edit the program again
Maybe have something, so that when the program fininshes it automatically takes me back into editing mode at the same position I left it at without me having to press anything (or maybe just one button like [F2] on the "Done" screen)
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

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


Is "Edit TopLine" a bug?

To go back directly to the editing screen,
If press the [F2] key when "Done", it seems to be possible.
I'll implement it in the next update.
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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

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


"Edit TopLine" isn't a bug in itself
but it says the wrong thing
when it should say "on" it says "off"
and when it says "off" it should say "on"

Allumé éteint (in French I think) is switched around
its saying the oppsite to what it should say
(hors / en) => (en / hors)
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

Citer : Posté le 10/09/2019 12:57 | #


Ok
What is another suitable word instead of On / Off?

Ajouté le 10/09/2019 à 13:48 :
I updated [F2] (edit)
2.28 beta for Graph 35+USB/35+EII/75/85/95 (SD) re-uploaded
https://pm.matrix.jp/CB/CBASIC228beta.zip
-Added feature that pressing [F2] go back directly to the editing screen when program is end "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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

Citer : Posté le 10/09/2019 21:35 | # | Fichier joint


just swap the words around
default says off, but it should be on
you just need to switch the labels around


When using lists
theres are two list commands
List1[N] and List 1[N]

"List 1" is what everybody uses, "List " is the command and "1" is the argument
While with "List1" is the command and there is no argument
You can find the command via [SHIFT] + [4] (Catalog)
18 places up from the bottom
"List1" is 1 byte
"List 1" is 2 bytes
1 -> List 1
List 1 -> List2
Gives a syntax error

1 -> List 1
List 1 -> List 2
doesn't

The difference is "List2" / "List 2" (the space)
theres no error in normal basic

In the program setup menu [SHIFT] + [MENU]
"EditListChar:List"
doesn't affect "List1" commands
only "list X" comamnds

RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

Citer : Posté le 11/09/2019 01:07 | #


Ah,Ok!
"Edit TopLine" means to use top line for editing.
It does not mean whether to display the status line.
Sorry for the confusing expression.

There was a part that does not support List1 of 1 byte command.
It will be fixed in the next update.

For "EditListChar: List", only 2 byte List command is supported.

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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

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


Ahhhh.... yes
I see what you mean now
I thought TopLine meant the top status line
Yea "TopStatusBar:on/off" might be better
or "Edit StatBar: on/off"?

Can "EditListChar: List" support 1 byte list please?
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

Citer : Posté le 11/09/2019 04:17 | #


Redcmd a écrit :
Ahhhh.... yes
I see what you mean now
Yea "TopStatusBar:on/off" might be better
or "Edit StatBar: on/off"?

Thanks!
I 'll consider it.

Redcmd a écrit :
Can "EditListChar: List" support 1 byte list please?

It may be possible.
I'll try it.
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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

Citer : Posté le 13/09/2019 01:29 | # | Fichier joint


What features does C.Basic have that can speed this program up by a huge amount?

Code
Cliquer pour enrouler
ViewWindow ﹣4, 4, 0, 2, ﹣2, 0, 1, 33, 1
Deg : 31 -> K : 360 -> θ
Do : LpWhile GetKey : Do
    If K = 31 : Then 0 -> V~W
        1.3 -> Z : 0 -> A~D
        1 + MOD(R, 3 -> R
        R = 1 => 70 -> A : R = 1 => 20 -> C
        R = 2 => 90 -> A : R = 2 => 100 -> B
        {1, 1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, 1, 1, 1, 1, 1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, 1, 1 -> List1
        {1, 1, 1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, 1, 1, 1, 1, 1, 1 -> List2
        {1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1, 1, 1, 1, 1, 1, 1, ﹣1, ﹣1, 1, 1, 1 -> List3
        {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1 -> List4
        List->Mat(1, 2, 3, 4 -> Mat A
        Trn Mat A -> Mat A
        For 1 -> N To 4
            Dim List N -> List 5[N
        Next
        Min(List 5 -> Tθmax
    IfEnd
    [[1, 0, 0, 0][0, cos A, sin A, 0][0, ﹣sin A, cos A, 0][0, 0, 0, 1]] * [[cos B, 0, ﹣sin B, 0][0, 1, 0, 0][sin B, 0, cos B, 0][0, 0, 0, 1]] * [[cos C, sin C, 0, 0][﹣sin C, cos C, 0, 0][0, 0, 1, 0][0, 0, 0, 1]] * [[1, 0, 0, 0][0, 1, 0, 0][0, 0, cos D, ﹣sin D][0, 0, sin D, cos D]]Mat A -> Mat B
    Trn Mat B -> Mat B
    Mat->List(B, 1 -> List 1
    Mat->List(B, 2 -> List 2
    Mat->List(B, 4 -> List 4
    List 1 / (List 4 + 2 -> List 1
    List 2 / (List 4 + 2 -> List 2
    Cls :
    'Text 1,1,A :
    'Text 7,1,B :
    'Text 13,1,C :
    'Text 19,1,D :
    Graph(X,Y)=(V + ZList 1[T], W + ZList 2[T
    If S = 1 : Then
        For 1 -> S To 10
            GetKey != K => Break
            '&#7f5f;&#f94f;1
    Next : IfEnd
    7 -> S
    Lbl 0 : GetKey -> K
    S > 1 => Dsz S
    Not K => Goto 0
    'StrInv(&#f947;&#7f9f;9->Str 1
    K = 79 Or 7 = StrSrc(Str 1, "1", 7 => MOD(A + S, θ -> A
    K = 69 Or 6 = StrSrc(Str 1, "1", 6 => MOD(A - S, θ -> A
    K = 59 Or 5 = StrSrc(Str 1, "1", 5 => MOD(B + S, θ -> B
    K = 49 Or 4 = StrSrc(Str 1, "1", 4 => MOD(B - S, θ -> B
    K = 39 Or 3 = StrSrc(Str 1, "1", 3 => MOD(C + S, θ -> C
    K = 29 Or 2 = StrSrc(Str 1, "1", 2 => MOD(C - S, θ -> C
    K = 78 => MOD(D + S, θ -> D
    K = 77 => MOD(D - S, θ -> D
    K = 27 => V + .02S -> V
    K = 38 => V - .02S -> V
    K = 37 => W + .02S -> W
    K = 28 => W - .02S -> W
    K = 42 => Z + .02S -> Z
    K = 32 => Z - .02S -> Z
LpWhile K != 47
Code
Cliquer pour enrouler
ViewWindow ﹣4, 4, 0, 2, ﹣2, 0, 1, 33, 1
Deg : 31 -> K : 360 -> θ
Do : LpWhile GetKey : Do
    If K = 31 : Then 0 -> V~W
        1.3 -> Z : 0 -> A~D
        1 + MOD(R, 3 -> R
        R = 1 => 70 -> A : R = 1 => 20 -> C
        R = 2 => 90 -> A : R = 2 => 100 -> B
        {1, 1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, 1, 1, 1, 1, 1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, 1, 1 -> List1
        {1, 1, 1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, 1, 1, 1, 1, 1, 1 -> List2
        {1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, 1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1, 1, 1, 1, 1, 1, 1, ﹣1, ﹣1, 1, 1, 1 -> List3
        {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, 1, 1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, ﹣1, 1 -> List4
        List->Mat(1, 2, 3, 4 -> Mat A
        Trn Mat A -> Mat A
        For 1 -> N To 4
            Dim List N -> List 5[N
        Next
        Min(List 5 -> Tθmax
    IfEnd
    [[1, 0, 0, 0][0, cos A, sin A, 0][0, ﹣sin A, cos A, 0][0, 0, 0, 1]] * [[cos B, 0, ﹣sin B, 0][0, 1, 0, 0][sin B, 0, cos B, 0][0, 0, 0, 1]] * [[cos C, sin C, 0, 0][﹣sin C, cos C, 0, 0][0, 0, 1, 0][0, 0, 0, 1]] * [[1, 0, 0, 0][0, 1, 0, 0][0, 0, cos D, ﹣sin D][0, 0, sin D, cos D]]Mat A -> Mat B
    Trn Mat B -> Mat B
    Mat->List(B, 1 -> List 1
    Mat->List(B, 2 -> List 2
    Mat->List(B, 4 -> List 4
    List 1 / (List 4 + 2 -> List 1
    List 2 / (List 4 + 2 -> List 2
    Cls :
    '/Text 1,1,A :
    '/Text 7,1,B :
    '/Text 13,1,C :
    '/Text 19,1,D :
    Graph(X,Y)=(V + ZList 1[T], W + ZList 2[T
    If S = 1 : Then
        For 1 -> S To 10
            GetKey != K => Break
            '/TicksWait 1
    Next : IfEnd
    7 -> S
    Lbl 0 : GetKey -> K
    S > 1 => Dsz S
    Not K => Goto 0
    '/StrInv(Bin(KeyRow(9->Str 1
    K = 79 Or 7 = StrSrc(Str 1, "1", 7 => MOD(A + S, θ -> A
    K = 69 Or 6 = StrSrc(Str 1, "1", 6 => MOD(A - S, θ -> A
    K = 59 Or 5 = StrSrc(Str 1, "1", 5 => MOD(B + S, θ -> B
    K = 49 Or 4 = StrSrc(Str 1, "1", 4 => MOD(B - S, θ -> B
    K = 39 Or 3 = StrSrc(Str 1, "1", 3 => MOD(C + S, θ -> C
    K = 29 Or 2 = StrSrc(Str 1, "1", 2 => MOD(C - S, θ -> C
    K = 78 => MOD(D + S, θ -> D
    K = 77 => MOD(D - S, θ -> D
    K = 27 => V + .02S -> V
    K = 38 => V - .02S -> V
    K = 37 => W + .02S -> W
    K = 28 => W - .02S -> W
    K = 42 => Z + .02S -> Z
    K = 32 => Z - .02S -> Z
LpWhile K != 47


You should have a talk with Zezombye to get him to support C.Basic commands inside BIDE
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

Citer : Posté le 13/09/2019 02:15 | #


It is great program for both C.Basic and Basic Casio.
To optimize for both,
Reduce trigonometric operations only when the angle changes.
To optimize for C.basic,
I think it is best to operate in integer mode.


About BIDE,
I was hesitant because the extended command continued to increase,
Now it ’s almost stable,
I'ii ask him.
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.
RedcmdHors ligneMembrePoints: 134 Défis: 2 Message

Citer : Posté le 14/09/2019 10:46 | #


Lephenixnoir had a problem when running the C.Basic version of my minesweeper
Can you have a look at it?
"Not supported (3156)"
https://www.planet-casio.com/Fr/programmes/voir_un_programme_casio.php?showid=3901&page=1#60920

oh and your error code list is 404
https://egadget2.web.fc2.com/ErrorCode_List.txt
RedCMD#4299 - Discord
Mandelbrot SNKEmini Minesweeper Sudoku
Sentaro21Hors ligneMembrePoints: 564 Défis: 0 Message

Citer : Posté le 15/09/2019 01:07 | #


It is an error that occurs because it does not support loading packed g1m.
C.Basic does not support packed g1m.
This is because there is a difference in file name limits in main and storage memory, and file names that cannot be expanded on storage memory.
First deploy to main memory in the memory manager, and then run it main memory mode 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.
Pages : Précédente1 ... , 11, 12, 13, 14, 15, 16

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