Omnimaga

Calculator Community => Major Community Projects => The Axe Parser Project => Topic started by: p2 on July 13, 2011, 11:24:11 am

Title: Drawing Pictures for Axe
Post by: p2 on July 13, 2011, 11:24:11 am
Can anyone Help me?
I try to draw pictures in this funny code [0011001ABC1054332324...] But don't know how.
I always changed something in the code, and wondered about the chacture. but I have no idea how to draw correctly in this code.
For example, how to draw this x-Wing?
(I mean in a 12x8-picture, or something like this.
Spoiler For image:
(http://www.sg.hu/kep/2010_02/0205s2.jpg)
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on July 13, 2011, 11:48:20 am
Easy to explain, hard to do ;D
The funny code is hexadecimal, and supports only black and white; 0 and 1.
First, put your image in binary. Every pixel is changed into a number (1 if black, 0 if white).
Then, translate Binary to Hexadecimal. When you have finished reading it, re-read the first sentence.

If you only make a 8x8 sprite, it is easier to use AxePaint.
Title: Re: Drawing Pictures for Axe
Post by: p2 on July 13, 2011, 11:58:17 am
Then, translate Binary to Hexadecimal.
HOW?????????
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on July 13, 2011, 12:20:08 pm
Well, with your numbers, make a multiple of eight lenght by adding zeros (I'm French, so even me doesn't understand what I just said). I mean, If you have 111, do 00000111. If you have 1010010001, do 0000001010010001.
Then, change every pack of four by its hexadecimal equivalent. 0001 becomes 1; 0010 becomes 2; 1000 becomes 8, 1010 becomes A, etc. So 0110010010001101 becomes 648D

EDIT: ???I never used the word "bit" or "byte" in my post :o
And the X-Wing would be too large for the TI I think
Title: Re: Drawing Pictures for Axe
Post by: calcdude84se on July 13, 2011, 12:22:58 pm
Hopefully I'm not repeating a lot.
So, first pad the sprite to a width that's a multiple of 8 if necessary.
Then convert the picture to binary; black is 1, white is 0.
Then, as Hayleia said, you need to put that in hexadecimal, four bits at a time.
If you want a chart, here it is. I do hope you figure out why it's like this, though :)
BinaryHexadecimal
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F
(Maybe I should have done that table horizontally...)
Title: Re: Drawing Pictures for Axe
Post by: p2 on July 13, 2011, 12:28:53 pm
cool, thanx!!!
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on July 13, 2011, 12:30:31 pm
Hopefully I'm not repeating a lot.
So, first pad the sprite to a width that's a multiple of 8 if necessary.
Then convert to picture to binary; black is 1, white is 0.
Then, as Hayleia said, you need to put that in hexadecimal, four bits at a time.
If you want a chart, here it is. I do hope you figure out why it's like this, though :)
Binary Hexadecimal
   ...
(Maybe I should have done that table horizontally...)
Maybe you repeated what I said, but at least, I understand what you said, while I'm not sure that what I wrote makes any sense.
Title: Re: Drawing Pictures for Axe
Post by: Broseph Radson on July 14, 2011, 01:29:48 pm
I actually made an image version of this here (http://ourl.ca/8858)
Hopefully I'm not repeating a lot.
So, first pad the sprite to a width that's a multiple of 8 if necessary.
Then convert the picture to binary; black is 1, white is 0.
Then, as Hayleia said, you need to put that in hexadecimal, four bits at a time.
If you want a chart, here it is. I do hope you figure out why it's like this, though :)
BinaryHexadecimal
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F
(Maybe I should have done that table horizontally...)

I actually made an image version of this here (http://www.omnimaga.org/index.php?action=dlattach;topic=6261.0;attach=5713)
Title: Re: Drawing Pictures for Axe
Post by: calcdude84se on July 14, 2011, 01:46:32 pm
That works too. :) You forgot 0, though :P
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on July 29, 2011, 12:27:00 pm
Is there a "Image to Hex Converter" somewhere (for the TI-83+ family) ? To put an image in hex in an appvar for example (I'm talking about 96x64 images) (because I want to avoid the [Pic0]→GDB1 thing and make [thecode]→GDB1).
Title: Re: Drawing Pictures for Axe
Post by: JosJuice on July 30, 2011, 06:49:46 am
Is there a "Image to Hex Converter" somewhere (for the TI-83+ family) ? To put an image in hex in an appvar for example (I'm talking about 96x64 images) (because I want to avoid the [Pic0]→GDB1 thing and make [thecode]→GDB1).
SourceCoder can convert image files (such as bmp) to hex.

http://www.cemetech.net/projects/basicelite/sourcecoder2.php (http://www.cemetech.net/projects/basicelite/sourcecoder2.php)
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on July 30, 2011, 07:06:31 am
I tried it, it doesn't seem to work :( it gives me only FFs.
I think I'll make it with [Pic0].
Thanks anyway.
Title: Re: Drawing Pictures for Axe
Post by: Wellen on August 08, 2011, 05:14:18 am
Is there a "Image to Hex Converter" somewhere (for the TI-83+ family) ? To put an image in hex in an appvar for example (I'm talking about 96x64 images) (because I want to avoid the [Pic0]→GDB1 thing and make [thecode]→GDB1).

Right here (http://espace-ti.e-monsite.com/rubrique,logiciel-image-en-asm,1138088.html) ;)

You're lucky, I just found it yesterday  :D
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on August 08, 2011, 05:52:03 am
Thank you for the help, but there is a problem with this one: it creates an hex code for any image so it first edits the image so it can fit in the calculator, but even if the image was perfect, it edits it, so there are some precisions of the image that are killed.
In another topic, Welcome to the forum, you should go here (http://www.omnimaga.org/index.php?board=10.0) and introduce yourself
Title: Re: Drawing Pictures for Axe
Post by: p2 on August 10, 2011, 02:12:47 pm
What's about such a tool in German?
Title: Re: Drawing Pictures for Axe
Post by: Wellen on September 23, 2011, 09:58:28 am
SourceCoder can convert image files (such as bmp) to hex.

http://www.cemetech.net/projects/basicelite/sourcecoder2.php (http://www.cemetech.net/projects/basicelite/sourcecoder2.php)
I tried it, it doesn't seem to work :( it gives me only FFs.
I think I'll make it with [Pic0].
Thanks anyway.


sorry for the necropost ^^
BUT
the tool I found don't really work indeed, as Haleyia said, so I tried the sourcecoder one that Josjuice gave, and it works !
You just have to browse to your bmp, and that's it, it seems to be able to give you some grayscales hexcode, but i just tried with a B/W pic, so I don't know.

So, p2, you can use this one http://www.cemetech.net/projects/basicelite/sourcecoder2.php (http://www.cemetech.net/projects/basicelite/sourcecoder2.php) (no need of german, cuz' you'll have anything to do but upload your bmp)

;)
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on January 28, 2012, 11:50:10 am
-.-°
Source coder won't give me the hex code for an image that is larger than 96x64.

Any other tool that would work ?
Title: Re: Drawing Pictures for Axe
Post by: ZippyDee on January 28, 2012, 03:08:22 pm
You could break it down into smaller images and splice it together...
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on January 29, 2012, 02:37:05 am
You could break it down into smaller images and splice it together...
Yes but then, I'll have to think about which hex part goes where, and I am too lazy for that :P
Anyway, what I wanted to do wouldn't work :( but thanks for trying :)
Title: Re: Drawing Pictures for Axe
Post by: ti-freak on March 25, 2014, 11:03:04 am
There are different ways to draw pictures in Axe. For 8x8 sprites you can use the Axe sprite painter. The program HEXPIC in the Axe Download file converts a 8x8 sprite to hex.

Runner112 has written a multi greyscale sprite to hex converter. The sprites can have the size 8x8 or 16x16. Here (http://http:/www.omnimaga.org/the-axe-parser-project/sprite-helpers/) is the Tread to this cool tool. The download is on page 2.

For other sizes you can use the "Data(" command:

:Data(96,64)->GDB1
:[HEXCODE]
:.Drawing on screen
:Bitmap(X,Y,GDB1
:DispGraph

If you want to draw an 96x64 sprite, the size of the Hexcode is (96x64)/4


But has your screen realy 96 pixels in a line?

Title: Re: Drawing Pictures for Axe
Post by: Matrefeytontias on March 25, 2014, 11:04:26 am
That thread was 2 years old. Didn't you see the red text saying that no posts were made in it since more than 120 days ? That was an implicit way of saying "don't post here unless you have a very good reason".
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on March 25, 2014, 12:04:14 pm
And your post absolutely doesn't answer the question because you say "put [HEXCODE] then use Bitmap", but the question was "how to get the hex code other than converting byte per byte ?"
Title: Re: Drawing Pictures for Axe
Post by: josh landers on March 26, 2014, 10:34:15 am
Yah necro-thread!
Ok so I use MS-paint to resize the image to the size, make sure that you use the pixel resize though.  And your good to upload!
Step 1 resize and turn in to greyscale.
Step 2 Upload to source coder
Code: [Select]
PART_1:PART_1:
01017E0010000003FFFFFFFC0A05E00618000007FFFFF7FCF80700E
E0000010EFFFDE3FCF78FC1FC00000207FFFFFFFCFC70017BA25F0
0007DFBFFFCD83C1DFFF9DF8800100187D4A1DFC1FF79FE100070
000FFCD2FF0FFFB1FC1081E0001BFC7471BFFFF9FC7380440003F8
08DFFFFFCFFFFFE7000204F0033FFFFFDFE3E0EF080100680FFFFFFF
BFC1E0E27807008CDFFFFFFFF945F70CB02600DCFDFFEFFEC034F37
73040007C3FFF87FF8022FBE3A00008301FFF17FF0EE2FFC4100030B
4BFFF3FFE3061FFEC400C19F4991FFFFF0063FFFFF7AE6DFC9B3FFF
FF0077FFF3CBBFFFFC3BFFFFFF00CEFFF30F7FFFFC7FFFFFFF80FFF
FE279FFFFFCFFFFFFFFFCFF2FF200FFFFFCFFFFFFFFE07C1FFE5E7F
FFFCFFFFFFFF80FFDFF9FF3FFFFCFFFFFFDF847FB7EBFE3FFFFCFFF
FEF9F1CDC3FF9FFFFFFFCFEFFCF3F3DFC7FFFFFFFFFFCFFFFFE727F
79FFE9FFFFFFFCFFFFFC007FBBEE81FFFFFFFCFFFFE003FFE7D7FFDF
FFFFFCFFFFC00FFFC3D0FC19BFFFFCFFFFC6FFF999FEFE3CFFFFFCF
FBBC7FFF08AFFFEEFBFFFFCFE3346060F9FB3FF6FE7FFFCFF85E0182
43FFFFFFFF1FFFCFF87FFFFE01FF7FFFFF83FFCF807FFFFC3781F7FF
FF81FFCFE3DFFDFC6601F7FFFC017FCF01BFFDF02C123FFBF030FFCE
003FFFF41C900FF9A002FFCC008BFFF01C0A0DFC0481FFCF00047FE0
3BEC0FE00887FFCE00000FE0D2E76D00001FFFCF80C4018C7464DD0
000FFFFCFF00900DE64671F0003FFFFCFFC2001C0F59F22000FFFFFCF
FF800040E00410023FFFFFCFFFF000006250C040FFFFFFCFFFFE200F22
C92007FFFFFFCFFFFF80328941521FFFFFFFCFFFFFF0518FC31D7FFF
FFFFCFFFFFBC610FC33FFFDFFFFFCFFFFE78130FC02FFF9FFFFFCFFFF
EFC091FFA1FFFFFFFFFCFFFFDFE011FC9FFFFFFFFFFCFFFFDFC7F3FEC
7F4FFFFFFFCFF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FFFCFF8FFFFFFFFFFFFFFFF9FFFCFC1FFFFFFFE1
FFFFFFC07FFCF01FFFFFE3E1C3FFFEE01FFCF003FFFFC1C0C1FFF9F03FF
CF8073FFF81C0C1FFC190FFFCF00F87FF81FFF0FE0023FFFCFE1900FF3F8
7F8C80A5FFFFCFFA1000B7F7F73600D7FFFFCFFF240039F447DC001FFFFFC
FFFDA003FE647DC007FFFFFCFFFF8003FF7A7EE01FFFFFFCFFFFF007FF2
C73FEFFFFFFFCFFFFFC3F0E9361FBFFFFFFFCFFFFFF9C077FE0CFFFFFF
FFCFFFFFFF207FFC03FFFFFFFFCFFFFFBF80FFFC07FFFFFFFFCFFFFFFFE
0FFFE1FFFDFFFFFCFFFFFFFF0FFFDE7FFFFFFFFCFFFFEFFF6FFFE00FFFF
FFFFCFFFFDFF80FFFF808FF7FFFFCFFFFFFC00FFFF8061FBFFFFCFFFFFF
1A0FFFF00483FFFFFCFFFF78787FFFF840000FFFFCFFFEC13BFFFFFFBC2
107FFFCFFFC041FFFFFFFFC4801FFFCFFF808FFFFFFFFFC001CFFFCFFC0
143FFFFFFFFF80587FFC
And then pop it in some axe this I s 4 level grayscale.
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on March 26, 2014, 11:31:17 am
The problem with SourceCoder is that it is online. I can't use it when I am in a train.
Title: Re: Drawing Pictures for Axe
Post by: Streetwalrus on March 26, 2014, 12:44:35 pm
Drawing an OS Pic and importing it with [var] is also a good idea.
Title: Re: Drawing Pictures for Axe
Post by: Hayleia on March 26, 2014, 12:53:54 pm
Except when you have at least 10 projects using at least one picture. Another possibility is to "convert" the Pic into an appvar using a simple program, but that is not as convenient as it would be to drag and drop an image file onto a program that would return hex code to just copy paste.
Title: Re: Drawing Pictures for Axe
Post by: DJ Omnimaga on March 26, 2014, 01:48:13 pm
The problem with SourceCoder is that it is online. I can't use it when I am in a train.
Thankfully over here there are three bus lines and the boat that have wi-fi. The only issue, though, is that sometimes wi-fi isn't working and during rush hour, they bring in a few extra bus vehicles that have no wi-fi in them. Plus I don't know if my phone has enough RAM to use SourceCoder nor if it can save 8xp files anyway. :P

There is also Token that can generate pics, right? That said, it's for windows so unless you got a laptop it isn't as portable as the real calc.
Title: Re: Drawing Pictures for Axe
Post by: josh landers on March 26, 2014, 02:26:42 pm
If  Moral of the story=your ever on a train boat or plane.
use graphpaper and convert to binary then to hex
Else use source coder
End

Title: Re: Drawing Pictures for Axe
Post by: Hayleia on March 26, 2014, 02:45:55 pm
There is also Token that can generate pics, right? That said, it's for windows so unless you got a laptop it isn't as portable as the real calc.
Well I use a laptop in the train. And wow, thank you for telling me that because I actually found out now that TokenIDE can import images and convert them into hex O.O
Title: Re: Drawing Pictures for Axe
Post by: Streetwalrus on March 26, 2014, 04:57:33 pm
SPASM can do that too but it's really bitchy when it comes to file format. :/