
Reverse Assembling 9860
#41
Posted 22 August 2006 - 02:10 PM
#42
Posted 22 August 2006 - 07:41 PM
I registered with the contest already, but forgot it over the troubles of the
last 2 weeks.
#43
Posted 30 August 2006 - 05:57 PM
Reverse Engineering
Perhaps it is worth reading

It is focused on the x86 ( big surpize) and it has some comprehensive explanations that might help us getting somewhere

#44
Posted 30 August 2006 - 08:11 PM
#45
Posted 31 August 2006 - 04:12 AM
About capturing the signal... well, it is possible... you will get a nice bin file. And you don't know the processor architecture, so you can't desassemble it...
Even if you had a ROM image, what would you do with it? (no offense)
put in in a hex editor? and then what? It is most likely it is not x86 compatible, (it might be, yet it is not likely).
Now other thing, I have tried to change some strings in the physium add in, and the FA 124 refused to transmit, claimed it was in the wrong format (despite it being obviously a g1a) , so my guess is that there is some kind of checksum that confirms the authenticity of the add in.
There would be 2 ways to detour this:
Crack the Fa124 so it does not check for the add-in check sum (and the calculators OS as it probably does the checksum too)
or
with the three add ins that we got so far, atempt to try find the piece of hex where the checksum value is.
Then try to change the strings modifying this piece of hex acordingly...
(this is just crapy theory I really am not seeing how we are going to do this for real).

#46
Posted 31 August 2006 - 04:27 AM

If I had the ROM image, I would try any disassembler I could get my hands on and see if it would work. The oscillator is clocked at 40MHz right? It could be VERY HIGHLY that the fx-9860 is using ARM architecture. ARM is very popular now, almost 75% of all 32 bit embedded products (PDA, mobile phones, media players and calculators) use it. Also has low power consumption. It is very likely the ARM is being used in the fx-9860.
#47
Posted 01 September 2006 - 01:44 PM
Now , do you know a way to loopback a USB transmition? kind of a driver that would allow us virtual USB ports.?
Sorry wanted to bring the talk to back here in this thread. Sounded more logical. Now I'm currently looking for a way to that. Looking it up on Google, tech forums, etc...
#48
Posted 01 September 2006 - 01:47 PM
#49
Posted 01 September 2006 - 08:07 PM

People who own a fx-9860 can now try capturing the ROM now, provided that you didn't upgrade yet. It won't download the ROM if you already have the latest version.
#50
Posted 02 September 2006 - 03:36 AM
Perhaps a Hard Reset?
#51
Guest_Guest_*
Posted 02 September 2006 - 04:14 AM
The 9860 uses the same core as the ClassPad but doesn't have the GUI written in C++. Just look at the PV1600 and ClassPad SDK to get an idea of what is in the 9860. If you look at the ClassPad SDK don't bother with the C++ functions, just the C functions.
#52
Posted 02 September 2006 - 03:10 PM
Is there any proof of this?
#53
Posted 02 September 2006 - 04:02 PM
#54
Guest_Guest_*
Posted 03 September 2006 - 06:53 AM
Can't say how I know, I just do.How do you know this?
Is there any proof of this?


SH, huh? I remember reading about it in a magazine
Yep.
#55
Posted 03 September 2006 - 05:17 PM
Well IDA pro suports most of the SH processors in disassembling... I am going to see if I can find it in the p2p network...then I'll try some g1a files...
#56
Posted 04 September 2006 - 03:39 AM

#57
Posted 04 September 2006 - 05:08 AM
#58
Posted 04 September 2006 - 03:04 PM
LordNPS, I tried emailing you my findings. You're email address, LordNPS AT hotmail.com doesn't seem to work. I get a postmaster error from hotmail.com. It's saying your email account is full and that my email is too big to get to you...
#59
Posted 04 September 2006 - 05:35 PM
very Good work Kuacalc, I have a little bunch of tools for the SH processor, tipped of by the guest user, I decided to install the SDK for the Classpad 300 and it contained a file call SH tools, which contains an assembler and some other tools, who are most likely to prove themselves usefull to us.
Now I am looking forward for being able to examine those bin files myself from the OS update.
Edit: I did not find a IDA pro at the gnutella network, I don't really see how I am getting a disassembler for the SH... doeas any one know a good disassembler that supports SH?
Edit, Edit : It is strange, my hotmail account has still plenty of space and it is active... I don't know why it didn't work...oh well, I think that Msn is affiliated with microsoft...
#60
Posted 04 September 2006 - 07:46 PM

