bible_documentations/software/notes/g35EII_OS3.00.2200_random_n...

123 lines
3.7 KiB
Plaintext
Raw Normal View History

2020-07-02 11:42:34 +02:00
Graph35+EII 0S30.00.2200 - Globals list
SuperH __fast call note:
-> arguments must be passed using r0, r1 and r2 registers
-> r3 must be saved before involving the function
-> used by the syscall 0xfe0 __fast_strcpy() and some Bfile internal function
Usefull function (not syscall):
0x8004d218 - uint32_t atomic_start() (return old SR register and set up the SR.BL bit)
0x8004d276 - redirect to atomic_start()
0x801e0f94 - wrapper of syscall 0xf98 (__fast_strcpy()) (probably to use the __fast superh procedure).
0x801e1f80 - ascii_to_bfile() - copy ASCII string into Bfile string (uint16_t)
0x80267c78 - USB interrupt handler
0x88007cb4 - USB pointer table of functions (47 functions)
0x8026954c - int USB_check_interrupts(void) (check any interrupt)
Casio's globals:
#---
# Fugue / Bfile
#---
0x8801071c - Fugue / Bfile mount table for all device (only one slot for the ROM) (52 bytes)
struct fs_control {
void *free_buffer; (0x880135f8)
uint32_t structure_id_0; (alway 0x00000002?)
uint32_t structure_id_1; (alway 0x00000001?)
char device_name[5]; ("fls0")
uint8_t unknown[16]; (used for file handle?)
char separator[2]; ("\")
uint8_t unknown[14]; (used for file handle?)
uint32_t handle_mark; (not sure, 0x01000000 (used by the handle to distingish ROM / SD))
}
0x880107d8 - Used like internal buffer to store path (Fugue?)
0x8800c2ac - Mutex for ???? (Fugue?)
0x8022d448 - ???? (Fugue?)
0x801e0d8c - Pointer table (17 functions) (used by Bfile during initialization state)
0x8022229c - Some path used to generate internal Fugue FS tree (?)
#---
# SD Card
#---
0xfd802ab4 - SD Card device validity (0=no, otherwise yes)
0xfd802a30 - SD Card device validity (0=no, otherwise yes)
#---
# USB software driver:
#---
0x88004b78 - ????? (used at <e92a>)
0x88009578 - ????? (used at <266470> and <269fb0>)
0x88007b70 - used by the software driver to set arg (USB driver state ?) like: 1800000[1/2/3/4/5/6/7]
-> used to indicate USB driver state ?
-> used to configure one register of the USB hardware module ?
0x8800b840 - function pointer for the USB interrupt handler (0x80267c78)
0x8800b844 - argument pointer for the USB interrupt handler (0x88007d50)
0x8800b848 - ????? (used at <266470>, check if == 1)
0x8800b86c - used by the USB timer handler to check initialization validity (?)
0x8800b868 - ?????
0x8800c2d4 - Indicate if any communication is used (serial or USB)
0x8800c2d6 - Content the currently selected comminication mode (0=serial, 1=USB)
0x8800c2d8 - unknown (set to 1 by the syscall 0x29b)
struct comm_info_s
{
uint16_t used; // 0=no, other yes
uint16_t type; // 0=SERIAL, 1=USB
uint16_t unknown; // syscall 0x29b set to 1
};
0x8800c388 - USB hardware initialisation state ?
0x8800c38c - ?????
0x88013354 - USB structure entry: (undocumented yet)
-> set to 0x00000000 by the syscall USB_close()
0x8026a690 - Some string used by the USB drivers ("KSL")
#---
# Applications
#---
0x8024367c - LINK Fkey remap data (6 entries)
USB notes:
-> Casio's use undocumented register 0xa4d800c2
-> Casio's use the timer 4 to generate USB interrupt (see USB_Close())
-> Casio's use hardware USB module interrupt
-> Casio's use DMA channel 4
-> Casio's vendor ID: "Casio Computer Co., Ltd" (0x07cf)
-> Casio's product ID: "fx-CP400" (0x6102)
-> use BULK transfert.
Based on the `CPU7305.dll`: register list:
0x00000000 XTAL_USB (USB frequency)
0xa4150014 USBCLKCR (USB Clock control)
USB 2 control
App note:
Fkey remap structure:
struct fkey_remap {
struct {
uint16_t ID; // ICON id, used by the syscall 0x4b0
uint16_t validity; // always 0x0002
} icon;
struct {
uint16_t validity; // always 0x0000
uint16_t returned; // returned value when when fkey is pressed
} fkey;
};