Author Topic: Pic-Hexer  (Read 7640 times)

0 Members and 1 Guest are viewing this topic.

Offline DRAGONLORD343

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Pic-Hexer
« on: April 25, 2012, 10:35:00 am »
I got tired of looking for a way to do this on the computer and decided to make an on-calc program to do it for me.
It works now but for those who want to make the pic 96*62... can't do that in basic so i'm now making one in asm.

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Pic-Hexer
« Reply #1 on: April 25, 2012, 10:50:56 am »
are you talking about a monochrome 96x62 picture to Hex converter?

if so I believe there's one right here
http://www.ticalc.org/archives/files/fileinfo/437/43718.html


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

Offline turiqwalrus

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 840
  • Rating: +51/-2
  • Wheeeeeee~!
    • View Profile
Re: Pic-Hexer
« Reply #2 on: April 25, 2012, 11:09:05 am »
And this is an online picture-to hex converter ;)

Offline DRAGONLORD343

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Pic-Hexer
« Reply #3 on: April 25, 2012, 12:21:09 pm »
I've used the online one and it works wonders but it can't help if you dont have internet access and have you seen the size of that on-calc pgrogram its 11446 bytes. yeah i understand he has all the extra functions but it still takes up a lot of memory.
« Last Edit: April 25, 2012, 12:22:08 pm by DRAGONLORD343 »

Offline jsj795

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1105
  • Rating: +84/-3
    • View Profile
Re: Pic-Hexer
« Reply #4 on: April 25, 2012, 12:24:54 pm »
well if you decide to make one for yourself, feel free to share with others :D


Spoiler For funny life mathematics:
1. ROMANCE MATHEMATICS
Smart man + smart woman = romance
Smart man + dumb woman = affair
Dumb man + smart woman = marriage
Dumb man + dumb woman = pregnancy
2. OFFICE ARITHMETIC
Smart boss + smart employee = profit
Smart boss + dumb employee = production
Dumb boss + smart employee = promotion
Dumb boss + dumb employee = overtime
3. SHOPPING MATH
A man will pay $2 for a $1 item he needs.
A woman will pay $1 for a $2 item that she doesn't need.
4. GENERAL EQUATIONS & STATISTICS
A woman worries about the future until she gets a husband.
A man never worries about the future until he gets a wife.
A successful man is one who makes more money than his wife can spend.
A successful woman is one who can find such a man.
5. HAPPINESS
To be happy with a man, you must understand him a lot and love him a little.
To be happy with a woman, you must love her a lot and not try to understand her at all.
6. LONGEVITY
Married men live longer than single men do, but married men are a lot more willing to die.
7. PROPENSITY TO CHANGE
A woman marries a man expecting he will change, but he doesn't.
A man marries a woman expecting that she won't change, and she does.
8. DISCUSSION TECHNIQUE
A woman has the last word in any argument.
Anything a man says after that is the beginning of a new argument.

Girls = Time * Money (Girls are a combination of time and money)
Time = Money (Time is money)
Girls = Money squared (So, girls are money squared)
Money = sqrt(Evil) (Money is also the root of all evil)
Girls = sqrt(Evil) squared (So, girls are the root of all evil squared)
Girls = Evil (Thus, girls are evil)
*Girls=Evil credit goes to Compynerd255*

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: Pic-Hexer
« Reply #5 on: April 25, 2012, 12:25:37 pm »
Yeah that can be a problem indeed, plus we have to not take online tools for granted, since after a while their author might abandon their site and shut it down (like what happened to the Map and Sprite editors by Aichi, because the author decided a Minecraft server would be far more important and useful than these two amazing tools). But of course you can keep it archived and use something like Doors CS to run it directly from archive (or Zstart does that too I think). That way you don't need to manually unarchive/archive your stuff over and over and you save on GarbageCollecting time.

Any screenshots of your editor by the way?

Offline DRAGONLORD343

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Pic-Hexer
« Reply #6 on: April 25, 2012, 12:32:12 pm »
working on getting some but i got to reinstall wabbitemu it messed up somehow.

my basic one is only 151 bytes and all you have to do is draw the pic and store it to Pic2 then run this program.
i made it because i also use mimas and it became extremely repetitive to convert them by hand.
« Last Edit: April 25, 2012, 12:32:37 pm by DRAGONLORD343 »

Offline turiqwalrus

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 840
  • Rating: +51/-2
  • Wheeeeeee~!
    • View Profile
Re: Pic-Hexer
« Reply #7 on: April 25, 2012, 01:05:01 pm »
Yeah that can be a problem indeed, plus we have to not take online tools for granted, since after a while their author might abandon their site and shut it down (like what happened to the Map and Sprite editors by Aichi, because the author decided a Minecraft server would be far more important and useful than these two amazing tools). But of course you can keep it archived and use something like Doors CS to run it directly from archive (or Zstart does that too I think). That way you don't need to manually unarchive/archive your stuff over and over and you save on GarbageCollecting time.

Any screenshots of your editor by the way?

Then again, I don't think Cemetech's going to close anytime soon :P

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: Pic-Hexer
« Reply #8 on: April 25, 2012, 02:47:52 pm »
Yeah that can be a problem indeed, plus we have to not take online tools for granted, since after a while their author might abandon their site and shut it down (like what happened to the Map and Sprite editors by Aichi, because the author decided a Minecraft server would be far more important and useful than these two amazing tools). But of course you can keep it archived and use something like Doors CS to run it directly from archive (or Zstart does that too I think). That way you don't need to manually unarchive/archive your stuff over and over and you save on GarbageCollecting time.

Any screenshots of your editor by the way?

