Author Topic: Request for a Java Programmer  (Read 46298 times)

0 Members and 2 Guests are viewing this topic.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #15 on: December 17, 2010, 08:06:19 pm »
i think i'll stick with the first.. lol. do you have any test data for the first i can use?

Not yet, but I'll work on some.

In the meantime, if there's any other takers for option #2, remember that Correlation isn't coming for a month

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Request for a Java Programmer
« Reply #16 on: December 17, 2010, 09:42:12 pm »
i think i'll stick with the first.. lol. do you have any test data for the first i can use?

Not yet, but I'll work on some.

In the meantime, if there's any other takers for option #2, remember that Correlation isn't coming for a month
So basically like a m by n grid that they can do the font, and assign that to a letter or something?

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #17 on: December 17, 2010, 09:51:39 pm »
i think i'll stick with the first.. lol. do you have any test data for the first i can use?

Not yet, but I'll work on some.

In the meantime, if there's any other takers for option #2, remember that Correlation isn't coming for a month
So basically like a m by n grid that they can do the font, and assign that to a letter or something?

Yeah, essentially.  (Although in the file format, I forgot to mention the graphical data) The monochrome bitmap is created 8 or 16 pixels wide.  The height of the bitmap is the height of a character, multiplied by the total number of characters.  The minimum and maximum values assign these characters to letters--for instance, with a minimum of 65, the letter "A" will be assigned to the first character in the font.

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #18 on: December 18, 2010, 11:40:41 am »
Nemo, here's some test data, something I would expect someone to copy and paste in.

But first, I forgot two things.  First of all, for an 8-pixel wide font, after the string is turned around, every 1st-6th character should be skipped (1st through 4th for 16 wide).  That was my mistake.  The other thing is, even though the text is turned backwards, it's done in pairs--look carefully at the following example:    OMNIMAGA becomes GAMANIOM.

For an 8-pixel-wide font:  FA000000FA000000EA000000EA000000DD000000DD000000CA000000CA000000.  The output should be CACADDDDEAEAFAFA.

For a 16-pixel-wide font: 1122000023340000344500004556000056670000.  The output should be 67565645453434232211
« Last Edit: December 18, 2010, 01:00:49 pm by Hot_Dog »

Offline jnesselr

  • King Graphmastur
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2270
  • Rating: +81/-20
  • TAO == epic
    • View Profile
Re: Request for a Java Programmer
« Reply #19 on: December 18, 2010, 12:07:25 pm »
* king graphmastur declares omnimaga should now be referenced as "GAMANIOM"
anyway, I don't full understand thr output format. Is it just a .png ir .gif or what?

Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #20 on: December 18, 2010, 12:22:12 pm »
* king graphmastur declares omnimaga should now be referenced as "GAMANIOM"
anyway, I don't full understand thr output format. Is it just a .png ir .gif or what?

If you're talking about the output from the example I gave Nemo, it's sprite data.  A monochrome bitmap is drawn "backwards," and has a lot of unnecessary 0s in it, so Nemo's program would adjust these to make the bitmap "calculator friendly."

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Request for a Java Programmer
« Reply #21 on: December 19, 2010, 09:15:54 pm »
the program is attached, along with the source.
edit: reattached, bug fix.
« Last Edit: December 19, 2010, 09:29:31 pm by nemo »


Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #22 on: December 19, 2010, 09:17:26 pm »
the program is attached, along with the source.

It works!  I'll let you know if I run into any trouble, though I'm not finding any problems yet! ;D

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Request for a Java Programmer
« Reply #23 on: December 19, 2010, 09:19:05 pm »
the program is attached, along with the source.

It works!  I'll let you know if I run into any trouble, though I'm not finding any problems yet! ;D

that would be the goal ;)  if there's any layout issues you want changed don't hesitate to ask.


Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #24 on: December 21, 2010, 05:02:37 pm »
ohh... i just finished number one... i don't anticipate #2 being very hard though.

It's not hard.  It's just that #1 is easier 0_0

Anyways, in case #2 works for you, feel free to do a command prompt or a GUI.

The user selects a monochrome .bmp file to select.  He also specifies the height (from 1 to 16), the width (from 1 to 16), the minimum value (from 0 to 255), the maximum value (from 0 to 255, cannot be less than minimum value), and the program name, which must be EXACTLY 8 characters.

I've attached a sample compiled font, though I don't have the original .bmp with me.

The file format: (Let me know if you have questions)
A star means the ASCII value of the character to be written to the file.
Quotes is a string to be written to the file.
For a double star, convert the two-byte value to little edian, and then write the value to the file

