I have spent several hours Googling and trying everything possible. All I want is an ASM script, 100% complete and tested, that will put a sprite on my screen.

Minimum requirements: 8x8 sprite, black and white, placed at X/Y coordinates that are multiples of 8
Awesome requirements: 10x10 sprite, black and white, placed at X/Y coordinates that are multiples of 10
Super awesome requirements: 8x8 or 10x10 sprite, multicolor (standard TI-OS colors is enough), placed at any coordinates

In case you are wondering, I am trying to make Conway's Game of Life in ASM. I made a BASIC version that worked wonderfully but took around 15 seconds per update, so... it's a little too slow.

P.S. I see a lot of TI-84+ CE ASM programs that say they require Doors CSE, but how am I supposed to run it if I can't get Doors CSE on my calculator? Heck, how do the developers of the program see if it works on CE? Do they just *know* that once Doors CSE comes out for 84+ CE that everything will work? I am severely confused here.

P.P.S. If I need to download some files or something, PLEASE PLEASE PLEASE give me LINKS to the files so that I know where to find them. Or embed the code here. I am tired of finding stuff in forum posts that I spend half an hour trying to Google for and can't find anything.

Sorry if I sound a little frustrated... it's getting late. I really appreciate any help; even just the bare minimum request would be awesome. I want to spend several hours figuring out the logic of cellular automation, not displaying it to the screen. Thanks in advance.
Hactar wrote:
P.S. I see a lot of TI-84+ CE ASM programs that say they require Doors CSE, but how am I supposed to run it if I can't get Doors CSE on my calculator? Heck, how do the developers of the program see if it works on CE? Do they just *know* that once Doors CSE comes out for 84+ CE that everything will work? I am severely confused here.

As far as I know, there are no assembly programs that say this. Doors isn't required for anything, it is just a shell to run programs from.

In addition, I am a tad confused as to what you need. Do you just need an assembly snippet to display a rectangle? If this is the case, I would highly recommend learning some more assembly first. I would be more than happy to help out if I knew exactly what input and outputs you require.
I know enough ASM that I created a program which displays a number in the center of the screen and can be incremented/decremented with the arrow keys. It goes from 0-100 and loops around (so if you hit up when it says 100 it will go back to 0). I know how to define sprites using a label and ".db" but I don't know how to actually display them. It must be possible because there are several ASM programs for 84+ CE that do, they are just too complicated for me to extract only the bits I need from them.

EDIT:
Inputs: a=X-pos; b=Y-pos; ix=sprite label;hl/l=whatever else is necessary (like sprite height or something)
Outputs: You can destroy whatever registers you want and I don't particularly need any outputs. All I am asking for is essentially something like IonPutSprite+IonFastCopy that works for 84+ CE.

MateoConLechuga wrote:
Hactar wrote:
P.S. I see a lot of TI-84+ CE ASM programs that say they require Doors CSE, but how am I supposed to run it if I can't get Doors CSE on my calculator? Heck, how do the developers of the program see if it works on CE? Do they just *know* that once Doors CSE comes out for 84+ CE that everything will work? I am severely confused here.

As far as I know, there are no assembly programs that say this. Doors isn't required for anything, it is just a shell to run programs from.

In addition, I am a tad confused as to what you need. Do you just need an assembly snippet to display a rectangle? If this is the case, I would highly recommend learning some more assembly first. I would be more than happy to help out if I knew exactly what input and outputs you require.
You may want to start with something a little simpler first. Here's a routine to draw a rectangle of any color. Color is formatted in 565 color.

For the fixed multiple version:

Code:
H=X,L=Y


For the anywhere version:

Code:
HL = X coordinate of left edge
DE = X coordinate of right edge (must be at most 319)
B = Y coordinate of top edge (from top of screen)
C = Y coordinate of bottom edge (must be greater than or equal to B and at most 239)


Call the routine ChangeRectColor with the color in DE to change the color.


Code:
#define rectangleSize 10
DrawRectangleFixed:
 ld b,rectangleSize
 ld c,l
 mlt bc
 ld b,c
 ld a,c
 add a,rectangleSize
 ld c,a
 ld l,rectangleSize
 mlt hl
 push hl
  ld de,rectangleSize
  add hl,de
  ex (sp),hl
 pop de
DrawRectangleAnywhere:
 jp _FillRect
ChangeRectColor:
 ld.sis (0D02AC0h-0D00000h),de
 ret


Please let me know if you need any further explanation. Hope this helps! Smile

EDIT: If you really, really want a sprite routine, I would recommend taking a look at how Pac-Man CE and Text Editor CE do it. I can post a routine here if you really desire one, but please understand that the color screen adds in a whole new possibility of things.
The script you gave me would be enough. I was unaware of the "_FillRect" function because I think I was using some oudated includes file. (?) But yay! I can do stuff! Thank you so much... I did look at Pacman and it seems to use some 8-bit-per-pixel which isn't necessary (yet) for my purposes, but it seems like it will be very useful if I do want to start using lots of colors.

As for programs requiring Doors CSE, I found several BASIC programs, not ASM. (Oops.) Here's a link to one example: http://www.ticalc.org/archives/files/fileinfo/459/45910.html
ticalc.org, for some reason, decided not to separate TI-BASIC programs into a TI-84 Plus C Silver Edition and a TI-84 Plus CE folder. The former can require Doors CSE, the latter cannot (yet!). Our Archives is divided up slightly less confusingly: https://www.cemetech.net/programs/
Hactar wrote:
P.S. I see a lot of TI-84+ CE ASM programs that say they require Doors CSE, but how am I supposed to run it if I can't get Doors CSE on my calculator? Heck, how do the developers of the program see if it works on CE? Do they just *know* that once Doors CSE comes out for 84+ CE that everything will work? I am severely confused here.

The reason for this is a lot of developers will program things for TI 84 PSCE, and program it using DCSE 8. Then, forgetting, or by accident, they will file their program under TI 84 PCE, forgetting that there is not Doors for it yet. I haven't seen this on Cemetech, but I have seen the issue on Ticalc.org.
I am an owner of TI 84 PCE, and hope that Doors for 84 PCE gets finished soon.
For future information, the _FillRect routine only destroys the register A. Hope this helps! Smile
Does _GetCSC alter any flags and/or set A to zero if no key was pressed? I am trying to make a loop that breaks if the user presses a key. Also is there an easy way to capture presses of the 2nd and Alpha buttons using _GetKey?
Hactar wrote:
Does _GetCSC alter any flags and/or set A to zero if no key was pressed? I am trying to make a loop that breaks if the user presses a key. Also is there an easy way to capture presses of the 2nd and Alpha buttons using _GetKey?


I would recommend you have a look at the documentation, located here:
https://education.ti.com/~/media/01E6AF2CADF84171B6F2E2039357BAAC

Simply search for the command you would like information about, and then apply it to your program. In addtion, there is also WikiTI, which describes a ton about the calculators:
http://wikiti.brandonw.net/index.php?title=WikiTI_Home

Most routines are located under the 83Plus, so take a look Smile

Hope this helps! I know it isn't the most direct answer, but it's a great way for learning Smile
  
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