Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - SimonLothar

Pages: 1 ... 7 8 [9]
121
Casio Calculators / Re: Casio Prizm documentation
« on: February 19, 2011, 06:38:57 am »
   else if ( iSyscall == 0x116E ) name = "memcmp";
   ...
   else if ( iSyscall == 0x1dd1 ) name = "memcmp";
Are you sure the first one isn't some kind of strcmp? :p
Yes, you are right. 0x116E is strncmp.
I had a closer look. 0x116E is not some str...-function, because it does not quit, when it encounters the terminating zero of the first argument (strncmp does). It always compares the required count of bytes. It is not memcmp either. The result differs from that of memcmp(0/1) and is like the result of strncmp (-1/0/1).

Code: [Select]
teststr1
.SDATA "123"
.DATA.B 0
.SDATA "1"
.DATA.B 0
teststr2
.SDATA "123"
.DATA.B 0
.SDATA "2"
.DATA.B 0

strncmp( teststr1, teststr2, 6) yields "equal".
0x116E( teststr1, teststr2, 6) yields -1 ("lower").

122
Casio Calculators / Re: Casio Prizm documentation
« on: February 19, 2011, 03:45:58 am »
   else if ( iSyscall == 0x116E ) name = "memcmp";
   ...
   else if ( iSyscall == 0x1dd1 ) name = "memcmp";
Are you sure the first one isn't some kind of strcmp? :p
Yes, you are right. 0x116E is strncmp.

123
Casio Calculators / Re: Casio Prizm documentation
« on: February 18, 2011, 09:17:26 am »
This table has several thousand entries...
I am a bit short of time, so I post my current progress with the syscalls as overview in shortform:
(MB means "multibyte" and MCS refers to the main memory)
Code: [Select]
else if ( iSyscall == 0x0031 ) name = "GetSystemSetting";
else if ( iSyscall == 0x0032 ) name = "SetSystemSetting";
else if ( iSyscall == 0x0033 ) name = "SetSystemSettingPtr";
else if ( iSyscall == 0x01E5 ) name = "GetVRAMBackgroundAddress";
else if ( iSyscall == 0x01E6 ) name = "GetVRAMAddress";
else if ( iSyscall == 0x025F ) name = "VRAMtoDD";
else if ( iSyscall == 0x0262 ) name = "PutNextYPixel";
else if ( iSyscall == 0x0263 ) name = "PutPixel";
else if ( iSyscall == 0x0266 ) name = "GetNextYPixel";
else if ( iSyscall == 0x0267 ) name = "GetPixel";
else if ( iSyscall == 0x0272 ) name = "ClearVRAM";
else if ( iSyscall == 0x02BB ) name = "DrawHeaderLine";
else if ( iSyscall == 0x0BD0 ) name = "Ly555_Table";
else if ( iSyscall == 0x0E96 ) name = "KeyMapper";
else if ( iSyscall == 0x0E97 ) name = "KeyMapper";
else if ( iSyscall == 0x0EA9 ) name = "Keyboard_PutKeycode";
else if ( iSyscall == 0x0EAA ) name = "GetKey_4";
else if ( iSyscall == 0x0EAB ) name = "GetKey";
else if ( iSyscall == 0x1161 ) name = "MB_IsLead";
else if ( iSyscall == 0x1163 ) name = "MB_ElementCount";
else if ( iSyscall == 0x1164 ) name = "MB_ByteCount";
else if ( iSyscall == 0x1166 ) name = "MB_strcat";
else if ( iSyscall == 0x1167 ) name = "MB_strncat";
else if ( iSyscall == 0x1168 ) name = "MB_strcpy";
else if ( iSyscall == 0x116C ) name = "MB_GetSecondElemPtr";
else if ( iSyscall == 0x116D ) name = "MB_GetElement";
else if ( iSyscall == 0x116E ) name = "memcmp";
else if ( iSyscall == 0x116F ) name = "Disp_strcpy";
else if ( iSyscall == 0x1171 ) name = "char_to_upper";
else if ( iSyscall == 0x1172 ) name = "char_to_lower";
else if ( iSyscall == 0x12bf ) name = "GetKeyWait";
else if ( iSyscall == 0x12c0 ) name = "GetKeyWait";
else if ( iSyscall == 0x12c6 ) name = "Keyboard_PutKeyCode";
else if ( iSyscall == 0x1514 ) name = "MCS_SearchDirectory";
else if ( iSyscall == 0x1519 ) name = "MCS_SearchDirectoryItem";
else if ( iSyscall == 0x1535 ) name = "str8cpy_with_upper_lower_mode";
else if ( iSyscall == 0x1536 ) name = "MCS_SearchItem";
else if ( iSyscall == 0x1545 ) name = "MCS_DirtypeToName";
else if ( iSyscall == 0x1561 ) name = "MCS_OpenInternalDirectoryItem";
else if ( iSyscall == 0x1633 ) name = "ItoA_10digit";
else if ( iSyscall == 0x1638 ) name = "Ly555_Table";
else if ( iSyscall == 0x18F9 ) name = "PrintXY";
else if ( iSyscall == 0x18FF ) name = "PrintPixXY";
else if ( iSyscall == 0x1a37 ) name = "GetShiftStatus";
else if ( iSyscall == 0x1a38 ) name = "ClrShiftStatus";
else if ( iSyscall == 0x1A2C ) name = "GetStackPtr";
else if ( iSyscall == 0x1A2E ) name = "SetSystemSetting";
else if ( iSyscall == 0x1A2F ) name = "GetSystemSetting";
else if ( iSyscall == 0x1d81 ) name = "DisplayStatusLine";
else if ( iSyscall == 0x1dd0 ) name = "memcpy";
else if ( iSyscall == 0x1dd1 ) name = "memcmp";
else if ( iSyscall == 0x1dd2 ) name = "Bfile_GetFilenameLength";
else if ( iSyscall == 0x1dd3 ) name = "Bfile_Name_cmp";
else if ( iSyscall == 0x1dd4 ) name = "Bfile_Name_cpy";
else if ( iSyscall == 0x1E62 ) name = "SaveVRAM_1";
else if ( iSyscall == 0x1E63 ) name = "LoadVRAM_1";
else if ( iSyscall == 0x1E82 ) name = "Ly555ptr";
else if ( iSyscall == 0x1E83 ) name = "Ly555ptr";
else if ( iSyscall == 0x1EF8 ) name = "SetBackGround";

