Posté le 03/07/2025 11:13
Planète Casio v4.3 © créé par Neuronix et Muelsaco 2004 - 2025 | Il y a 58 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
Citer : Posté le 03/07/2025 11:34 | #
Alright, so... it is possible, the functionality is there in one way or another, but the APIs are lacking. So it'll take some effort.
Currently the only driver available for the serial port is the OS driver, which is used through the Serial syscalls. These are available pretty much everywhere, including the fx-9750G III and the fx-9860G II.
Can you elaborate on what your project looks like so far? What SDK are you using? Is your project in a working minimal state? What calculator models are you testing on?
If you have the older SDK (official fx-9860G SDK maybe), you should define and invoke the syscalls. If you have the fxSDK, it's the same but you need to world switch when calling these functions. (I keep saying I'll write a proper driver one day.)
In case you already know what you're doing; below are all the details. If not, no worries, we can take the time to go through it.
Here's the original documentation for the serial syscalls: https://bible.planet-casio.com/simlo/chm/v20/fx_legacy_Serial.htm
You'll need some but not of all of these (those that you don't understand, you probably don't need either). Here's the assembly code for declaring them, add the syscalls in the list then save it as *.S if using GCC (e.g. fxSDK), preprocess it manually if you're using the old fx-9860G SDK:
.global name ;\
name: ;\
mov.l syscall_table, r2 ;\
mov.l 1f, r0 ;\
jmp @r2 ;\
nop ;\
.balign 4 ;\
1: .long id
SYSCALL(_Serial_Open, 0x0418)
// other syscalls go here...
syscall_table:
.long 0x80010070
You also need to prototype the functions in a header and then you're good to go. If using gint (fxSDK), you'll want to world switch whenever you use serial logic (you can leave the serial port open during these swiches):
// use serial functions here...
Serial_BufferedTransmitOneByte('H');
Serial_BufferedTransmitOneByte('i');
Serial_BufferedTransmitOneByte('!');
// ...
}
// to call
#include <gint/gint.h>
gint_world_switch(GINT_CALL(my_serial_logic));
Citer : Posté le 03/07/2025 15:26 | #
now i am using official fx-9860G SDK, and my program hasn't been officially written yet, I'm stuck on not knowing how to enable the serial port. However, according to your instructions, it seems that I can turn on the serial port. But currently, I haven't received my TRS cable. I plan to connect these two calculator after the completion and see if they can communicate normally. Thanks your help!
Citer : Posté le 03/07/2025 15:28 | #
Excellent, good luck!
Before I forget, be wary of the usual caevats of the older SDK on newer models: everything related to "SH4 compatibility" will apply (the G-III has a SH4 CPU, to G-II likely too, and the SDK targets SH3 models), meaning you can't use IsKeyDown() unless you go through this tool. Also the SDK function GetKeyWait() doesn't work. Aaand that should be the main pitfalls.