Author Topic: PIC2HEX  (Read 13856 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PIC2HEX
« Reply #15 on: April 15, 2010, 04:48:44 pm »
Nah I can,t do that. However, there are some mods I think that can do some stuff with attachments. I would need to check.

SirCmpwn

  • Guest
Re: PIC2HEX
« Reply #16 on: April 15, 2010, 05:31:47 pm »
Okay, attached is a program that will convert an 8xi file into an 8xp full of hex.  It was thrown together in a few minutes, so it doesn't have error handling or any of that stuff.
Usage:
PicToHex input.8xi output.8xp CALCNAME

Where CALCNAME is what it looks like in the program menu.

Please tell me if you find any bugs.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: PIC2HEX
« Reply #17 on: April 15, 2010, 07:30:05 pm »
By the way, I've already added support in the next version to "absorb" a pic in your RAM into the program itself.  So that should simplify this process.  But one thing I just learned is that the pics stored on the calculator are only 96x63 (756 bytes) so if you have a picture that needs the bottom row, you'll just have to add the extra 12 bytes after it in hex.  To draw a pic with axe on the buffer, simply just copy it to the graph buffer: conj(Pic00,L6,756).
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PIC2HEX
« Reply #18 on: April 15, 2010, 07:34:59 pm »
Will the pics be added during compile, or will the data remain in pic form, externally, even after compiling?


Would such feature give you the option to absorb the pic by 8x8 chunks too?

To be honest, one reason why I fail at finding motivation to program in Axe more than I currently do is knowing I will have to do the chore of converting my sprites to hex, even if I have programs by SirCmpwn to do so. It gets hectic if I need to regulary add tiles or if I need to edit one. Plus if I have many, it can end up being a major hassle to find the right tile to delete from my source code and make sure to not accidentally delete the wrong data x.x

SirCmpwn

  • Guest
Re: PIC2HEX
« Reply #19 on: April 16, 2010, 08:27:03 am »
I am currently working on a GUI based version of the above, as well as a GUI based program for exporting tiles from tilemaps.  This should make it easier to convert your pre-existing games, DJ.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PIC2HEX
« Reply #20 on: April 16, 2010, 10:03:18 am »
Nice to hear :D

SirCmpwn

  • Guest
Re: PIC2HEX
« Reply #21 on: April 16, 2010, 05:23:49 pm »
Okay, this one uses a GUI instead.  You must have .NET installed.  If you are running Windows XP SP3 or higher, you're good.  If you are running Vista or Win7, you're good.  If you are running Linux or Mac, you need Mono.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PIC2HEX
« Reply #22 on: April 16, 2010, 05:46:29 pm »
Cool, I haven't made an axe program with my converted pic but I assume the program content should look like this, right? (see attachment)

I can,t wait for Tile version too ^^

SirCmpwn

  • Guest
Re: PIC2HEX
« Reply #23 on: April 16, 2010, 07:36:05 pm »
Right, that looks good.  It's just a bunch of hex.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PIC2HEX
« Reply #24 on: April 16, 2010, 07:53:40 pm »
and according to further tests, it's the right HEX that is created too. Nice job ^^

I'll upload to download section once you got the tile version. However, I would also suggest making it clearer about what the user need to run in the zip file. Usually, people are used to having the exe file right in the root directory and people who are not used to programming vocabulary may not be aware that "bin" means it's the executable folder.

SirCmpwn

  • Guest
Re: PIC2HEX
« Reply #25 on: April 16, 2010, 10:31:13 pm »
Well, I included the source code as well.  If you are planning on putting it in the downloads section, I'll package it up in an installer, which will also take care of the .NET dependency.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PIC2HEX
« Reply #26 on: April 16, 2010, 10:59:31 pm »
Yeah that would be cool. would make things much easier :P

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: PIC2HEX
« Reply #27 on: April 16, 2010, 11:13:33 pm »
That program sounds really neat.  Great job SirCmpwn! ;D

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: PIC2HEX
« Reply #28 on: April 17, 2010, 12:32:09 am »
This will still be useful even after the next release because some people won't want to keep a bunch of pictures on their calculator to compile the program, they might just prefer to import them directly all in one file.  Good job on this!
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: PIC2HEX
« Reply #29 on: April 17, 2010, 11:55:37 am »
True. If I decided for example to make some sort of grayscale game with many tiles like Reuben, it would take so much space on calc and a long while to convert, not to mention the hex data would be twice larger until compiling x.x