Oh my, well done Luxray! I'm not quite ready to test out your software yet but I'm excited for it! I'll have to look into ImageMagic, perhaps it can make my life easier with adding more file compatibility and splitting. I'm very impressed with what you've done and thank you for creating something I've been painfully slow at developing!
I did stuff today!

As you can see, there's still some bugs but at least it doesn't crash! This is what I've gotten done in this update
    fixed C# code so the fixed color in the index is white
    fixed ICE code so the correct palette is loaded (most of the time)
    made thumbnails twice as big
    added thumbnail preview
    added more buttons to scroll through images

I'll get the Github code updated soon
Beta 3 has been released! Snatch it here!



I fixed the bugs present in the previous screenshot and added support for more than 16 images. I (finally) included the computer converter! All you have to do is resize the image, make it a PNG and the converter will take care of the rest! With a fully cleared calc, you can fit up to 30 images on it!

Next I want to add double buffering and sorting images alphabetically then that'll be the full release!
It took all day, but I managed to make a full tutorial. It's not my best video, the audio is a worse than I expected and the screen capture frame rate is atrocious, but oh well, it's has everything you need to learn how to use the software. I'll have to create a proper thumbnail tomorrow, it's getting late here. I've added the video to my first post: https://www.youtube.com/watch?v=s1-g8oSueQg
First of all, I want to say that this program works really well!

Second of all, I have a bug report/suggestion: The converter program should warn you if you attempt to convert a file that starts with a number, as it results in a wonky AppVar that doesn't work (I'm pretty sure this is because AppVars cannot start with a number). Currently what it does is convert the image, but when you try to send it with TI-Connect CE it says the name on calc is 1 (or whatever number was the first character of the .png image) and it doesn't send properly.

Again though, this is a really nice program, and it looks really good on calc Smile.
Jeffitus wrote:
First of all, I want to say that this program works really well!

Second of all, I have a bug report/suggestion: The converter program should warn you if you attempt to convert a file that starts with a number, as it results in a wonky AppVar that doesn't work (I'm pretty sure this is because AppVars cannot start with a number). Currently what it does is convert the image, but when you try to send it with TI-Connect CE it says the name on calc is 1 (or whatever number was the first character of the .png image) and it doesn't send properly.

Again though, this is a really nice program, and it looks really good on calc Smile.

Thank you! That's a nice catch, I'll add it to my list of issues.
Quote:
The converter program should warn you if you attempt to convert a file that starts with a number
Fixed, it now requires you to rename the file if the first character is a number.
Well, after a year and a half, 331 different versions, and a whole lot of brain-olympics... it's finished!
You can go download it here on Cemetech or over on Github !

Despite the fact this took me 9x longer than expected, I'm pretty pleased with how the project turned out. The interface looks pretty nice, my computer converter works well, and the tutorial should make everyone's lives a lot easier. More importantly, I've learned a lot about how ICE works (and sometimes how it doesn't work!) I'm excited to work on new projects and possibly graduate to C!

I'd especially like to give a big thank you everyone who helped me on this project! I wouldn't have been able to complete this project without you!
    PT_
    MateoConLechuga
    Beckadamtheinventor
    calclover2514
    Hooloovoo
    Runer112
    iPhoenix
    Iambian
    SM84CE
    SahilS


To everyone: please let me know how you like the program! Bug reports, issue reports, and constructive criticism is appreciated!
Quick update, I fixed a bug where the program sometimes wouldn't work when run through Cesium due to a non-null-terminated string. The update is live on Github and pending in the Archives.
I'm having a bit of trouble opening the BASIC variable Ans in my program. No matter what is stored in it, the following code always returns 0.
Code:
OpenVar('Ans',"r",4)->ANSSLOT
I'm trying to get my program so running the following statement in your BASIC code:
:"HDPuppyDog":prgmHDPICV
Will immediately pull up the picture of a puppy.

I've been told this code should work so there must be something incorrect with my other code. However, I even tried putting this line of code as the first line of my program but it still returned 0. What could be the issue?

If you need more code, the project source is over on Github. That specific statement is on line 67. The label it's in is called on line 45.
Change the
Code:
‘ans’
to
Code:
“Ans”
. Single quotes are 8 bit integers but double quotes are pointers to strings.

Edit: disregard, I am wrong.
Brando wrote:
Change the
Code:
‘ans’
to
Code:
“Ans”
. Single quotes are 8 bit integers but double quotes are pointers to strings.

