Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: DRAGONLORD343 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.
-
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 (http://www.ticalc.org/archives/files/fileinfo/437/43718.html)
-
And this (http://www.cemetech.net/projects/basicelite/sourcecoder2.php) is an online picture-to hex converter ;)
-
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.
-
well if you decide to make one for yourself, feel free to share with others :D
-
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?
-
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.
-
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
-
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.
-
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:
-
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
-
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:
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.
-
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:
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 (http://ourl.ca/15941/298540;topicseen#new)
-
uploaded example
-
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...
-
yes that was definitely basic and i used zstart for maybe thirty minutes before it erased everything on my calculator. so its a good thing that i got two calculators