Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: Xeda112358 on November 03, 2011, 11:12:59 pm
-
GrayDraw is currently a very simple grayscale drawing program. You just input the name of the file to open and if it doesn't exist, it is created, otherwise, it is used. Note that this version does not check if the var is archived or not and it won't check if it is the right size (in case the var already existed).
You can do some simple drawing in 4-level gray that works best on models with 15MHz.
I might end up adding the ability to draw other shapes such as lines, rectangles, and circles, in the future.
I should also add in error checking XD
In any event, it looks better on a real calc than it does in the screenie, but I have this one anyway :D
EDIT: Uploaded correct version XD
-
Does it create greyscale by alternating on and off for all the grey pixels? It might look better if you choose to dither them such that every other grey pixel is on half the time, and the other pixels are on the other half time.
-
I have no clue how to do that O.O
-
Ask quigibo ^^
-
XD Runer just said to steal it from Axe O.O
The only problem is that I am using Grammer code to display the grayscale (not pure assembly). Though I could add actual grayscale support in the future...
-
That is cool, the program! O.o
-
I have no clue how to do that O.O
A "checkerboard algorithm" aint that hard to make :P
-
Keoni, you realize that doesn't answer his question at all, that just makes him feel bad?
-
* her question
-
:) Thanks buttsfredkin and aeTIos :)
And I do have a command to draw a checkerboard pattern (both checkerboards) so what do I have to do with them? Do I perform AND logic with that and the buffer I want to display?
-
* her question
Oh yeah. Oops. I knew that.
-
wait, Xeda is a girl?
-
Yep.
-
hmmm, I didn't know that... :P
-
I at first didnt too. Most members are boys, and I also assume that with a new member.
-
wait, Xeda is a girl?
Really? O.O wow I thought that she was a boy wow, (still girls can be good programers like for instance Xeda)
-
There was a few more girl member but they're inactive now D:
-
All right, maybe this pseudocode will help you for the grayscale:
(use a gray buff ofcourse)
if frame=even {
if row=even{
turn even pixels on;
}
if row=odd{
turn odd pixels on;
}
}
invert for odd frames.
-
Using some available features, is this what you mean? I could store this to a buffer and use XOR logic (or I could add a command to XOR these patterns to a buffer).
-
What is the use of checkerboard fill? :3
I'm just curious.
-
well, people were telling me how to use grayscale and I was wondering if the idea they were presenting needed that... Otherwise, I just added the Fill( command for miscellaneous effects :)
Also, we need a :3 smiley >_>
-
yeah, that's what I mean. but it needs to be inverted when the frame is odd.
-
What do you mean, the checkerboard pattern? If that is what you mean, that is what I was trying to show in the screenie XD (I invert it)
-
Oh lol. yep, then its okay. but it should be some faster. XD
-
Ask quigibo ^^
Not me? :'( ???
j/k
I did that grayscale dithering thing too in Reuben series, though. It's better than just flashing every pixel at once, else it flickered too much. And yeah that's the checkered pattern I mean.
What is the use of checkerboard fill? :3
I'm just curious.
It creates an optical illusion that makes the grayscale look less flickery than if you flash every pixel at once the same color.
By the way here are examples of what Reuben looks like (checkerboard) and how it would look like if it wasn't checkered. Less annoying with checkerboard, eh? :P
-
Wow, really cool DJ! I should really get on this grayscale coding. I am currently working on freeing up both saveSScreen and AppBackUpScreen (two areas in non-user RAM that can contain what Axers call a backbuffer). Currently AppBackUpScreen is only used as the default particle buffer and the first two bytes are modified. SaveSScreen, however, is used for converting token strings to ASCII, holding rectangle patterns, converting numbers to strings, and other behind the scenes things. I think I can get away with putting all that in the OP1 and OP2 areas of RAM, though, and I will need to rewrite the text display code.
-
Thanks. That's some old stuff up there (2004) :P. Maybe you could port Reuben Quest series to grammer? ;D
J/k it would be quite big as project, especially that you are busy with school and lots of other projects. :P
-
So, update time :D Now that Grammer actually uses grayscale as default, I made a much nicer version that uses grayscale properly :) Also, I figured out why the checker pattern wasn't looking fast enough... I had Wabbit's color up to 2 shades. On a real calc, it shows it as perfectly gray with no flicker. It gets about 86FPS at 15MHz.
The new version features 3 shades-- black, white, and gray. You now draw with a resizable cursor and it runs at 6MHz.
Controls:
- Use the arrows to move the cursor
- Use 8,2,6,4 to resize the width and height of the cursor
- [Enter] will set the region as black
- [Del] will erase that area
- [2nd] will set the region to gray
- [Clear] will clear the screen
- [Mode] will exit the editor
I am wondering if I should add a save file or not so that people can load and save their pictures... Naturally, it would require 1536 bytes per image, though :/ I could even make it so that it uses OS pictures, too. I have resized them before, so I know it is doable. I think I could even get it so that the OS would read it normally, but you could use it as a grayscale pic for Grammer.
To be clear, this is actually good grayscale, not the flickery stuff I did before :)
-
Ask quigibo ^^
Not me? :'( ???
j/k
I did that grayscale dithering thing too in Reuben series, though. It's better than just flashing every pixel at once, else it flickered too much. And yeah that's the checkered pattern I mean.
What is the use of checkerboard fill? :3
I'm just curious.
It creates an optical illusion that makes the grayscale look less flickery than if you flash every pixel at once the same color.
By the way here are examples of what Reuben looks like (checkerboard) and how it would look like if it wasn't checkered. Less annoying with checkerboard, eh? :P
I know this may be a little off-topic, but is it just me or does Reuben look sort of like a telephone? That's what I always thought when I played the game.
-
I can see that :D I always saw a person because that is what I expected, but that could actually be a really nice telephone sprite o.o
-
Yeah now that you mention it it seems like it lol. I guess it can't be helped due to the conversion of the battle sprite from 16x16 to 8x8. XD
-
I can still tell that it isn't a phone, though :3 There are only so many ways to make an 8x8 sprite, anyways. (well, 2^64 ways, but not that many that look good XD)