FONTCHARACTER Reference - compatibility, sets
27 posts
• Page 3 of 3 • 1, 2, 3
- 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
MB_ByteCount is called inside of MB_strcpy again.cakeisalie5 wrote:Well, it looks like MB_strcpy doesn't use the result of MB_ByteCount. So anyway, yeah, that looks null-terminated.
Withcakeisalie5 wrote:Well actually, the syscall I have here (OS 2.05, fx-9860GII-2) uses a cmp/gt, so it is < 0xLLFF (where 0xLL is the leading character).
mov #-1, r1
extu.w r4, r6
extu.b r1, r1
cmp/gt r1, r6
it is r6 > 0xLLFF (not < 0xLLFF).
I'll be back!
- cakeisalie5
- Senior Member
-
- Posts: 102
- 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:MB_ByteCount is called inside of MB_strcpy again.
Well, that's at least sort of null-terminated, as expected

MB_ByteCount: Show
SimonLothar wrote:it is r6 > 0xLLFF (not < 0xLLFF).
Actually, it's 0xLLFF > r6

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
Funny thing, that. A disassembler which freely swaps the order of operands.cakeisalie5 wrote:the disassembler just puts it in another order than the official one
I'll be back!
- lephe
- Member
-
- Posts: 39
- Joined: Fri Aug 21, 2015 11:54 am
- Location: France
- Calculators: Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860GII, Casio fx-CG50
Re: FONTCHARACTER Reference - compatibility, sets
Swapping operands, are you sure? Here's what the Renesas SH-3 software manual says:
I've double-checked the language file from my disassembler and it states:
Then (to be sure) I tried disassembling a simplistic assembly file; here's what I got:
As you can see gcc and the doc use the same operand order as me. Did I miss anything?
Edit: After a short talk with Cakeisalie5 about this matter, I realized that the problem came from the bt instruction just after the test. This branch leads to the following if/else case so the test is negated. The disassembler was right regarding the operand order, and Cake's C code should state <= 0xLLff instead of <.
- Code: Select all
CMP/GT Rm,Rn 0011nnnnmmmm0111
When signed and Rn > Rm, 1 → T
I've double-checked the language file from my disassembler and it states:
- Code: Select all
0011nnnnmmmm0111 cmp/gt rm, rn
Then (to be sure) I tried disassembling a simplistic assembly file; here's what I got:
- Code: Select all
rook» tmp $ cat a.s
cmp/gt r2, r3
rook» tmp $ sh3eb-elf-objdump -D a.bin -b binary -m sh3
(...)
0: 33 27 cmp/gt r2,r3
rook» tmp $ fxos disasm a.bin -o 0 -l 2
0: 3327 cmp/gt r2, r3
As you can see gcc and the doc use the same operand order as me. Did I miss anything?
Edit: After a short talk with Cakeisalie5 about this matter, I realized that the problem came from the bt instruction just after the test. This branch leads to the following if/else case so the test is negated. The disassembler was right regarding the operand order, and Cake's C code should state <= 0xLLff instead of <.
Last edited by lephe on Mon Jan 30, 2017 8:27 pm, edited 1 time in total.
- cakeisalie5
- Senior Member
-
- Posts: 102
- 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
My fault. >_> (at least now I know)
So yeah, it's <= 0xLLFF.
So yeah, it's <= 0xLLFF.
Part of the Planète Casio community (FR) - main author of Cahute
- cakeisalie5
- Senior Member
-
- Posts: 102
- 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
Finally made something more or less complete! I just need to perfect the names and Unicode equivalents, and to correct the IDs so I can use it in a C library, but otherwise, the FONTCHARACTER reference should allow to make more or less the same opcode resolution table as in the OS! 
Also, compatibility from 1.00 to 2.05 is managed, using sets (OS_1.00, OS_1.05, OS_2.00, OS_2.04).
The source is here:
https://github.com/cakeisalie5/fontcharacter_reference

Also, compatibility from 1.00 to 2.05 is managed, using sets (OS_1.00, OS_1.05, OS_2.00, OS_2.04).
The source is here:
https://github.com/cakeisalie5/fontcharacter_reference
Part of the Planète Casio community (FR) - main author of Cahute
- DasHeiligeDönerhuhn
- Junior Member
- Posts: 12
- Joined: Tue Jan 12, 2021 7:45 pm
- Calculators: Casio Classpad fx-CP400
Re: FONTCHARACTER Reference - compatibility, sets
Dunno if it helps, but on page 138 and onward of this PDF document there is a specification of Classpad2 characters. https://asset.re-in.de/add/160267/c1/-/ ... -H-x-T.pdf
27 posts
• Page 3 of 3 • 1, 2, 3
Return to Calculator Hacking/Modding Discussions
Who is online
Users browsing this forum: No registered users and 25 guests