Author |
Message |
|
62 52 53 53 Formerly known as 62 52 53 53
Active Member
Joined: 30 May 2003 Posts: 607
|
Posted: 09 Jun 2003 03:39:03 pm Post subject: |
|
|
db: define byte
and yes you would need to decompress it. |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog
Joined: 20 May 2003 Posts: 2369
|
Posted: 09 Jun 2003 03:46:55 pm Post subject: |
|
|
In the future, it may be helpful to know that dw is define word (a word is 2 bytes (16-bits) (exactly the size of a ram address)) |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 09 Jun 2003 06:30:30 pm Post subject: |
|
|
to use the buffer, u copy ur image to the plotSScreen, then use _GrBufCpy :
Code: ld hl,image
ld de,plotSScreen
ld bc,768
ldir
bcall(_GrBufCpy)
and to clear the graph buffer :
Code: bcall(_GrBufClr)
is that any help? btw, the stuff at image has to be 96 bits by 64 bits |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 09 Jun 2003 06:33:38 pm Post subject: |
|
|
like so :
Code: LD HL,Sprite1; pointer to bitmap
LD DE,OP1
LD BC,11
LDIR; copy image data to
; RAM
;
LD HL,OP1; pointer to image
LD DE,1133h; position of upper
; left corner (hint: (11,33))...
;
SET plotLoc,(IY+plotFlags)
;
bcall(_DisplayImage)
ret
Sprite1:
.db 8, 8
.db %00111100
.db %01000010
.db %10001001
.db %10000101
.db %10000001
.db %10000001
.db %01000010
.db %00111100
Last edited by Guest on 09 Jun 2003 06:35:03 pm; edited 1 time in total |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 09 Jun 2003 07:35:03 pm Post subject: |
|
|
ok, so i think i messed up... the actual value for that line should be :
Code: ld bc,10
because it is 10 bytes in the sprite (including the size...), 16x16 would be 32 i think (if u use 11 for 8x8, and 44 for 16x16, and 176 for 32x32 then it will work, adding 11 for every 8x8 part of the sprite)... u use op1 because u have to copy the image to ram before it is usable...
Code: set plotLoc,(IY+plotFlags)
this code does [quote name='TI-83 Plus Assembly In 28 Days']Graph and draw routines sent to screen only.[/quote] |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog
Joined: 20 May 2003 Posts: 2369
|
Posted: 10 Jun 2003 04:26:59 am Post subject: |
|
|
To tell you the truth, you are better off simply echoing the sprite to the plotSScreen and putting the plotSScreen on the screen.
OP1 is 11 bytes altogether
Adm.Wiggin was using a built in Bcall which is easier than echoing to the plotSScreen, and much easier than echoing directly to the lcd hardware.
Next,
.db is the same as .defb
.dw is he same as .defw
.word
.txt
.byte
are only existant on some assemblers.
Finally,
Some assemblers allow you to use $ too.
e.g.
jp $ ;jump to current address |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 10 Jun 2003 12:27:31 pm Post subject: |
|
|
tasm allows for .db .dw .word .byte and it also allows for something like jr $+4... if the next command was 2 bytes, then this would skip the next command, whatever that may be... |
|
Back to top |
|
|
Job the GameQuitter
Member
Joined: 04 Jun 2003 Posts: 102
|
Posted: 10 Jun 2003 01:23:19 pm Post subject: |
|
|
Don't forget .ds! I'm not sure what it stand for (define string?), but if I understand correctly .ds 768 defines 768 bytes. Useful for buffers. |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog
Joined: 20 May 2003 Posts: 2369
|
Posted: 10 Jun 2003 02:07:07 pm Post subject: |
|
|
I think .ds is the same as .txt
There is also .db 0(768)
It will make 768 0's |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 10 Jun 2003 02:10:38 pm Post subject: |
|
|
wow, that one is cool! the 768 0's thing... that way u could make ur own grbufclr routine! interesting, but it would probably go pretty slow |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog
Joined: 20 May 2003 Posts: 2369
|
Posted: 10 Jun 2003 05:04:18 pm Post subject: |
|
|
De represents the destination of the data.
image, and plotSScreen are both 2 byte pointsers (words) to a ram address.
image will be a label in your program relative to $9d95, and plotSScreen will be whatever it is set too in ti83plus.inc.
Here is what you are doing.
ld hl,source
ld de,destination
ld bc,768
ldir
What you are doing is copying 768 bytes from the source address to the destination address.
In the post you made, the ldir would copy the image to the plotSScreen location in RAM which is the LCD buffer. |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 10 Jun 2003 07:12:35 pm Post subject: |
|
|
yes, Jbirk, how would u do a direct LCD communication... not using the buffer? is it very hard? |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 10 Jun 2003 08:14:27 pm Post subject: |
|
|
yes, the buffer is a very efficient way... it is the first way that u should use if u r a beginner... if u r very fluent using the buffer, then u can learn about Direct LCD Communications |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog
Joined: 20 May 2003 Posts: 2369
|
Posted: 11 Jun 2003 03:01:01 am Post subject: |
|
|
Here, try this:
ld a,$80
call delay
out ($10),a
ld a,$2b
call delay
out ($10),a
ld a,$ff
call delay
out ($11),a
ret
delay:
push hl
push hl
pop hl
pop hl
ret |
|
Back to top |
|
|
Job the GameQuitter
Member
Joined: 04 Jun 2003 Posts: 102
|
Posted: 11 Jun 2003 07:22:04 am Post subject: |
|
|
It doesn't explain how it works, which is what the guy asked for. :lol:
Here, try this tutorial:TI in 28 days
IMHO, it's the best one out there. Way better than ASM-Guru. |
|
Back to top |
|
|
Adm.Wiggin aka Tianon
Know-It-All
Joined: 02 Jun 2003 Posts: 1874
|
Posted: 11 Jun 2003 12:42:01 pm Post subject: |
|
|
oh ya! WAYY better than ASM guru... even if asm-guru was for the TI-83+, this would top it! |
|
Back to top |
|
|
NETWizz Byte by bit
Bandwidth Hog
Joined: 20 May 2003 Posts: 2369
|
Posted: 11 Jun 2003 02:27:48 pm Post subject: |
|
|
Okay, here is how it works.
You have 12 bytes across
You have 64 bytes down.
port $10 is the instruction port.
Output to $10 the value of 2Bh, and 80h to set your cords ( I do not know where that is, but try it)
Now, output a value to $11 to see your 8 pixels placed.
Try changing the 2bh and the 80h to move the location of the pixels.
Lastly, make a routine to copy data to the LCD. |
|
Back to top |
|
|
|