Hi all!
This is my first real BASIC project. Any advice or constructive criticism is welcomed.

Anyways, the goal of SpriteX is to have the ability to draw sprites on the calculator, without having to use the Pen tool. Eventually, the program will be able to draw lines, erase lines and load and save sprites from a list.
The GUI looks a little something like this
*insert image here when the web filter isn't being stupid*


The code that I have right now to write the data to the screen isn't working, but here it is anyway.

Code:

:identity(5,"000000000000000000000000",0,0,1,8,3,0,1)
:identity(5,"7775DD400000000000000018",0,0,1,8,3,0,1)
:identity(5,"455490800000000000000008",0,0,1,8,3,0,1)
:identity(5,"77749C800000000000000508",0,0,1,8,3,0,1)
:identity(5,"146490800000000000000508",0,0,1,8,3,0,1)
:identity(5,"74549D40000000000000025C",0,0,1,8,3,0,1)
:identity(5,"000000000000000000000000",0,0,1,8,3,0,1)
:identity(5,"FFFFFFFFFFFFFFFFFFFFFFFF",0,0,1,8,3,0,1)
:identity(5,"008000000000000000100000",0,0,1,8,3,0,1)
:identity(5,"048000000000000000100714",0,0,1,8,3,0,1)
:identity(5,"0A80000000000000001008AA",0,0,1,8,3,0,1)
:identity(5,"148000000000000000100AA2",0,0,1,8,3,0,1)
:identity(5,"28800000000000000010092A",0,0,1,8,3,0,1)
:identity(5,"308000000000000000100A2A",0,0,1,8,3,0,1)
:identity(5,"008000000000000000100A2A",0,0,1,8,3,0,1)
:identity(5,"008000000000000000100414",0,0,1,8,3,0,1)
:identity(5,"008000000000000000100000",0,0,1,8,3,0,1)
:identity(5,"00800000000000000010071C",0,0,1,8,3,0,1)
:identity(5,"0880000000000000001008A2",0,0,1,8,3,0,1)
:identity(5,"148000000000000000100B2A",0,0,1,8,3,0,1)
:identity(5,"2280003FFFFFFFC000100A22",0,0,1,8,3,0,1)
:identity(5,"448000200000004000100B2A",0,0,1,8,3,0,1)
:identity(5,"2880002000000040001008AA",0,0,1,8,3,0,1)
:identity(5,"108000200000004000100714",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100000",0,0,1,8,3,0,1)
:identity(5,"00800020000000400010071C",0,0,1,8,3,0,1)
:identity(5,"0080002000000040001008A2",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100AAC",0,0,1,8,3,0,1)
:identity(5,"0080002000000040001009A2",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100A9A",0,0,1,8,3,0,1)
:identity(5,"0080002000000040001008A2",0,0,1,8,3,0,1)
:identity(5,"00800020000000400010071C",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100000",0,0,1,8,3,0,1)
:identity(5,"00800020000000400010001C",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100022",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100014",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100014",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100014",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100014",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100008",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100000",0,0,1,8,3,0,1)
:identity(5,"00800020000000400010001C",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100022",0,0,1,8,3,0,1)
:identity(5,"00800020000000400010002C",0,0,1,8,3,0,1)
:identity(5,"008000200000004000100022",0,0,1,8,3,0,1)
:identity(5,"00800020000000400010002C",0,0,1,8,3,0,1)
:identity(5,"008000200000004006100022",0,0,1,8,3,0,1)
:identity(5,"00800020000000400990001C",0,0,1,8,3,0,1)
:identity(5,"308000200000004008700000",0,0,1,8,3,0,1)
:identity(5,"4E800020000000400810001C",0,0,1,8,3,0,1)
:identity(5,"428000200000004030100022",0,0,1,8,3,0,1)
:identity(5,"4280003FFFFFFFC0C030002A",0,0,1,8,3,0,1)
:identity(5,"7E8000000000000100500022",0,0,1,8,3,0,1)
:identity(5,"008000000000000200900024",0,0,1,8,3,0,1)
:identity(5,"008000000000003C0690002A",0,0,1,8,3,0,1)
:identity(5,"008000000000004006500014",0,0,1,8,3,0,1)
:identity(5,"008000000000008000300000",0,0,1,8,3,0,1)
:identity(5,"3C8000000000008060500000",0,0,1,8,3,0,1)
:identity(5,"4A8000000000004062500000",0,0,1,8,3,0,1)
:identity(5,"7E8000000000002387900000",0,0,1,8,3,0,1)
:identity(5,"428000000000002442100000",0,0,1,8,3,0,1)
:identity(5,"42800000000000244C100000",0,0,1,8,3,0,1)
:identity(5,"7E8000000000002440100000",0,0,1,8,3,0,1)
:identity(5,"008000000000002380100000",0,0,1,8,3,0,1)
The most obvious things I see about that code is that 1) You can remove all the ")" characters to save a bunch of space, and 2) You never change the x,y params, so each one is drawing it 0,0--you need to change the coordinates to draw to different places.
What calculator is this for, Prizm, TI, or something else?
I believe the TI-83+ with the Doors CS library.
Also, it looks like this is your desired image:

But the way you're drawing it is totally wrong. I suggest you read the PutSprite wiki page. What you're drawing is 64 8x8 sprites at 0,0, but the data you're sending in is more like 8x12 (12 bytes). What you're actually trying to draw is a single 96x64 pixel sprite at 0,0.
Made some new code to hopefully fix the problem, but it created a new one. All my calcs crash upon running the program.

Code:
identity(5,"000000000000000000000000
7775DD400000000000000018
455490800000000000000008
77749C800000000000000508
146490800000000000000508
74549D40000000000000025C
000000000000000000000000
FFFFFFFFFFFFFFFFFFFFFFFF
008000000000000000100000
048000000000000000100714
0A80000000000000001008AA
148000000000000000100AA2
28800000000000000010092A
308000000000000000100A2A
008000000000000000100A2A
008000000000000000100414
008000000000000000100000
00800000000000000010071C
0880000000000000001008A2
148000000000000000100B2A
2280003FFFFFFFC000100A22
448000200000004000100B2A
2880002000000040001008AA
108000200000004000100714
008000200000004000100000
00800020000000400010071C
0080002000000040001008A2
008000200000004000100AAC
0080002000000040001009A2
008000200000004000100A9A
0080002000000040001008A2
00800020000000400010071C
008000200000004000100000
00800020000000400010001C
008000200000004000100022
008000200000004000100014
008000200000004000100014
008000200000004000100014
008000200000004000100014
008000200000004000100008
008000200000004000100000
00800020000000400010001C
008000200000004000100022
00800020000000400010002C
008000200000004000100022
00800020000000400010002C
008000200000004006100022
00800020000000400990001C
308000200000004008700000
4E800020000000400810001C
428000200000004030100022
4280003FFFFFFFC0C030002A
7E8000000000000100500022
008000000000000200900024
008000000000003C0690002A
008000000000004006500014
008000000000008000300000
3C8000000000008060500000
4A8000000000004062500000
7E8000000000002387900000
428000000000002442100000
42800000000000244C100000
7E8000000000002440100000
008000000000002380100000",0,0,96,64,0,1)
blue_bear_94 wrote:
I believe the TI-83+ with the Doors CS library.

No, it was actually the PicArc library. Is there a length limit to the string? Did you actually type enter after every 16 characters?
I am using the Doors CS Library. Code is still not working, so I guess I'll have to use a Pic instead. Really don't want to, but it will have to do for now I guess. Is there anyway to do button interrupts in Z80 basic?
You seem to be missing a few arguments to identity(5..., which is probably responsible for the crash:

http://dcs.cemetech.net/index.php?title=BasicLibs:PutSprite

identity(5,"HEXSTRING",x,y,w,h,logic,flip,update_lcd) vs.
identity(5,"YOURHEX",0,0,96,64,0,1)
  
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
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement