Author Topic: What's the best sprite editor for TI 68k C/ASM?  (Read 7467 times)

0 Members and 1 Guest are viewing this topic.

Offline Jonson26

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +1/-0
  • Follow cat! Do what cat! Into tree! Now!
    • View Profile
What's the best sprite editor for TI 68k C/ASM?
« on: May 21, 2020, 04:52:09 am »
The title pretty much explains everything. A pencil-like feature would be perfect (like in paint), so i don't have to click on every pixel individually, and instead just drag my mouse with the button pressed down. Greyscale and masking support would be nice too.

Offline Xeda112358

  • they/them
  • Moderator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #1 on: May 21, 2020, 08:00:52 am »
It has been a long time since I did 68k C and Assembly, but I thought that you could basically "include" a .bmp or .png or what-have-you. I know I can do that with the Z80 calcs and probably eZ80.

If so, I always opt for old-school MS Paint, or mtpaint on Linux.

Offline Jonson26

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +1/-0
  • Follow cat! Do what cat! Into tree! Now!
    • View Profile
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #2 on: May 26, 2020, 06:21:30 pm »
AFAIK, in GCC4TI you use arrays of chars, short ints or long ints (for 8, 16 and 32 pixel wide sprites). You can directly edit the sprites if you use binary notation for initialising the arrays. Most of the sprite editors I found on ticalc seem to offer output in hexadecimal, which is fine too. The problem is, that all of the ones I've tried seem to be unfinished in some way or another. As for importing BMP's, I've never seen any mention of it in any of the 68k programming documentation. I guess the search goes on (or I'll have to make my own)  :-\

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #3 on: May 27, 2020, 09:40:37 am »
AFAIK, in GCC4TI you use arrays of chars, short ints or long ints (for 8, 16 and 32 pixel wide sprites). You can directly edit the sprites if you use binary notation for initialising the arrays. Most of the sprite editors I found on ticalc seem to offer output in hexadecimal, which is fine too. The problem is, that all of the ones I've tried seem to be unfinished in some way or another. As for importing BMP's, I've never seen any mention of it in any of the 68k programming documentation. I guess the search goes on (or I'll have to make my own)  :-\
have you tried to just import them to see what happens?
/e

Offline Jonson26

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +1/-0
  • Follow cat! Do what cat! Into tree! Now!
    • View Profile
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #4 on: May 29, 2020, 06:16:39 am »
Well, I don't really see how I would go about importing a BMP file in c. The #include statement is only for code, and in the new file menu in the IDE there's no way to add a BMP. There is the import binary function, but I'm not sure if it can be used for this purpose.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #5 on: May 29, 2020, 02:57:19 pm »
Well, I don't really see how I would go about importing a BMP file in c. The #include statement is only for code, and in the new file menu in the IDE there's no way to add a BMP. There is the import binary function, but I'm not sure if it can be used for this purpose.
With spasm you can #include a bmp file (e.g. images.asm). Have you tried to see if it will just embed the data?
/e

Offline Jonson26

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +1/-0
  • Follow cat! Do what cat! Into tree! Now!
    • View Profile
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #6 on: June 01, 2020, 07:54:04 am »
Why would I use spasm for 68k?  ???
Isn't that made for the z80?

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #7 on: June 01, 2020, 10:30:16 am »
Why would I use spasm for 68k?  ???
Isn't that made for the z80?
That's not what I meant. Have you tried to see if the 68k assembler you are using will allow you to include bmp files?
/e

Offline Jonson26

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +1/-0
  • Follow cat! Do what cat! Into tree! Now!
    • View Profile
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #8 on: June 01, 2020, 03:50:56 pm »
I'm using GCC4TI, which is a C compiler. I've read the included documentation along with some tutorials (there was a nice one on technoplaza.net, back when it was still up) and every single time sprites were declared as arrays of either unsigned chars, unsigned short ints or unsigned long ints. Example smiley face sprite:
Code: [Select]
unsigned char sprite[] = {
0b01111110,
0b10000001,
0b10100101,
0b10000001,
0b10100101,
0b10011001,
0b10000001,
0b01111110
};
Equivalent to:
Code: [Select]
unsigned char sprite[] = {0x7E, 0x81, 0xA5, 0x81, 0xA5, 0x99, 0x81, 0x7E};
As far as the standard assembler for 68k programming, to my knowledge it's always been A68K, which originates from the Amiga (in fact, some of the early Fargo programmers seem to have used only this system) so microsoft BMP's kinda seem out-of-place.

Offline Eeems

  • Mr. Dictator
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6268
  • Rating: +318/-36
  • little oof
    • View Profile
    • Eeems
Re: What's the best sprite editor for TI 68k C/ASM?
« Reply #9 on: June 01, 2020, 04:28:01 pm »
It looks like you can't include bmp files (https://debrouxl.github.io/gcc4ti/faq.html#15). You should open a feature request: https://github.com/debrouxl/gcc4ti/issues
/e