This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
wesley


Newbie


Joined: 05 May 2009
Posts: 45

Posted: 03 Mar 2010 12:15:01 am    Post subject:

Okay, I'm starting to get into the graphical side of things in my C experience with the 68K hardware.

I was wondering how I would create a sprite with more than 32 bits wide? Here is the image in Hex (converted using Image Studio):


Code:
unsigned char Image1_Layer1[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0xF0,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x00,0x00,0x00,0x1C,0xF8,0x00,0x00,
0x00,0x00,0xFB,0x06,0x00,0x00,0x00,0x03,0xFA,0x7D,0x00,0x00,0x00,0x07,0xE0,0xFF,
0x80,0x00,0x00,0x0F,0x80,0x3F,0xC0,0x00,0x00,0x1E,0x01,0x0F,0xE0,0x00,0x08,0x78,
0x05,0x87,0xE0,0x00,0x07,0xF0,0x06,0xC7,0xF0,0x00,0x03,0xE0,0x22,0xE7,0xF0,0x00,
0x01,0xE2,0x7B,0xEF,0xF8,0x00,0x01,0xC4,0xFF,0xFF,0xF8,0x00,0x03,0xCD,0xFF,0xFF,
0xFC,0x00,0x07,0x9B,0xFF,0xFF,0xFA,0x00,0x0F,0xBB,0xFF,0xFF,0xFB,0x00,0x0F,0xBF,
0xFF,0xFF,0xFD,0x80,0x1F,0xBF,0xFF,0xFF,0xDE,0x40,0x1F,0xFF,0xFF,0xE0,0x3D,0x40,
0x1F,0xFF,0xFF,0xFF,0xF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x3E,0xFF,0xF9,0xE3,0x6A,0x69,0x3E,0xFF,0xFE,0xD1,0x4E,
0xF9,0x3E,0xFF,0xFF,0x88,0xBE,0xA9,0x3E,0xFF,0xFD,0x48,0x0E,0xA9,0x1E,0xFF,0xFF,
0x10,0x07,0x69,0x1E,0xFF,0xFF,0x60,0x04,0xD1,0x1E,0xFF,0xFF,0xEC,0x05,0x22,0x1E,
0xFF,0xFF,0xB2,0x05,0xC2,0x1E,0xFF,0xFF,0x98,0x05,0x42,0x1E,0xFF,0xFF,0xCC,0x05,
0x42,0x1E,0xFF,0xFF,0xC7,0x8A,0x4A,0x1C,0xFF,0xFF,0xE0,0x14,0x5E,0x1E,0xFF,0xFF,
0xE1,0x14,0xFF,0x1E,0xFF,0xFF,0xF6,0x29,0xBF,0x9C,0xFF,0xFF,0xF0,0x5B,0x1F,0x9C,
0xFF,0xFF,0xF8,0xB6,0x13,0xFE,0xFF,0xFF,0xFF,0x64,0x13,0xFE,0xFF,0xF8,0x0F,0xF8,
0x27,0xFE,0xFF,0xF8,0x3F,0xE0,0x4F,0xFE,0xFF,0xF1,0xFF,0x81,0x9E,0x7E,0xFF,0xF0,
0x7C,0x00,0x38,0x3E,0xFF,0xF0,0x00,0x10,0x70,0x3E,0xFF,0xF8,0x00,0x60,0xE0,0x7E,
0xFF,0xEF,0xFF,0x81,0xC0,0xF8,0xFF,0x83,0xFC,0x03,0x81,0xF0,0xFF,0x00,0x00,0x07,
0x03,0xC6,0xFE,0x00,0x00,0x1E,0x07,0x0C,0xFE,0x00,0x00,0x3C,0x0E,0x38,0xFB,0x00,
0x03,0xF0,0x1C,0x72,0xF3,0xFF,0xFF,0xC0,0x78,0xE2
}


Now, if I wanted to create a single 32 bit sprite, I could create something like:


Code:
#include <tigcclib.h>

