FONTCHARACTER Reference - compatibility, sets
27 posts
• Page 1 of 3 • 1, 2, 3
- cakeisalie5
- Senior Member
- Posts: 101
- Joined: Sun Mar 27, 2016 10:24 am
- Location: France
- Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50
FONTCHARACTER Reference - compatibility, sets
Hi, as you may or may not know, I'm making a FONTCHARACTER reference in order to be able to read, write, describe and convert to Unicode FONTCHARACTERs (I call FONTCHARACTERS the code <-> character correspondance, not the fixed-width or multibyte format). It's long, but at least, when it's done, it won't have to be done by anyone else (they will just be able to include this and use it in their projects).
I would like to include a sets system in this FONTCHARACTER reference. A set is a pack of characters/opcodes (I count opcodes as characters, because they are in the same encoding, just not used in the same way) that has parents (and include their characters). An example set is the "OS2" set, which includes the characters from the "OS1" set (see below) and would bring new ones. I'm also willing to include "extension" sets (characters that alternative interpreters bring, like C.Basic).
The problem is, I don't really know the history of this encoding, so I don't really know what sets to use. What is, globally, the history of characters in CASIO calculators ? Is there a way to export the characters/opcodes from a raw OS image in order to guess where some characters appeared?
Thanks in advance!
(and sorry for the "flood" with so many different subjects, I'm just trying to tidy up all the things I can grab )
I would like to include a sets system in this FONTCHARACTER reference. A set is a pack of characters/opcodes (I count opcodes as characters, because they are in the same encoding, just not used in the same way) that has parents (and include their characters). An example set is the "OS2" set, which includes the characters from the "OS1" set (see below) and would bring new ones. I'm also willing to include "extension" sets (characters that alternative interpreters bring, like C.Basic).
The problem is, I don't really know the history of this encoding, so I don't really know what sets to use. What is, globally, the history of characters in CASIO calculators ? Is there a way to export the characters/opcodes from a raw OS image in order to guess where some characters appeared?
Thanks in advance!
(and sorry for the "flood" with so many different subjects, I'm just trying to tidy up all the things I can grab )
Part of the Planète Casio community (FR) - main author of Cahute
- SimonLothar
- Senior Member
- Posts: 605
- Joined: Sat Sep 15, 2012 6:59 am
- Location: Krautland ****
- Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400
Re: FONTCHARACTER Reference - compatibility, sets
You can find the standard 8x8 character glyphs by the following method.
The code is written in a C-like language. It should do to explain the way, how to analyze an OS image to gain the glyph table pointers and the corresponding character definitions.
This is an example of some 8x8 glyph definitions
8x8 character glyphs: Show
The code is written in a C-like language. It should do to explain the way, how to analyze an OS image to gain the glyph table pointers and the corresponding character definitions.
This is an example of some 8x8 glyph definitions
example: Show
I'll be back!
- cakeisalie5
- Senior Member
- Posts: 101
- Joined: Sun Mar 27, 2016 10:24 am
- Location: France
- Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50
Re: FONTCHARACTER Reference - compatibility, sets
Yay, I'll try using that! What about the multi-character opcodes (that are defined using one or more other characters), have you found out how it's stored?
Part of the Planète Casio community (FR) - main author of Cahute
- SimonLothar
- Senior Member
- Posts: 605
- Joined: Sat Sep 15, 2012 6:59 am
- Location: Krautland ****
- Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400
Re: FONTCHARACTER Reference - compatibility, sets
I do not understand what you mean. Could you give an example, please.cakeisalie5 wrote:Yay, I'll try using that! What about the multi-character opcodes (that are defined using one or more other characters), have you found out how it's stored?
I'll be back!
- cakeisalie5
- Senior Member
- Posts: 101
- Joined: Sun Mar 27, 2016 10:24 am
- Location: France
- Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50
Re: FONTCHARACTER Reference - compatibility, sets
For example:
- 0xF710 is resolved as "Locate ";
- 0xC8 is resolved as "a" (but 'a' is 0x61, and 0xC8 is described in the catalog as "a (Reg)").
- 0xF710 is resolved as "Locate ";
- 0xC8 is resolved as "a" (but 'a' is 0x61, and 0xC8 is described in the catalog as "a (Reg)").
Part of the Planète Casio community (FR) - main author of Cahute
- SimonLothar
- Senior Member
- Posts: 605
- Joined: Sat Sep 15, 2012 6:59 am
- Location: Krautland ****
- Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400
Re: FONTCHARACTER Reference - compatibility, sets
Yes. Opcodes and MB-characters follow different concepts.
Syscall 0x07FC can be used to fetch the display-string of an opcode.
The display-string consists of MB-characters.
F. i. 0xC8 is the opcode for the regression coefficient a and it is displayed using the character a (0x61) resp.the string "a".
0x81 is the opcode for sin and it is displayed using the string "sin".
---
0x07FC: int OpcodeToStr( unsigned short opcode, unsigned char *string );
Returns a displaystring in string according to opcode.
The string is copied. The size of the target buffer string must be 32 bytes.
Syscall 0x07FC can be used to fetch the display-string of an opcode.
The display-string consists of MB-characters.
F. i. 0xC8 is the opcode for the regression coefficient a and it is displayed using the character a (0x61) resp.the string "a".
0x81 is the opcode for sin and it is displayed using the string "sin".
---
0x07FC: int OpcodeToStr( unsigned short opcode, unsigned char *string );
Returns a displaystring in string according to opcode.
The string is copied. The size of the target buffer string must be 32 bytes.
I'll be back!
- cakeisalie5
- Senior Member
- Posts: 101
- Joined: Sun Mar 27, 2016 10:24 am
- Location: France
- Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50
Re: FONTCHARACTER Reference - compatibility, sets
SimonLothar wrote:Yes. Opcodes and MB-characters follow different concepts.
But they are located on the same table, right? Like, the FONTCHARACTER reference I put together puts the two in the same table, and there were no incompatibility.
SimonLothar wrote:Syscall 0x07FC can be used to fetch the display-string of an opcode.
The display-string consists of MB-characters.
The problem is, I would like to be able to reproduce this (and related) syscalls on the PC. One of the primary goals would be to see which characters are implemented in an OS image, in order to check if each opcode is supported by the system or not. That's why I asked if we could extract this opcode <-> multi-byte string correspondance from the system :p
Part of the Planète Casio community (FR) - main author of Cahute
- SimonLothar
- Senior Member
- Posts: 605
- Joined: Sat Sep 15, 2012 6:59 am
- Location: Krautland ****
- Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400
Re: FONTCHARACTER Reference - compatibility, sets
The charater definitions, t. i. the glyph-tables are located in different tables compared to the opcode/string tables. I checked images between OS 1.02 and OS 2.09. The glyph tables have been extended at least since OS 2.00.cakeisalie5 wrote:But they are located on the same table, right?
That is more complicated. I am not sure, if it is possible to develop an algorithm to gain the opcode-to-string tables. In the worst case you have to use an OS-dependent absolute address-table. I'll have a look.cakeisalie5 wrote:The problem is, I would like to be able to reproduce this (and related) syscalls on the PC. One of the primary goals would be to see which characters are implemented in an OS image, in order to check if each opcode is supported by the system or not. That's why I asked if we could extract this opcode <-> multi-byte string correspondance from the system
I'll be back!
- SimonLothar
- Senior Member
- Posts: 605
- Joined: Sat Sep 15, 2012 6:59 am
- Location: Krautland ****
- Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400
Re: FONTCHARACTER Reference - compatibility, sets
There seems to exist a systematic method to retrieve the opcode-table-pointers from a fx-9860 OS image (at least for OSes 1.02 to 2.09).
Again this is a method written in a C-like language.
Keep in mind, that the strings the table points to, are Multibyte-Strings.
Again this is a method written in a C-like language.
Method: Show
Keep in mind, that the strings the table points to, are Multibyte-Strings.
Example: Show
I'll be back!
- cakeisalie5
- Senior Member
- Posts: 101
- Joined: Sun Mar 27, 2016 10:24 am
- Location: France
- Calculators: Casio Afx 1.0, Casio fx-9860GII, Casio fx-CG50
Re: FONTCHARACTER Reference - compatibility, sets
So I've adapted it to understand and read using a file's content on my PC:
[[See next post]]
And if I understand well, the second dword is the flags of the entry. What I don't understand is that in your example, the size of the element is the high nibble of the first byte of the flags, where here, it looks like it is the lowest nibble. Also, the characters looks deformed: for 0x0E, it should be 0xE591 but it is 0xE691, 0x14 should be [0x66,0x31] but it is [0x66,0xD1]...
[[See next post]]
And if I understand well, the second dword is the flags of the entry. What I don't understand is that in your example, the size of the element is the high nibble of the first byte of the flags, where here, it looks like it is the lowest nibble. Also, the characters looks deformed: for 0x0E, it should be 0xE591 but it is 0xE691, 0x14 should be [0x66,0x31] but it is [0x66,0xD1]...
Last edited by cakeisalie5 on Sat Jan 21, 2017 2:27 pm, edited 1 time in total.
Part of the Planète Casio community (FR) - main author of Cahute
27 posts
• Page 1 of 3 • 1, 2, 3
Return to Calculator Hacking/Modding Discussions
Who is online
Users browsing this forum: No registered users and 1 guest