Rockbox

  • Status Closed
  • Percent Complete
    100%
  • Task Type Patches
  • Category Plugins
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority Very Low
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by zeekoe - 2004-07-16
Last edited by Jonathan Gordon - 2007-07-30

FS#2272 - Etch A Sketch

My Truly Lame Etch A Sketch program (TM) (R)
Well, it’s a bit lame, but there wasn’t anything like it in
the plugins. And submitting can’t hurt, would it?

Closed by  Jonathan Gordon
2007-07-30 10:36
Reason for closing:  Out of Date
Additional comments about closing:  

way out of date, and superceded by rockpaint anyway

zeekoe commented on 2004-07-16 17:57

hm… so submitting a file is not enough and i had to check a
box… whatever :)

Blue Chip commented on 2004-07-17 00:37

You have no screen boundary checking.

Calling drawpixel to plot an off-screen coordinate will
have unpredictable results on rockbox …if you are
*lucky*, it will just crash, but pretty much anything is
feasible.

You must either add screen boundary checking, or if you
prefer you can use the Cyborg Systems Graphics Library
which will take care of this for you.

Good luck,

BC

zeekoe commented on 2004-08-01 14:40

new version with:
- boundary checking
- clear the screen
- save the screen to a bitmap
- startup screen
- move-around-while-not-drawing
- lame bitmap viewer (nobody around at irc by now…)

features suggested and implemented by (alphabetically,
case-(in)sensitive :-) BlueChip
LinusN
midk
zeekoe

just shout if i forget something :-)

zeekoe commented on 2004-08-01 14:43

And here’s the lame bitmap viewer, which will become less
lame when someone knows how to reverse this:
[code]

  rb->memset(buf2, 0, sizeof(buf2));
  for(y = 0;y < 64;y++)
  {
      shift = y & 7;
      for(x = 0;x < 112/8;x++)
      {
          for(i = 0;i < 8;i++)
          {
              buf2[y*112/8+x] |= ((buf[y/8*112+x*8+i] >> 

shift)

                                  & 0x01) << (7-i);
          }
      }
  }

[/code]
and if that someone implements it… :-) I suggest you try it on simulator only for now, but I think it’s
rockbox-safe.

zeekoe commented on 2004-08-19 19:14

attempt to implement loading of pictures, and an alternative
save format for easy loading (because i’m lame… but you
already knew that)

zeekoe commented on 2004-08-19 20:21

Works correct now, F3 is save, put it in viewers to load stuff,
and F2 is export to bmp. If you put it in viewers you can view
the saved .etch files.

Admin
Daniel Stenberg commented on 2004-08-25 11:01

Is it ready for inclusion?

Is the BMP viewer fine to use as a viewer plugin? What
happens if you through a large BMP image on it?

zeekoe commented on 2004-08-25 19:34

etchasketch.c is ready for inclusion, i think. I didn’t get the
bitmap viewer to work, still because of this:
buf2[y*112/8+x] |= ((buf[y/8*112+x*8+i] » shift) & 0×01)
« (7-i);
If I was able to decipher this beast, and reverse the process,
true bitmap loading can be possible.
etchasketch.c now doubles as a plugin and a viewer. It has its
own native saving format, just raw screendumping. It can
actually export to bmps too, but not load them. I can’t get
extra viewers to work though, on my own box, no matter what
I change in viewers.config and no matter what I put in
viewers/
About loading large files: it only loads the first 112*8 bytes, so
no overflowing of the framebuffer.
Problem might be that this program is both plugin _and_
viewer, so which dir to choose?

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing