* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: KIMP - a (huge) WIP image/sprite editor for KnightOS  (Read 3674 times)

0 Members and 1 Guest are viewing this topic.

Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 87
  • Post Rating Ratio: +0/-0
KIMP - a (huge) WIP image/sprite editor for KnightOS
« on: October 13, 2015, 06:49:20 am »
KIMP = KnightOS image manipulation program
I'm new to assembly (and anything calculator related) and decided to try and make a sprite editor for KnightOS. Eventually, it will support KnightOS's image format (and will also require me implementing 'kimg' support into the kernel d: ).

The source code is currently available here: https://github.com/maxleiter/kimp and any suggestions/comments/anything is appreciated.

Here's a quick screenshot



EDIT: Updated image with centered grid
« Last Edit: October 14, 2015, 05:37:42 am by Max Leiter »



Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: KIMG - a (huge) WIP image/sprite editor for KnightOS
« Reply #1 on: October 13, 2015, 07:19:41 am »
Looks good so far. Glad that you got into calculator development. :)

My suggestions would be to move the sprite on the side and the menu further, so that when the menu is open, then we still see the sprite.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Streetwalrus

  • Professional slacker
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Israel
  • Posts: 2903
  • Post Rating Ratio: +20/-0
  • ƎW∀⅁ ƎH⊥
  • Gender: Male
Re: KIMG - a (huge) WIP image/sprite editor for KnightOS
« Reply #2 on: October 13, 2015, 07:53:59 am »
The menu is part of the KnightOS UI. The sprite grid seems to be off center though.
  • Calculators owned: TI-80, HP 40G, TI-84 Plus rev G (yay 128k RAM), TI-83 Plus Silver Edition (broken LCD), TI-82 Stats.fr (black), TI-Nspire CX rev C (yay Nlaunchy), TI-83+ SE ViewScreen



Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 87
  • Post Rating Ratio: +0/-0
Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
« Reply #3 on: October 13, 2015, 08:01:55 pm »
Centered the grid, looks a lot better. As streetwalrus said, I can't move the 'menu' atm.



For some reason the menu causes the kernel to crash if opened twice, and doesn't really work.

Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
« Reply #4 on: October 14, 2015, 02:05:00 am »
Sorry to hear about the crashes. Can you post the source in case people can help?
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Ivoah

  • Super User
  • Join Date: Dec 2014
  • Location:
  • Posts: 523
  • Post Rating Ratio: +6/-0
    • @NoahRosamilia
    • Ivoah
    • @UCmgDyh_AeaHALohvR7PKXIw
    • /u/Ivoah
    • Ivoah
    • 114/11421
    • Codinghobbit
  • Gender: Male
  • WalriiPoints: 100
Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
« Reply #5 on: October 14, 2015, 02:06:21 am »
Sorry to hear about the crashes. Can you post the source in case people can help?

He already gave a link to the source

The source code is currently available here: https://github.com/maxleiter/kimp and any suggestions/comments/anything is appreciated.
  • Calculators owned: TI-86 (now broken), TI SR-56, TI-Nspire CX CAS, TI-84+ SE, TI-84+ SE, TI-85, TI-73 Explorer VS, ViewScreen, TI-84+ CSE, TI-83+ SE

Offline aeTIos

  • Dabbler in C
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Ede, NL
  • Posts: 1049
  • Post Rating Ratio: +12/-0
  • hi
    • r_vdijk
    • /u/aetios
    • aetios
  • Gender: Male
Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
« Reply #6 on: October 14, 2015, 05:29:50 am »
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
ceci n'est pas une signature

Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 87
  • Post Rating Ratio: +0/-0
Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
« Reply #7 on: October 14, 2015, 05:30:42 am »
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
The issue is definitely KIMP, as the same menu system is implemented in multiple other KOS apps (fileman, castle, etc)

Offline aeTIos

  • Dabbler in C
  • Super User
  • Original 5
  • Join Date: Nov 2014
  • Location: Ede, NL
  • Posts: 1049
  • Post Rating Ratio: +12/-0
  • hi
    • r_vdijk
    • /u/aetios
    • aetios
  • Gender: Male
Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
« Reply #8 on: October 14, 2015, 05:31:50 am »
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
The issue is definitely KIMP, as the same menu system is implemented in multiple other KOS apps (fileman, castle, etc)
If you can't figure it out, maybe ask SirCmpwn? (or anyone else in the KOS IRC channel)
ceci n'est pas une signature

Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 87
  • Post Rating Ratio: +0/-0
Re: KIMP - a (huge) WIP image/sprite editor for KnightOS
« Reply #9 on: October 14, 2015, 05:35:19 am »
Hey, that's cool! Regarding the kernel crashes that could very well be related to KOS itself, as it's still a huge WIP in itself ;)
The issue is definitely KIMP, as the same menu system is implemented in multiple other KOS apps (fileman, castle, etc)
If you can't figure it out, maybe ask SirCmpwn? (or anyone else in the KOS IRC channel)
I've asked multiple times lol, SirCmpwn didn't know (or didn't read it) and Ivoah said he'll help me look into it tomorrow. Other than that it seems like a weird bug. I've tried implementing it in 3 ways, once my own, once basically copied/pasted from Fileman, and one copied/pasted from Calcsys. All of them had basically the same issue, so I think the actual issue may be in another function

EDIT: Ivoah said he took a quick look over it today and didn't see anything wrong with it
EDIT 2: Mostly fixed, the issue was an extra pcall(flushKeys), https://github.com/MaxLeiter/KIMP/commit/fed46d979777c1cedfbb7f697a53a7ce4be7e0d3
« Last Edit: October 14, 2015, 05:55:53 am by Max Leiter »

Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 87
  • Post Rating Ratio: +0/-0
Added a basic cursor, doesn't really like to work yet...


Any suggestions as to how to auto-generate the grid/cursor positions welcome, I have no idea as to how to go about doing it (i. e. input size, generate table)

Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 87
  • Post Rating Ratio: +0/-0
Got the cursor to be functional, now to implement actual drawing :)


Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Good to hear. Also what software do you use to make screenshots by the way? I use CamStudio then VirtualDub, but I was curious if any other software could produce smaller GIF file sizes.


Also can your image editor edit grayscale sprites?
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 87
  • Post Rating Ratio: +0/-0
At the moment it has no saving, loading, or editing lol, but the idea is to support kimg (KnightOS's format), grayscale png, and whatever else there is in the calculator community.

I use ffmpeg with x11grab to record. The gif was made with imgur's video-to-gif thing.


Offline xlibman

  • Omni founder & CW co-founder
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18907
  • Post Rating Ratio: +100/-5
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
If you support other formats than KOS, then Axe sprites (hexadecimal data) should probably be supported as well, since Axe is still used sometimes. You would just have to give the hexadecimal of the sprite data to the user so he can write it down. Of course, it's more for people who own two calculators  or an emulator, but it could still be handy.

And I see. Thanks for the info about your video capture setup.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games