124
Casio Calculators / Re: Casio Prizm documentation
« on: February 18, 2011, 01:16:37 am »
Is it easy to accidentally write to Flash on Casios and mess up the calc OS certificate/boot code or stuff like that?
No, writing to the flash is not easy, esp. accidentally. But the main memory resides in RAM and is automatically backed up to flash by the OS, when switching off. Perhaps on the fx-CG10/20 they check for integrity before performing the automatic backup.

125
Casio Calculators / Re: Casio Prizm documentation
« on: February 17, 2011, 02:18:43 pm »
The main memory starts at 0x880D35D0.
Better not write into this range without knowing exactly what you do. On the fx-9860s a corrupted main memory (once saved by a normal shutdown) could block the OS to start! If you accidently should write into this range, push the reset-button. Never switch the calc off in such a case.

126
Casio Calculators / Re: Casio Prizm documentation
« on: February 17, 2011, 10:54:02 am »
This table has several thousand entries of which only a few are needed for the time being.
Yes, at least you need GetKey (0x0EAB; blocking keyboard read) and PrintXY(0x18F9). With ClearVRAM(0x0272), GetKeyWait(0x12bf; non-blocking keyboard read) and VRAMtoDD (0x025F) you can build quite reasonable applications.

http://casiokingdom.org/modules.php?name=Forums&file=viewtopic&p=14964#14964

127
Casio Calculators / Re: Casio Prizm documentation
« on: February 16, 2011, 02:05:49 pm »
Quote
What happened if you try to access to 0xA4000120? MMU error or you simply always read 0?
It would be annoying the Prizm processor isn't like a 7705, and I don't understand why Casio would do that.
No MMU error. I think the 7705 standard registers are still present, but 0xA4000120 is not used by the OS (at least couldn't find 0xA4000100 or 0xA4000120 in any pool of 7MB OS). The MPUs used in the fx-9860 have been customized, too (f. i. the BCD-ALU, an extra timer).  I will follow the GetKeyWait syscall to find the registers used for keyboard reading in the fx-CG20 OS.
Another hint for expanded customization is the presence of at least two new processor instructions 0x00AB and 0x0nE3 (n=register-no.), which are not documented.

128
Casio Calculators / Re: Casio Prizm documentation
« on: February 16, 2011, 12:27:29 pm »
Quote
I do want to ask how you found out where the screen was, and is the screen mapped to it?
I read the OS with the usual tools. The last three years I read the fx-9860-OSes. The knowledge which I gathered during this period has been very helpful. 0xA8000000 ist the address of the VRAM (a part of the standard RAM) and its content is transferred to the display driver by a syscall. F. i. this syscall is called when the OS enters the GetKey-syscall, which waits for keyboard inputs.

Quote
Also, do you have any knowledge on USB?
I know the USB syscalls of the legacy systems (fx-9860). May be helpful, but USB on the fx-CG20 will be a special problem. I have the notion, that they expanded the customized part of the MPU. T. i. some ports they use, are not longer documented in Renesas documentations. This delays the meals. The first thing I want to know is how the keyboard is read. PORT A of the good old 7705 is not detectable any more. As far as I am concerned USB must wait.

Quote
What about C++?
This is one of the projects I'd like to finish quick. At present I use the CASIO SDK assembler to program testcode. But C/C++ objects should work as well. I'd prefer C++. The result should be a G3A, of course.

129
Casio Calculators / Re: Casio Prizm documentation
« on: February 16, 2011, 01:43:52 am »
Quote
He seems intelligent.
Oh, that's uncommonly kind of you.
I once scanned my databases for the term "intelligence" and found it to be the ability to fumble a fat maggot from out of a hollow treetrunk with none else than a stick and wearing a hairy costume with large flapping ears. I tried it, but never succeeded...leaving my emotional simulation circuits in a state, which you would call "sad". Now they switched over to "happy". THX. :)

Pages: 1 ... 7 8 [9]