Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
18 May, 2013, 22:38:26 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 [2] 3 4   Go Down
  Print  
Author Topic: Hacking into the .g3p/b format [HALTED] -  (Read 3596 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
helder7
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 23 April, 2013, 23:51:41
Date Registered: 24 December, 2011, 01:08:51
Posts: 183


Total Post Ratings: +32

View Profile
« Reply #15 on: 08 March, 2012, 01:54:25 »
0

I made some interesting discoveries

the .g3p/g3b file save the vwindow, xmin, xmax...




Logged

Casiopeia | Casio Wiki | eAct Maker [New!] | fxMouse [Control pc with fx9860!]
SimonLothar
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 20 March, 2013, 17:01:25
Date Registered: 16 February, 2011, 08:25:46
Location: Krautland
Posts: 122


Total Post Ratings: +33

View Profile
« Reply #16 on: 11 March, 2012, 18:30:36 »
+1

Anyone skilled in disassembling PC programs like the Casio image converter? Because I'm not... Tongue
And Simon doesn't seem to be interested in reverse-engineering the CAPTURE routine.

In the worst case, this could take us another year.
The Prizm OS detects the CG10 via syscall 0x1196, which checks for the byte at 0xA0000305 to be 0x5A.
When opening a g3p-file the "Invalid Type"-message (msgno 0x3E) appears, if syscall 0x1196 detects a CG10.

Hence a byte inside of syscall 0x1196 would have to be modified.
At the moment I do not see another way to bypass the CG10-restriction.

BTW: I'd rather not think about changing the byte at 0xA0000305.
Logged

I'll be back.
fxdev
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 19 March, 2013, 20:52:08
Date Registered: 18 January, 2011, 16:21:14
Posts: 177

Topic starter
Total Post Ratings: +28

View Profile
« Reply #17 on: 11 March, 2012, 19:15:14 »
0

Quote
At the moment I do not see another way to bypass the CG10-restriction.
OS modding is a last resort only.

I have another idea:
Instead of cracking the image checksum and changing the type ID (which is hopefully not required for decompression, because this would mean complete repackaging using zlib), couldn't we just modify the image converter to write the ID 0x3C1B instead of 0x789C before the checksum calculation takes place? Worth a try...

Holy crap, the image converter does not seem to be protected. Grin
« Last Edit: 11 March, 2012, 19:38:50 by cfxm » Logged
JosJuice
LV9 Veteran (Next: 1337)
*********
Offline Offline

Last Login: Today at 20:32:02
Date Registered: 24 September, 2010, 16:46:12
Location: Sweden
Posts: 1300


Total Post Ratings: +51

View Profile
« Reply #18 on: 11 March, 2012, 20:55:55 »
0

I have another idea:
Instead of cracking the image checksum and changing the type ID (which is hopefully not required for decompression, because this would mean complete repackaging using zlib), couldn't we just modify the image converter to write the ID 0x3C1B instead of 0x789C before the checksum calculation takes place? Worth a try...

Holy crap, the image converter does not seem to be protected. Grin
That might work, but this method is likely to be troublesome because of legal issues. Casio's converter is tricky to get, and I'm not sure if patching it is allowed.
Logged

SimonLothar
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 20 March, 2013, 17:01:25
Date Registered: 16 February, 2011, 08:25:46
Location: Krautland
Posts: 122


Total Post Ratings: +33

View Profile
« Reply #19 on: 12 March, 2012, 19:56:21 »
0

But I don't know if the Prizm adds extra security against modifications.
Obviously...it doesn't.  Grin
« Last Edit: 12 March, 2012, 19:57:41 by SimonLothar » Logged

I'll be back.
fxdev
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 19 March, 2013, 20:52:08
Date Registered: 18 January, 2011, 16:21:14
Posts: 177

Topic starter
Total Post Ratings: +28

View Profile
« Reply #20 on: 12 March, 2012, 22:33:55 »
0

So you wrote the first OS modifying add-in? Casio learnt nothing... Tongue
« Last Edit: 12 March, 2012, 23:50:08 by cfxm » Logged
SimonLothar
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 20 March, 2013, 17:01:25
Date Registered: 16 February, 2011, 08:25:46
Location: Krautland
Posts: 122


Total Post Ratings: +33

View Profile
« Reply #21 on: 14 March, 2012, 21:03:40 »
0

So you wrote the first OS modifying add-in?
Yes.

Casio learnt nothing...
I wouldn't state it this way. I did my first OS mod on a fx-9860G four years ago. Did not raise much general interest. I think it is reasonable that Casio did not bother.
Logged

I'll be back.
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #22 on: 02 April, 2012, 07:21:45 »
0

Hopefully it is possible to convert images between both models in the future. The French Casio community is growing larger, but most people use BASIC for their games. As a result, about 50% of the existing PRIZM games only work on european models. Cry
« Last Edit: 02 April, 2012, 07:23:58 by DJ_O » Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
flyingfisch
I'm 1337 now!
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Today at 15:43:21
Date Registered: 26 August, 2011, 21:18:14
Location: OH, USA
Posts: 1476


Total Post Ratings: +75

View Profile WWW
« Reply #23 on: 02 April, 2012, 17:25:03 »
0

I understand why you would want to hack the g3p/b format, but I just thought i would throw this question out: would it be very hard to make a viewer for common image formats? (*.bmp, png, jpg, tiff... maybe even svg O.o)
Logged




Quote from: my dad
"welcome to the world of computers, where everything seems to be based on random number generators"



The Game V. 2.0
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #24 on: 03 April, 2012, 20:28:08 »
0

I would actually like a tool to view calc images on the PC, like TI-Connect has. It's annoying to have to open a copy of the emulator then import the files to view them. X.x
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
SimonLothar
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 20 March, 2013, 17:01:25
Date Registered: 16 February, 2011, 08:25:46
Location: Krautland
Posts: 122


Total Post Ratings: +33

View Profile
« Reply #25 on: 04 April, 2012, 18:52:02 »
0

Obviously
"inflate 1.2.3 (Copyright 1995-2005 Mark Adler)"
is used to compress/decompress G3P files.
« Last Edit: 04 April, 2012, 18:52:23 by SimonLothar » Logged

I'll be back.
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #26 on: 04 April, 2012, 19:35:42 »
0

I meant one that is actually available for download for everyone (although Casio might not like that if the said tool can edit/save/compress images)
Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
SimonLothar
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: 20 March, 2013, 17:01:25
Date Registered: 16 February, 2011, 08:25:46
Location: Krautland
Posts: 122


Total Post Ratings: +33

View Profile
« Reply #27 on: 06 April, 2012, 09:26:23 »
0

I meant one that is actually available for download for everyone
I agree, of course. But the prerequisite for such a tool is the knowledge of the algorithm. I am sure there are people around, who are more experienced in deflate/inflate-algorithms and faster in developing such a tool than me. BTW, I wonder if the deflate/inflate syscalls (f. i. 0x0821 and 0x0822 are involved) can be generally used on-calc to compress/decompress data.

(although Casio might not like that if the said tool can edit/save/compress images)
The inflate 1.2.3-algorithm (Copyright 1995-2005 Mark Adler) is no secret.
You can use it freely (For conditions of distribution and use, see copyright notice in zlib.h;http://www.raspberryginger.com/jbailey/minix/html/zlib_8h-source.html).
Though, perhaps they'll mind the bit-swapping like AAABBBBB <-> ~BBBBBAAA of the packed data block starting at offset 0xD0 to be unveiled. I am a newbie with deflate/inflate-algorithms (I hope I can change this in the time coming), but I do not think this bit-swapping is part of the inflate 1.2.3-algorithm. On the other hand bit-swapping is a general technique to camouflage information.
« Last Edit: 06 April, 2012, 09:43:44 by SimonLothar » Logged

I'll be back.
DJ Omnimaga
Retired Omnimaga founder (Site issues must be PM'ed to Netham45, Eeems, Shmibs, Deep Thought and AngelFish, not me.)
Editor
LV15 Omnimagician (Next: --)
*
Offline Offline

Gender: Male
Last Login: Today at 18:13:08
Date Registered: 25 August, 2008, 07:00:21
Location: Québec (Canada)
Posts: 50196


Total Post Ratings: +2611

View Profile WWW
« Reply #28 on: 07 April, 2012, 05:38:25 »
+1

Apparently the hacking of the g3p/b format topic seems to have made a group of Casio PRIZM coders in the calculator community worried, because of the consequences the release of such tool could cause to the Casio PRIZM community. Although I have good faith that anybody posting in this thread want this tool to be used only for program development or to allow Planète-Casio BASIC games to be played on american PRIZM models, if this tool gets released publicly or even in the spam forum (which requires 500 posts), it will inevitabely fall under the wrong hands, eventually.

Personally, the only way around this that I thought is that once released, a trusted TI community member volunteers to convert images destined for programming use themselves, upon programmer/gamer requests, and that this person never release the tool anywhere. Otherwise, if released, I guarantee you that eventually someone will use it to cheat in tests or to stock porn in his calc. And even if that was to never happen, Casio will most likely worry that it will, and their reaction might be to lock down their calcs even more, potentially at the detriment of you good guys making games and useful tools for all of us. And sadly, Omnimaga and Cemetech did encounter their share of students asking help to cheat on tests before ( http://www.omnimaga.org/index.php?topic=12458.0 being an example, and see Calc84maniac's sarcastic response), and it was most likely even worse on other calc sites that aren't as programming-oriented as us, so even if that tool was only released privately to any member above 1000 posts, I am sure eventually it could lead to bad consequences. And this would be the last thing the community wants, especially when there are people trying to strenghten relations between Casio and the community.

The problem, though, is would anybody ever be willing to volunteer for converting people's pics himself (and filtering innapropriate ones)? My idea is that the pic request requires a link to the user's project in the works or a link to a FX-cg20-only game that he needs converted, so the person doesn't receive too many requests, but even then I worry this could be tedious for the person.
« Last Edit: 07 April, 2012, 05:48:04 by DJ_O » Logged

Retired 83+ coder, Omnimaga/TIMGUL founder. Now doing power metal music (formerly did electronica)

Follow me on Bandcamp|Facebook|Reverbnation|Youtube|Twitter|Myspace
ruler501
Crazy Freshman
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Today at 20:03:15
Date Registered: 08 November, 2010, 02:32:33
Location: In a cave with two spots of light and lots of meat
Posts: 2381


Total Post Ratings: +49

View Profile
« Reply #29 on: 07 April, 2012, 05:51:06 »
+1

DJ_O while that idea may work for proving to the calc companies we are not trying to cheat and just want to have fun and or make a good program. I think that it would discourage some people from making programs because they'd have to msg/email/ask someone to convert there images for them. I personally would rather have it released to the whole community even if it might make casio try to block it. I personally believe that even if we got past it and gave the conversion method to only a few people casio would still try to prevent it just because the proof that it can be done is out there and might make some test officials scared.
Logged


Spoiler for "Projects":
My current games I am working on our:
  I might have an improved C version of this somewhere...
pSDL too lazy too make a userbar so I'll just link to the topic i update routinely http://www.omnimaga.org/index.php?board=146.0
Spoiler for "Misc images of test things":
NerdTests.com says I'm a Dorky Nerd God.  Click here to take the Nerd Test, get geeky images and jokes, and talk to others on the nerd forum!My computer geek score is greater than 100% of all people in the world! How do you compare? Click here to find out!"<br />[url=http://www.nerdtests.com/ft_personality.php?ref=42769
[/url]
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCM/CS/M/S d- s++: a---- C++ UL++ P+ L++ E---- W++ N o? K- w-- o? !M V?
PS+ PE+ Y+ PGP++ t 5? X R tv-- b+++ DI+ D+ G++ e- h! !r y

------END GEEK CODE BLOCK------
"KnifeOn!  Apply directly to the forehead!  KnifeOn is available without a prescription at retailers nationwide."
Pages: 1 [2] 3 4   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.394 seconds with 31 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.