Then again, I don't think Cemetech's going to close anytime soon :P
Oh wait I didn't realize it was a Cemetech link. I didn't check carefully because I forgot SC worked with images. I was sure it was Jimbauwen's stuff.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Pic-Hexer
« Reply #9 on: April 25, 2012, 08:17:49 pm »
If you want ideas or coding help, you can check this out :) It can be optimised a bit, but it uses a keyhook so all you do is press a special key combo and voila, the picture hex is in Ans :)

http://www.ticalc.org/archives/files/fileinfo/427/42778.html


Actually, I think the source to that is wrong, but it might still help >.> The whole program is 72 bytes :D

EDIT: That is over two years old o.o That could really use an update D:

Offline DRAGONLORD343

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Pic-Hexer
« Reply #10 on: April 26, 2012, 08:54:07 am »
If you want ideas or coding help, you can check this out :) It can be optimised a bit, but it uses a keyhook so all you do is press a special key combo and voila, the picture hex is in Ans :)

http://www.ticalc.org/archives/files/fileinfo/427/42778.html


Actually, I think the source to that is wrong, but it might still help >.> The whole program is 72 bytes :D

EDIT: That is over two years old o.o That could really use an update D:

Thanks that should actually help. and by the way i'm also needing help on reading and writing to specific programs using asm if someone could help me with that

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Pic-Hexer
« Reply #11 on: April 26, 2012, 02:17:53 pm »
Hmm, do you have the names of these programs, or does the user have to pass an argument telling what program to read/write from?

EDIT: Here is some example code for getting the location of a var you have the name of:

Code: [Select]
     ld hl,Name
     rst rMOV9TOOP1      ;Copies 9 bytes at HL to OP1. In otherwords, it copies the name of the program to OP1.
     bcall(_ChkFindSym)    ;Searches for the variable, returns info:
;c flag set if the variable was not found
;HL points to the VAT entry
;DE points to the size bytes of the data
;B is the flash page the data is on
;C is the length of the name
;The lower 5 bits of A is the type of the var.
     ret c                     ;quit because it doesn't exist
     ld a,b                    ;This is 0 if it is in RAM, otherwise, it is the flashpage number
     or a                      ;This is a sneaky trick to check if A is 0. It is smaller and faster than cp 0
     ret nz                   ;quit if it is not zero (meaning it is archived).
;If it made it this far, the var exists in RAM. DE points to the size bytes.
;I typically use those, so I'll store it to BC:
     ex de,hl               ;swap HL and DE
     ld c,(hl)             ;loads the lower byte into C. you cannot do ld c,(de), this is why I used ex de,hl
     inc hl                ;HL now points to the next byte
     ld b,(hl)             ;B now contains the higher byte of the size. Now BC is the size of the var.
     inc hl                ;HL now points to the start of the program data.
;(this is just randomness on my part, feel free to try it. It will destroy all the data in the program, though)
     ld d,0
DoStuffLoop:
     ld a,d
     and 00001111%
     ld d,a
     inc d
     add a,'A'
     ld (hl),a
     cpi                     ;Cheap trick. This decrements BC, increments HL, returns PE if BC is not 0.
     jp pe,DoStuffLoop
     ret
Name:
     .db ProgObj,"NAME",0     ;This is the name of the program with PrgObj in front and 0 at the end.

Offline DRAGONLORD343

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Pic-Hexer
« Reply #12 on: April 27, 2012, 08:59:56 am »
Hmm, do you have the names of these programs, or does the user have to pass an argument telling what program to read/write from?

EDIT: Here is some example code for getting the location of a var you have the name of:

Code: [Select]
     ld hl,Name
     rst rMOV9TOOP1      ;Copies 9 bytes at HL to OP1. In otherwords, it copies the name of the program to OP1.
     bcall(_ChkFindSym)    ;Searches for the variable, returns info:
;c flag set if the variable was not found
;HL points to the VAT entry
;DE points to the size bytes of the data
;B is the flash page the data is on
;C is the length of the name
;The lower 5 bits of A is the type of the var.
     ret c                     ;quit because it doesn't exist
     ld a,b                    ;This is 0 if it is in RAM, otherwise, it is the flashpage number
     or a                      ;This is a sneaky trick to check if A is 0. It is smaller and faster than cp 0
     ret nz                   ;quit if it is not zero (meaning it is archived).
;If it made it this far, the var exists in RAM. DE points to the size bytes.
;I typically use those, so I'll store it to BC:
     ex de,hl               ;swap HL and DE
     ld c,(hl)             ;loads the lower byte into C. you cannot do ld c,(de), this is why I used ex de,hl
     inc hl                ;HL now points to the next byte
     ld b,(hl)             ;B now contains the higher byte of the size. Now BC is the size of the var.
     inc hl                ;HL now points to the start of the program data.
;(this is just randomness on my part, feel free to try it. It will destroy all the data in the program, though)
     ld d,0
DoStuffLoop:
     ld a,d
     and 00001111%
     ld d,a
     inc d
     add a,'A'
     ld (hl),a
     cpi                     ;Cheap trick. This decrements BC, increments HL, returns PE if BC is not 0.
     jp pe,DoStuffLoop
     ret
Name:
     .db ProgObj,"NAME",0     ;This is the name of the program with PrgObj in front and 0 at the end.

This routine might work for now but i've created another topic for this question here

Offline DRAGONLORD343

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 14
  • Rating: +0/-0
    • View Profile
Re: Pic-Hexer
« Reply #13 on: May 01, 2012, 12:14:02 pm »
uploaded example

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: Pic-Hexer
« Reply #14 on: May 01, 2012, 01:45:48 pm »
I take it that was BASIC? This is what the screen dump program does (check the screenie). As a note, the program I linked to before does have the opcode with it...