"**TI83F*"
*26
*10
*0
"Ti-83+ Font.  Used by Correlation.        "
** The size of the entire file, minus 57

----------------- (Ignore these dashes)


*13
*0
** The size of the .8xp program
*5
Eight-Character Program Name
*1
*0
** The size of the .8xp program
** The size of the .8xp program (This marks the beginning of the Ti-83+ program)
*User-Specified Width
*User-Specified Height
*User-Specified Minimum Value
*User-Specified Maximum Value
*255
*0       (This marks the end of the Ti-83+ program.)
**Check-sum (Take the sum of all bytes following the -------------, use AND %1111111111111111)

I have a version of #2 pretty much done, except that I don't really understand what the program's supposed to look like...

Where do I put the actual sprite data for the font?

And the third "** The size of the .8xp program" is supposed to be "** The size of the .8xp program minus 2", right? Just checking :)

EDIT: And I'm assuming the .bmp is made up of either 8- or 16-pixel-wide characters listed vertically, right?

EDIT2: Whoops, just noticed your example program. Still kinda confused, though... What's the $30, $00 for?
« Last Edit: December 21, 2010, 05:26:33 pm by Deep Thought »




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #25 on: December 21, 2010, 05:30:30 pm »
Quote
I have a version of #2 pretty much done, except that I don't really understand what the program's supposed to look like...

Where do I put the actual sprite data for the font?

And the third "** The size of the .8xp program" is supposed to be "** The size of the .8xp program minus 2", right? Just checking

Deep Thought, I had no idea you were working on this!  Thanks a lot! 

To answer your questions, the bitmap data goes before the last *255.  (Do you understand the format of a monochrome bitmap, by the way?  Because monochrome bitmaps are weird--they display everything backwards, and with unnecessary extra bytes.) 

Also, you are right about the third "size of program" line...it should be the size of the program minus 2.

One more thing: the *5 should be *6 instead

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #26 on: December 21, 2010, 05:34:03 pm »
Quote
I have a version of #2 pretty much done, except that I don't really understand what the program's supposed to look like...

Where do I put the actual sprite data for the font?

And the third "** The size of the .8xp program" is supposed to be "** The size of the .8xp program minus 2", right? Just checking

Deep Thought, I had no idea you were working on this!  Thanks a lot! 

Np, needed to practice my Java anyway ;D

To answer your questions, the bitmap data goes before the last *255.  (Do you understand the format of a monochrome bitmap, by the way?  Because monochrome bitmaps are weird--they display everything backwards, and with unnecessary extra bytes.) 

Yep, it's stored from the bottom up, padded to multiples of 4, correct? :)

Also, you are right about the third "size of program" line...it should be the size of the program minus 2.

One more thing: the *5 should be *6 instead

Oh, okay. What's the $30, $00 before the sprite data in your example program for?

EDIT: I'll upload it when I get this done.
« Last Edit: December 21, 2010, 05:34:27 pm by Deep Thought »




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #27 on: December 21, 2010, 05:41:13 pm »
Quote
Yep, it's stored from the bottom up, padded to multiples of 4, correct? :)

That's right!

Quote

Oh, okay. What's the $30, $00 before the sprite data in your example program for?

That's no longer needed.  It was the height times the width of each character ( 6*8 ), but I have no use for it in my program now.  It's basically "dead code" 8)

By the way, I really don't remember what I had *255 and *0 for, because I left my source code at college.  Do you know if it's needed for a .8xp program?  (The bitmap data in the example program takes 16 bytes) I have a feeling that those two bytes could be removed.

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Request for a Java Programmer
« Reply #28 on: December 21, 2010, 05:50:20 pm »
Quote
Yep, it's stored from the bottom up, padded to multiples of 4, correct? :)

That's right!

Quote

Oh, okay. What's the $30, $00 before the sprite data in your example program for?

That's no longer needed.  It was the height times the width of each character ( 6*8 ), but I have no use for it in my program now.  It's basically "dead code" 8)

So I should just ignore it?

By the way, I really don't remember what I had *255 and *0 for, because I left my source code at college.  Do you know if it's needed for a .8xp program?  (The bitmap data in the example program takes 16 bytes) I have a feeling that those two bytes could be removed.

It doesn't show up on the actual calculator, so it's definitely not bad for the program. I don't know what it does, though.




Offline Hot_Dog

  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3006
  • Rating: +445/-10
    • View Profile
Re: Request for a Java Programmer
« Reply #29 on: December 21, 2010, 05:53:33 pm »
Yeah, just ignore the height * width.