Re: A86: Super fast GridPutSprite


[Prev][Next][Index][Thread]

Re: A86: Super fast GridPutSprite




Ok, DLoc is a lame maze game I'm making to demonstrate Scrolling, and
external level support.

Dux, I believe, posted this routine to load external variables into RAM
page 1:

---------------------------------------------------------------------
 ld hl,levelname-1
 rst $20                                    ;load name to op1
 rst $10                                    ;find brixlevs
 jr c,notFound
 ld h,d                                        ;get ASIC address into hl
 ld l,e
 call $33                                    ;get the abs length
 xor a
 call _SET_MM_NUM_BYTES    ;set number of bytes for _mm_ldir
 ld a,b                                        ;ld ahl,bde
 ld h,d
 ld l,e
 call $4c3f                                    ;ahl += 2
 call _SET_ABS_SRC_ADDR    ;set the source for _mm_ldir
 ld a,1
 ld hl,$1000                                ;absolute address for $9000
on
page 1
 call _SET_ABS_DEST_ADDR
 call _mm_ldir                            ;absolute copy to page 1

levelname:
.db 8,"brixlevs"

------------------------------------------------------------

I needed to know how to address the data in RAM page 1 to load it.
Second, By saying the sprite fits in 1 byte, do you mean that It is one
row of a sprite? Just wondering.

-InFuZeD

David Phillips wrote:
> 
> Yes.  But some games use aligned sprites for stuff.  Like a sidescroller
> might draw the screen the first time using aligned sprites then scroll it
> after that.
> 
> Rom page 1 is not normally loaded into accessable memory when an asm program
> is run.  I don't know the abs address, it's probably on TI's page.  But to
> swap it into memory, you use the ports.  Why do you want to load it anyway?
> You shouldn't be calling rom routines directly, as they will most likely
> move in new rom versions.  Use the call table on page D.  Also, I think you
> have to reload page D when your program exits, but maybe not.
> 
>  ld a,1        ; ROM page 1 (bit 6 reset for ROM, set for RAM)
>  out (5),a     ; page 1 now loaded into $4000-$7FFF area
> --or--
>  out (6),a     ; page 1 now loaded into $8000-$BFFF area
> 
> What is DLoc?
> 
> -----Original Message-----
> From: ComAsYuAre@aol.com <ComAsYuAre@aol.com>
> To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
> Date: Monday, November 02, 1998 4:28 PM
> Subject: Re: A86: Super fast GridPutSprite
> 
> >
> >In a message dated 11/2/98 5:01:06 PM Eastern Standard Time,
> zoneti@home.com
> >writes:
> >
> >> I know I sound stupid but, what is a aligned sprite routine? What
> >>  advantages does a nonaligned routine have over it? Also, where is ROM
> >>  page 1 located? Thanx. I'm starting work on a scrolling external level
> >>  suported DLoc =)
> >>
> >>  -InFuZeD
> >>
> >
> >an aligned sprite is one that fits entirely in a byte .  because the
> routine
> >involves no shifting, they tend to be much quicker.  however, nonaligned
> >sprite routines can be placed anywhere on the screen, making them far more
> >useful.


References: