Omnimaga
Calculator Community => Casio Calculators => Topic started by: MPoupe on April 04, 2011, 04:15:14 am
-
Hello,
I played a little with my fx-9860G and I have found very interesting feature. I am not sure if it was discussed somewhere, please sorry for that case.
The main idea is, that C/asm addin and CASIO basic script can run concurrently and work together.
I put more detailed description & example on my page - see "TSR - Terminate and Stay Resident for fx-9860G" on my page (http://martin.poupe.org/casio/).
Martin
-
Hmm interesting. I don't think I read about this anywhere else yet before. I'll have to check your page to get more info.
Is it very tricky to allow this for an average user? I wonder if it could potentially be possible from a BASIC program to copy a file from the storage memory over the RAM and delete it manually afterward... this would allow massive RPGs, for example.
-
Could this idea be applied to the Prizm too? You said that the language might be able to be extended by this method. It would be possible to create create/modify commands to draw objects to VRAM and create another command that would update the screen, allowing really fast screen updates to make fancy Prizm Basic games possible.
-
DJ_O: I think usage is tricky, but easy for average user (programmer in Basic). We need to specify (and agree on) list of functions and interface (how to communicate), which the TSR will support. As a quick draft one can imagine:
variable A - code of routine to call
0 = nothing
1: get TSR version
...
127: load cas program from flash, name in Str1, filename in Str2
128: delete cas file, name in Str1
Then Basic user would do following:
1. set parameters:
"Game"->Str 1:"\\fls0\Game.g1r"->Str 2
2. specify function:
127->A
3. wait for execute (TSR will reset A to signal execution)
While A:WhileEnd
4. check result (?)
If B:Then "ERROR":Stop":IfEnd
5. use the program
Prog "Game"
6. delete it
"Game"->Str 1:128->A
7. wait for execute ...
While A:WhileEnd
8. check result (?)
If B:Then "ERROR":Stop":IfEnd
One can also imagine really asynchronous processing, we may have function, which will periodically check variables X and Y
and display user defined image (figure) here. You may create e.g. Arkanoid game with nice ball without drawing ball at all (OK you need to draw it once and store it to TSR by another command)
-
m1ac4: I think yes, we need to know some syscall - at least Alpha_GetData(),Alpha_SetData(),App_PRGM() ,SetTimer(),KillTimer() and all functionality you want to use from Basic. I hope that App_PRGM() on cg behaves the same way as on fx9860.
-
Interesting. It might take me a while to dechiper if I ever went into that kind of stuff, since I haven't programmed in a long while.
Also how did you make the screenshots at http://martin.poupe.org/casio/tsr/menu.png ? I never got able to transfer any add-in to any emulator I've tried...
-
Also how did you make the screenshots at http://martin.poupe.org/casio/tsr/menu.png ? I never got able to transfer any add-in to any emulator I've tried...
This screenshot is from the official Casio SDK.
-
well, where is a trick to run any addin in the emulator of the sdk, you can add the addin in the SD-card memory folder and copy it while running another addin from SD-card to flash memory (via System-Menu). Then it can be easily executed in the Main-Memory.
-
Ah ok thanks guys, I was using the Casio FX-9860G manager. I'll have to try this out later.
-
The Fx manager + can do addins also:
http://www.casiocalc.org/?showtopic=5673
-
Hey MPoupe, I just unexpectedly found the sources of this program in a corner of my hard drive, and it amused me because it use exactly the same idea than one of my programs ^_^
http://www.youtube.com/watch?v=_JrwaOIsCc0 (http://www.youtube.com/watch?v=_JrwaOIsCc0)
-
I have a version of this working on the Prizm .
It already does syscalls, and I have not released it yet.
I will get back to this at some point.
I need to make a good demo out of it.
-
I don't quite understand the significance of MPoupe's addin. I think this may have to do with the fact that I do not program in C.
DJ_O: I think usage is tricky, but easy for average user (programmer in Basic). We need to specify (and agree on) list of functions and interface (how to communicate), which the TSR will support. As a quick draft one can imagine:
variable A - code of routine to call
0 = nothing
1: get TSR version
...
127: load cas program from flash, name in Str1, filename in Str2
128: delete cas file, name in Str1
Then Basic user would do following:
1. set parameters:
"Game"->Str 1:"\\fls0\Game.g1r"->Str 2
2. specify function:
127->A
3. wait for execute (TSR will reset A to signal execution)
While A:WhileEnd
4. check result (?)
If B:Then "ERROR":Stop":IfEnd
5. use the program
Prog "Game"
6. delete it
"Game"->Str 1:128->A
7. wait for execute ...
While A:WhileEnd
8. check result (?)
If B:Then "ERROR":Stop":IfEnd
One can also imagine really asynchronous processing, we may have function, which will periodically check variables X and Y
and display user defined image (figure) here. You may create e.g. Arkanoid game with nice ball without drawing ball at all (OK you need to draw it once and store it to TSR by another command)
And whats this? Does this mean that we can use syscalls in BASIC now?
I'm kinda confused.... Could someone explain how this is significant?
Sorry if i'm not being clear, or am sounding rude, but I'm just trying to understand... :P
-
The significance of this is that this enables one to actually write new commands you can use in a simple BASIC program. Watch the video Pierrott posted for example. This is one of the best CASIO utilities I've come across.
To both Pierrott and MPoupe, keep up the good work!
-
OH, ok. So this means that we could actually use syscalls in BASIC progs? cool!
-
Hey MPoupe, I just unexpectedly found the sources of this program in a corner of my hard drive, and it amused me because it use exactly the same idea than one of my programs ^_^
http://www.youtube.com/watch?v=_JrwaOIsCc0 (http://www.youtube.com/watch?v=_JrwaOIsCc0)
Maybe inconsciently you've just reminded of the Poupe's method...