void _main(void){
  unsigned long sprite[126] = {
   0x00000000,0x00000000,0x00000000,0x00000000,
   0x0001F000,0x00003800,0x00001CF8,0x0000FB06,
   0x0003FA7D,0x0007E0FF,0x000F803F,0x001E010F,
   0x08780587,0x07F006C7,0x03E022E7,0x01E27BEF,
   0x01C4FFFF,0x03CDFFFF,0x079BFFFF,0x0FBBFFFF,
   0x0FBFFFFF,0x1FBFFFFF,0x1FFFFFE0,0x1FFFFFFF,
   0x1FFFCFFF,0x1FFFFFC0,0x0FFFFFFF,0x0FFFFFFF,
   0x07FFFFFF,0x02FFF9FF,0x027EE0FF,0x003FB3FF,
   0x000FE16E,0x0007F05A,0x0005B830,0x0007D800,
   0x0003F000,0x0001A003,0x00013003,0x00011C03,
   0x00008F03,0x00008003,0x00004FC7,0x0000400F,
   0x0000260F,0x0000201E,0x0000203D,0x0000107B,
   0x0007F0FF,0x0008FFFD,0x000BFFE7,0x0013FF9F,
   0x00187C7F,0x001C03FF,0x001FFFFF,0x007FFFFF,
   0x00BFFFFF,0x013FFFFF,0x021FFFFF,0x061FFFFF,
   0x0F05FFFF,0x17FFFFFF,0x2FFFFFFF,0xFFFFFFFF,
   0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,0xFFFFFFFF,
   0xFFFFEFFF,0xFFFFF7FF,0xFFFFF307,0xFFFF0201,
   0xFFFC0000,0xFFF80000,0xFFF00000,0xFFE00000,
   0xFF800000,0xFE000000,0xFF800000,0xFF000000,
   0xFE000080,0xFC000040,0xF8000240,0xF8000120,
   0xF000213F,0xF00030BF,0xF00048A0,0xF000787F,
   0xF2007E7F,0xFA004240,0xFA083F7F,0xFD0420C8,
   0xFF831E3C,0xFFC3FFC5,0xFFF1F7FD,0xFFF9E36A,
   0xFFFED14E,0xFFFF88BE,0xFFFD480E,0xFFFF1007,
   0xFFFF6004,0xFFFFEC05,0xFFFFB205,0xFFFF9805,
   0xFFFFCC05,0xFFFFC78A,0xFFFFE014,0xFFFFE114,
   0xFFFFF629,0xFFFFF05B,0xFFFFF8B6,0xFFFFFF64,
   0xFFF80FF8,0xFFF83FE0,0xFFF1FF81,0xFFF07C00,
   0xFFF00010,0xFFF80060,0xFFEFFF81,0xFF83FC03,
   0xFF000007,0xFE00001E,0xFE00003C,0xFB0003F0,
   0xF3FFFFC0,0xE1FFFC01
  };
  int x = 10;
  int y = 10;

  ClrScr();

  if (!GrayOn ()) return;
  Sprite32 (x,y,63,sprite,GrayGetPlane (DARK_PLANE),SPRT_XOR);
  Sprite32 (x,y,63, &sprite[63],GrayGetPlane (LIGHT_PLANE),SPRT_XOR);

  ngetchx();
  GrayOff();
}

Is there an easy way to do this, or would I have to mesh together two 32 bit sprites?
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 03 Mar 2010 11:02:52 am    Post subject:

Okay, I have a question. I do assembly on the 84+, but I actually only own an 89 titanium. I program directly in hex (on the 84+), so I make use of several charts and the include files for z80 assembly. Is there are a chart somewhere that lists the actual opcodes for the mneumonics?
Back to top
Mapar007


Advanced Member


Joined: 04 Oct 2008
Posts: 365

Posted: 07 Mar 2010 12:19:55 pm    Post subject:

You mean an opcode file for Z80 asm?

The asmin28 tutorial has a reference sheet. Opcodes are in binary, though.

(the file is called z80is.html, iirc)

http://www.ticalc.org/archives/files/fileinfo/268/26877.html

You can also print out the .TAB file from an assembler.
Back to top
Xeda112358


Active Member


Joined: 19 May 2009
Posts: 520

Posted: 08 Mar 2010 10:40:48 am    Post subject:

No, I mean for the 89 (sorry I wasn't clear). I use a Z80 chart (made in Excel) for my Z80 programming, so I was wondering if there was an equivalent for the 68k calculators. Again, I own an 89, but I am borrowing the schools 84+ (they loan them for the year, here). When school is out, I want to be able to do some assembly on my 89. Thanks in advance.
Back to top
Display posts from previous:   
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement