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 Your Projects 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. Project Ideas/Start New Projects => Your Projects
Author Message
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 26 Mar 2007 09:03:44 pm    Post subject:

I have finally talked myself into it. I am going to start making Linerider ASM. I will ask for help as I am new to ASM
Stuff to do:
1. get an explanation of how to draw check
2. make drawing routine check
3. make zoom in feature (Easy) check
4. actual engine w/scrolling (hard) working on
5. multiscreen
6. saving working on
7. Title Screen

Any volunteers/helpers/good friends?


Last edited by Guest on 30 Jun 2008 09:48:16 pm; edited 1 time in total
Back to top
Noob88


Member


Joined: 23 Nov 2005
Posts: 239

Posted: 27 Mar 2007 09:56:27 am    Post subject:

I'd love to help, as I am a huge fan of your game, but I'm not very experienced in asm Dry I probably wouldn't be much help to you.
Back to top
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 27 Mar 2007 03:10:38 pm    Post subject:

Sorry, I'm still learning ASM...if I could, I would volunteer Wink
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 27 Mar 2007 09:19:49 pm    Post subject:

1. draw what? Lines? single pixels? circles?
2. depends on what you want to draw.
3. any zooming feature is slow to implement. Specify exactly what you need in detail.
4. Uhm...
5. Split your buffer up appropriately and draw only to those sectors.
6. Copy your current configuration of whatever you need, be it a table used to keep track of variables or whatnot into an appvar of a size and name that your program creates itself (the SDK will help with that), or rely on a shell, like ION, to use its writeback feature if you want to keep the data persistent in your program.
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 27 Mar 2007 09:31:32 pm    Post subject:

1.I'm going to need to draw pixels (in lines), but to do that, I will need an explination of doing so.
2. draw pixels using 1-9 keys (see above) and inputting the cooridinates to an array
3. not really, I had a pretty fast prototype in basic. Just multiply the array by 2 and redraw the current lines on the graph, just as 2x2 boxes instead of single pixels
4. I'll take care of it.
5.???? the seperate screens exist in seperate pics (at least in basic)
6.pics (or configurations of the pixels) need to be stored.
Back to top
Iambian


Advanced Member


Joined: 13 Mar 2004
Posts: 423

Posted: 27 Mar 2007 10:06:45 pm    Post subject:

1. To draw a pixel on the screen, you need to know that the entire screen is kept on a buffer 12 bytes on a row, with 64 rows on the entire screen. 12 bytes is needed because each pixel can be represented by a single bit, and there are eight of those in a byte. 12*8 = 96. To draw a pixel to the screen, you first need to figure out where on the buffer you're going to draw. For this, the origin of the "graph" is at the top-left corner of the screen (I say "graph" because we don't deal with negatives. It's just the values.) For each Y value from 0 to 63, you multiply that by 12. In Z80 ASM, this is accomplished by adding the number by itself twice (x4), saving that number, adding to itself again (xCool and then adding what was saved (x4 + x8 = x12). For the X coordinate, you divide the number you seek by 8 to obtain the particular byte you need on that row. To do this, you need to right-shift the byte three times. Make sure that you catch the remainder into another variable and reshift it so that it reflects a value between 0 and 7. Save this number for later. You add the quotient of the division with the result of the multiplication and then add into it the address of the buffer (which may be plotsscreen) to obtain the specific byte you need. With the remainder that you saved, you will then get a bitmask, depending on whether or not you want to write or clear a bit and rotate it left as many times as indicated in the variable. Other people will use a small lookup table to retrieve this preshifted mask beforehand. Depending on the mask, you will now want to OR or AND the contents of the pointer to the buffer and the write back the result. You'll want to see code for more details (not posted cuz I'm lazy)

2. Uh... yeah.
3. What I meant to say was that it's slow if the numbers you have to work with isn't nice (i.e. powers of two). In ASM, it should be lightning-fast (though I haven't tried to make something like that yet, so I dunno)
4. Scrolling might be accomplished by a simple shift across the entire screen, or at least parts to it.
5. I still don't understand this "multiscreen" concept. Please expound upon it.
6. You could just let automatic writeback handle the mess. All you have to do is write the information directly into your program. One surefire method is to have all your variables contained within the program itself as opposed to in saferam.
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 28 Mar 2007 07:11:36 am    Post subject:



5. See? when someone draws to the end of the screen, it goes to the next pic in line.

1. Thank you. I think I get it now. A little snippet of code will help, like putting a pixel on 45,23 or something.
Back to top
benryves


Active Member


Joined: 23 Feb 2006
Posts: 564

Posted: 28 Mar 2007 08:44:24 am    Post subject:

Ion provides a function that will retrieve the bitmask and address of the byte a pixel is "in" on the graph buffer (ionGetPixel).


Code:
; Set a pixel at (45, 23)
    ld a,45
    ld e,23
    call ionGetPixel
   ; a = bitmask
   ; hl->address of byte pixel falls in
    or (hl)
    ld (hl),a


You should be able to see how to clear or toggle the pixel...


Code:
; Clear a pixel at (45, 23)
    ld a,45
    ld e,23
    call ionGetPixel
    cpl
    and (hl)
    ld (hl),a



Code:
; Invert a pixel at (45, 23)
    ld a,45
    ld e,23
    call ionGetPixel
    xor (hl)
    ld (hl),a
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 28 Mar 2007 07:32:29 pm    Post subject:

Bueno. To use that, I would need the Ion inc file, right? could I use the Mirage Os inc?
Back to top
benryves


Active Member


Joined: 23 Feb 2006
Posts: 564

Posted: 29 Mar 2007 08:28:48 am    Post subject:

MirageOS supports all Ion functions, though for some reason changes the name (so that'd be iGetPixel, IIRC).

Writing your own wouldn't be very difficult. The offset into the graph buffer would be (y*12)+(x/Cool+plotSScreen, and the bitmask would be $80>>(x%8 ).


Last edited by Guest on 29 Mar 2007 08:29:09 am; edited 1 time in total
Back to top
Liazon
title goes here


Bandwidth Hog


Joined: 01 Nov 2005
Posts: 2007

Posted: 29 Mar 2007 03:32:16 pm    Post subject:

I've been a bit busy, but I really wish you lots of luck since the basic one was really good Smile Smile Smile
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 30 Mar 2007 01:06:05 pm    Post subject:

I'll have lots of time this next week to work on it (spring break). I'll be on the IRC if I need help.
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 31 Mar 2007 05:22:37 pm    Post subject:


Code:

.nolist
#include "ion.inc"
#include "ti83plus.inc"
#define    ProgStart    $9D95
.list
.org    ProgStart - 2
    .db    t2ByteTok, tAsmCmp
   ld a,45
   ld e,23
   call ionGetPixel
   or (hl)
   ld (hl),a
ret
.end
.end

I went to assemble that and i got 94 errors, all of them being duplicate labels. It has to do something with the includes I know it. but what?
Back to top
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 31 Mar 2007 05:29:41 pm    Post subject:

Well, since I don't know much about Asm, I would guess that the

Code:
.end
.end

at the end of the program should be

Code:
END
.end

and that the (hl) should be defined before the program executes anything.
[EDIT]
Shouldn't you also include:

Code:
.list     
#ifdef TI83P     
   .org   progstart-2   
   .db   $BB,$6D  
#else    
   .org   progstart
#endif    
   ret     
   jr   nc,init
?
Please correct me if I am wrong, sinceI'm still learning ASM Wink


Last edited by Guest on 31 Mar 2007 05:32:24 pm; edited 1 time in total
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 31 Mar 2007 05:32:47 pm    Post subject:

It doesn't have anything to do with that.

It has to do with the includes and "duplicate label "& "forward reference in equate" errors.
Back to top
Harrierfalcon
The Raptor of Calcs


Super Elite (Last Title)


Joined: 25 Oct 2006
Posts: 2535

Posted: 31 Mar 2007 06:01:30 pm    Post subject:

Actually, it's probably caused by you including ion.inc AND the 83plus equates. All Ion progs I've seen only include ion.inc, which leads me to believe that ion.inc already has the 83plus equates.
Back to top
frenchcalc1
جان ألعريم


Active Member


Joined: 14 Mar 2007
Posts: 648

Posted: 31 Mar 2007 07:06:44 pm    Post subject:

Harrierfalcon wrote:
Actually, it's probably caused by you including ion.inc AND the 83plus equates.  All Ion progs I've seen only include ion.inc, which leads me to believe that ion.inc already has the 83plus equates.
[post="99881"]<{POST_SNAPBACK}>[/post]

Well, when I include both in my progs, it doesn't give me an error.

@Luby: are you using the ION studio by any chance? and if you're not, I would recommend it, since it automatically compiles it into .8xp format, so no need to go through the TASM and hexadecimal process Wink

Here it is if you want it:
Back to top
kermmartian
Site Admin Kemetech


Calc Guru


Joined: 20 Mar 2004
Posts: 1220

Posted: 31 Mar 2007 07:13:21 pm    Post subject:

/me starts up the "Write it for DCS!" chant. Wink Good luck with this.
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 02 Apr 2007 08:45:41 am    Post subject:

When I only incude Ion.inc, I still get 24 errors. I am trying ion studio, so I'll keep you posted.
Back to top
luby
I want to go back to Philmont!!


Calc Guru


Joined: 23 Apr 2006
Posts: 1477

Posted: 03 Apr 2007 10:58:36 am    Post subject:

I am officially disowning ION as it doesn't like me. My computer is a little sick right now, he caught a cold (I caught him "exchanging data" with our neighbor's computer. He claimed he was only "studying circuitry".) I will have limited access for a few days.

here is a screenie of possible sprites


Is this how to pixel test?

Code:
;(hl) is byte of screen I want to test
;%00000010 is bit of byte i want to test
ld a,%00000010
and (hl)
jr z, pixel_off
jr pixel_on


Last edited by Guest on 03 Apr 2007 04:28:37 pm; edited 1 time in total
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
    » Goto page 1, 2, 3, 4, 5, 6, 7  Next
» View previous topic :: View next topic  
Page 1 of 7 » All times are UTC - 5 Hours

 

Advertisement