#61
Posted 05 September 2006 - 12:16 AM
While I was looking at the ROM, found some interesting stuff:
* There's functions for inputing a date, time and year. Is there a real time clock in the fx-9860?
* There's even a secret testing menu (can't figure out the combination to keys thought, if there is a combo...) like in the old FX and CFX
1. PATTERN 4. VERSION
2. FUNC 5. SERVICE
3. TEST 6. CONTRAST
* Some remnants of SD functions even in the non SD update. Could clean that up...
#62
Posted 05 September 2006 - 12:56 AM
So, hidden menu eh? well just what key combination would it be?
It shoud be something sounding involving the main buttons of the calc.
About the timing a date thing, it would be nice, however I think If casio had the oprtunity, they would have incorporated all they could into their machine right? They would noy spare the chance to get back at Ti , who happens to have timing and date in their calcs...
I really don't know what to think, I am going to conduct my own exams to the processor, as I said, I think it is the same as class pads, which I happen to have the processor manual... If you want I'll e-mail it to you.
Edit: From the processor manual to, in the appendix there is something about the data file structure, and the OS update uses that data structure... for example 8 characters file names in the headers... : CASIOABC and programs and list names may only contain 8 characters of name...
#63
Posted 05 September 2006 - 01:28 AM
Disassembly works with instruction sets of SH3, SH4 and higher. (Guess it's not using SH1 or SH2). My friend gave me his copy of IDA Pro Advanced. But I'm overwhelmed by the vast amount of assembly routines in the ROM. I'm trying to look for an SH Emulator, so I could see my experimentations with the ROM. If you could email me the User Manual for the ClassPad CPU, that would be helpful, as I don't really understand much of this CPU archeticture.
#64
Posted 05 September 2006 - 01:59 PM
About the timing a date thing, it would be nice, however I think If casio had the oprtunity, they would have incorporated all they could into their machine right? They would noy spare the chance to get back at Ti , who happens to have timing and date in their calcs...
Well the AFX have an RTC clock but we had to discover it and create program to set and read the date... Casio never made any clock program.
#65
Posted 05 September 2006 - 08:49 PM
#66
Posted 06 September 2006 - 06:01 PM
#67
Posted 07 September 2006 - 12:37 AM
I haven't checkked my e-mail yet, but I will shortly.
Are you trying to modify the emulator for supporting add ins? Wow, thats big...
I don't know how does de emulator works, but I guess it would be quite hard to do that? How exactly do you sugest? My guess is that the emulator, does not emulate the SuperH architecture and then uses the rom, but emulates the Rom itself, making add-ins impossible...
I haven't done much resarch yet. As soon as I get the time, I will dedify myself more to that.
When school start again, I'll have a bunch of programming teachers, who might help me with this thing.
#68
Posted 07 September 2006 - 01:30 AM
The total flash memory is 4MB. The ROM file is currently at 2.5MB. That leaves you with only 1.5MB flash memory as the ad says. Although, you actually could have more flash memory. They put in a whole bunch of junk code (or should I say blank code), to make the ROM size as close as 2.5MB so you would only have 1.5MB left. Oh well, I have never used up all the 1.5MB storage... I believe, you can easily free up another 500kb of flash so you can have 2MB. I also don't understand why they allocate 64Kb for the user, and leave 448kb for the OS to do whatever it wants. It doesn't even need all the 448kb.... Why aren't they making their calculators the best it could be?
Perhaps they did it to make it look more friendly for students and little kids. I wonder how Casio would react (they would probably be very angry or such...), if we were to release our own OS updates....
Anyway, I really need a high-res picture of the fx-9860 PCB. I don't have the correct screwdriver type for opening mine up. If anyone could send me this, I would really appreciate it.
#69
Posted 07 September 2006 - 06:14 PM


db ink2405F23
you read
db 'Error Memory Full'
Now, about the not beign emulating the processor but the OS it was as I thought.
Everything, ore most is X86, and there is no Data file with the OS in the emulator, I've run a Diff and there isn't. Anything considerable.
Another thing, for disassembling the OS, what settings did you use for memory and Rom?
Now about us releasing a software update ourselves, that would be great, and if it pissed off Casio, even better.

And another thing:
About Casio doing this, it is quite simple and logical.
The reason why casio purposfully diminuishes the quality of the 9860 is because in the ads, it must look as if it is slighly better, because they have other calc to sell.
If you were casio and you were stuck with 300 000 CFXs what would you do?
You would jump throw a calculator worlds apart from you own? leaving every other in the shelf?
No, you would improve it a little and raise the price, making it as a better alternetive to the CFX, else no one would buy them anymore.
So in order for things not getting out of control, they Clock the processor at 40 Mhz even though it could sustain 160 or so, they fill their memory chips with plenty of junk data, and assign to the system 9/10 ths of the RAM.
If you really think about it, it makes sense. If it doesn't drink a few of beers and it will.
#70
Posted 08 September 2006 - 01:31 PM
For IDA Pro, I let it detect ROM and memory settings. Have you figured out how add-ins work. Don'y have much time for this now, since I'm going back to school... Maybe on the weekends....
#71
Posted 08 September 2006 - 05:16 PM


I have to spend well these last summer days...while I still can, (by spending them well I mean, not spending them looking at the sutpid ASM code of the 9860's OS), you should do the same, miss classes or something.
But about that add-in thing... well just say something, what do you know for instanance.
#72
Posted 08 September 2006 - 11:48 PM
I'm not sure if my theory is correct however. Someone else will have to check this, because high school is hogging up my time, with my college level AP courses, honors, engineering and drafting leads to so much homework.... Teachers are trying to pressure me to get an TI-83+, when my Casio fx-9860 is so much better!

Me and my friends are also trying to set up a channel for Casio calculators, which could provide some sort of instant messenging so people could ask questions, get answers instantly and talk about other developments: http://www.casiocalc...?showtopic=2877. You have to log on to see the topic though....
#73
Posted 09 September 2006 - 01:45 AM
Now that I have the tools...Why won't you open your calculator, and look in yourself (you only need a small goldsmith screwdriver(I don't really know if that's the correct translation from portuguese "chave inglesa de relojoeiro"), you can find a set of these at any common tool shop or chinese bazar...)?
I E-mailed you yesterday about that, I don't have any hi res pics of the PCB ( printed circuit board I guess...) howevere if I right recall, CFX Master had some he sent to Huhn...
Perhaps if he still has them, he can send them to you.
About the Add-ins, I think that the header is no mistery... I'll try swap a couple of thinhgs just to see what happens... i just hope it does not mess up with my calc...
You said you were able to change some strings without problem right?
I think we once concluded it was interpreted code, for the size is rather smaller than a asm program for AFX...
I don't know what to think... perhaps the OS has a set of functions that make things simpler... best thing we could hope for, a full size programming environment. I highly doutbt that, but I'll try to use my limited reverse engineering skills into solving the g1a.
#74
Posted 09 September 2006 - 02:04 AM
Anyway, I think add-ins are hybrids. I think they make external calls to functions in the OS, such as for displaying text, gathering user input, manage use of data, etc. Anyway, I'll try figuring it out on the weekend. I have started forming a list of structures on how the format header in add-ins works. Maybe when I have the time to organize my things, I'll post it....
#75
Posted 14 September 2006 - 11:52 PM
Oh well, I'll just have to go to Home Depot, and buy the correct type of screwdriver to open up my calc. By the way, I got Microsoft Visual Studio which contains the SHASM assembler. Now I can reassemble my own binaries of the OS ROM. The problem is though, SHASM gives out an output of an object format (COFF). Does anyone know a converter that converts COFF to BIN? Non-official OS updates will be released soon once I figure this out.
#76
Posted 15 September 2006 - 07:07 PM
http://www.gnu.org/s...binutils_3.html
objcopy (GNU Binary Utilties)
#77
Posted 16 September 2006 - 12:11 AM

#78
Guest_Guest_*
Posted 18 September 2006 - 12:30 PM
You can convert object files using this tool:
http://www.gnu.org/s...binutils_3.html
objcopy (GNU Binary Utilties)
That's an interesting app - But it may not be sufficient for the task

The reason - When objcopy generates a raw binary file, it will essentially produce a memory dump of the contents of the input object file. All symbols and relocation information will be discarded.
From what I can remember about my previous work on such things, the object file will contain relocation information that should be taken into account. I've previously had to write 'obj (exe) to bin' tools for the 80x86, but I don't have the details on this particular format or (unfortunately) the time to investigate fully.
However, I will keep my eyes open for one - My thought is that Windows CE tools should have a similar tool for their 'execute in place' format.
Cheers from the 'lover of all things assembler'
#79
Posted 27 September 2006 - 12:09 AM
Also I'm recruiting people who want to help develop the SDK. LordNPS and I can't only do it by ourselves. If anyone is good with electronics, assembly or SuperH architecture, post here or PM me and I'll show you what we have figured out so far...
#80
Posted 27 September 2006 - 08:04 AM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users