Actually that is not true. Because he is using ICE, single quotes represent the machine code for the token, whereas double quotes represent a tokenless string. Using double quotes will create a string named S and then clear the RAM (believe me, I've tried), whereas single quotes should work.

P.S. This sounds like a bug in ICE to me. You should open an issue in the github repo for more info.
Reading a string from Ans can be difficult.
Looking at the data in Ans, I found that if Ans is a string, the first two bytes are its length.


Code:

"047200->P
^^oP:Asm(E5
P:Asm(CD200302CD0C0502E1ED1F
If not(P
//Ans probably doesn't exist as a string
Else
//Skip the length bytes
P+2->P
//Store a pointer to the end of Ans into E
**{P-2}+P->E
//P contains the pointer to the tokens stored in Ans, provided that it is a string.
End


The inline Asm:
Push a pointer to the ICE variable P. Most calculations in ICE return in HL, so we can just "push HL"

Code:
You could also double-check Ans
^^oP:Asm(E5

The meat and potatoes:

Code:

//Call _Mov9ToOP1
P:Asm(CD200302
//Call _ChkFindSym
Asm(CD0C0502
//Now DE contains a pointer to the data.
//So we "pop HL" then "ld (HL),DE"
//HL contains a pointer to the variable from before that we want to hold the data pointer.
Asm(E1ED1F


And that's all folks! Very Happy
Happy Halloween everyone! Enjoy Kerm's fantastic costume on three different calculators! Laughing


So, new plan! Instead of trying to work around ICE limitations and bugs, I think I'm going to rewrite the whole project in C. Well, actually I'll be keeping the image converter in C# but all on-calc stuff will be C.

Hopefully by moving to C I'll be able to make the code more robust so I can add features easier. I may even be able to allow on-calc image editing like color/brightness adjustments so you can reduce the difference between calculator displays (as shown with the white CE's colors being much brighter than the HP Prime and the blue CE).

I'll be working on this as a side project while I focus on my school work so it'll take me a while to rewrite. I'm looking forward to better, more stable code though so wish me luck!
Why is the image darker on the Prime? And what's the difference between the CE on the left and the one on the right?

Me to my classmates: My Halloween costume is that of an AFJROTC Group Staff member (we got polos)
Is there any way to get this working on Mac? convPNG is ported to mac, so is there anyway I can run it? I'm not great at understanding any code let alone anything with bash
Yeetboidabdabb wrote:
Is there any way to get this working on Mac? convPNG is ported to mac, so is there anyway I can run it? I'm not great at understanding any code let alone anything with bash

You should be able to run the included executable with Wine if you're not on a Windows machine.
Yeetboidabdabb wrote:
Is there any way to get this working on Mac? convPNG is ported to mac, so is there anyway I can run it? I'm not great at understanding any code let alone anything with bash
Yes there is, if you're familiar with Wine, you can use my converter if wrote. Alternatively, if you download the mac version of convPNG and follow this portion of my tutorial it should work for you: https://youtu.be/s1-g8oSueQg?t=254
In light of HD Picture Viewer winning 3rd place in the 2019 Project of the Year, I've found motivation to work on this again! I'm re-writing everything including the converter because I want to change how the whole system works.

Instead of only accepting 320x240 or smaller images, I want to be able to accept any sized file and have the program auto-resize if for me. Also, I want to be able to fill up the entire Archive with a single, massive image if I feel like it!

This means I need to re-think how image storing works. Rather than just splitting an image in half like before, I'm splitting it into multiple 80x80 squares. Why 80x80? Because that's the largest square I can get that will fit evenly within a 320x240 image. Also, it should significantly reduce the issue of running out of FLASH pages.



Now, once I get the 80x80 squares all converted into Appvars, doing detection the old way will be very slow. Instead, my program will have to build basically a database of what squares go to which image and where on the image. It will recall this every time you run the program. If there's new or deleted images, the database will need to be rebuilt.

When the program finally knows what squares go where, it will display each 80x80 square in the correct place, making a seamless image. If the image is suppose to be larger than 320x240 then I'll use the graphx resize tool for each 80x80 square and fit the image to the screen. I'll implement a zoom feature so you can get the most out of all the detail in that image!

Progress:
I've got quite a bit done on the converter already. Its still got a lot of work to do but here's what the general UI will look like:


It can now accept any PNG, JPG, or BMP file and convert it. It can auto-resize while maintaining aspect ratio, it can stretch the image to fit 320x240, or you can tell it to not resize the image at all!
I've also got image splitting into 80x80 squares working along with some basic errors and warnings set up so a user doesn't think they can send a 4mb picture to their calculator.

If reading off of USB storage ever becomes a thing on the CE, technically the code is set up to handle up to a 6.4 GB image! (program can handle 1000x1000 squares, each square is 80x80) Who knows if the calculator will be able to handle that so I may knock it down to 100x100 squares which would allow up to 64 MB. Laughing

I'm pretty excited about this, I haven't programmed in a quite some time and this is nice to have motivation to actually learn C.
By the way, the toolchain has a zx7 decompression function Smile
The converter looks sleek and easy to use, too!
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 7 of 8
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement