Subject: Re: Standalone VMBW

From: [email-masked]
Date: Wed, 24 Mar 2010 08:20:56 EDT

Does anyone have the source for a standalone VMBW routine that they would  
be wiling to share?
 
Bob  Carmany

---

From: "kabldb" <[email-masked]>
Date: Wed, 24 Mar 2010 15:32:12 -0000

; r0=destination in vdp
; r1=source address in cpu rom/ram
; r2=number of bytes to write

vmbw
 ori r0,>4000
 swpb r0
 movb r0,@vdpa
 swpb r0
 movb r0,@vdpa
 nop
vmbw1
 movb *r1+,@vdpw
 dec r2
 jne vmbw1
 rt

---

From: mark wills <[email-masked]>
Date: Wed, 24 Mar 2010 18:39:03 +0000 (GMT)

Bob

Karstens code is exactly the same as mine. The only gotcha is to be aware that on exit, bit 1 (>4000) of R0 is set. This normally won't matter but it's something to bear in mind!

Mark

----- Original Message ----
> From: kabldb <[email-masked]>
> To: [email-masked]
> Sent: Wed, 24 March, 2010 15:32:12
> Subject: [TI994A] Re: Standalone VMBW
> 
> ; r0=destination in vdp
; r2=number of 
> bytes to write

vmbw
ori r0,>4000
swpb r0
movb r0,@vdpa

movb r0,@vdpa
nop
vmbw1
movb *r1+,@vdpw
dec r2

rt

--- In 
> ymailto="mailto:[email-masked]" 
> href="mailto:[email-masked]">[email-masked], rmcarmany@... 
> wrote:
>
> Bob  
> Carmany

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

Yahoo! 
> Groups Links

>   
> >http://groups.yahoo.com/group/TI994A/

> href="http://groups.yahoo.com/group/TI994A/join" target=_blank 
> >http://groups.yahoo.com/group/TI994A/join
    (Yahoo! ID 
> required)

> href="mailto:[email-masked]">[email-masked] 
> 
    
> href="mailto:[email-masked]">[email-masked]

> ymailto="mailto:[email-masked]" 
> href="mailto:[email-masked]">[email-masked]

> href="http://docs.yahoo.com/info/terms/" target=_blank 
> >http://docs.yahoo.com/info/terms/

---

From: "kabldb" <[email-masked]>
Date: Thu, 25 Mar 2010 04:45:30 -0000

Basically page 268 in the E/A. Don't know where I got the ORI part from.

:-)

--- In [email-masked], mark wills <markrobertwills@...> wrote:
> > From: kabldb <kabldb@...>
> > href="mailto:[email-masked]">[email-masked], rmcarmany@ 
> > wrote:
> >

---

From: "Matthew" <[email-masked]>
Date: Tue, 30 Mar 2010 03:06:50 -0000

Tursi and I proved that the NOP is not required.  The 9900 can never be faster than the 9918A, even in the worst case scenario (Graphics Mode II during a horizontal scan with sprites) because the 9918A triggers the 16-to-8 bit multiplexer circuit and causes wait states.

Also, if you are willing to know where your workspace is, you can drop both SWPB instructions.  This is the version I use and it has been tested on real hardware in a few programs, the latest being my FlyGuy II game remake.

* VDP Memory Map
*
VDPRD  EQU  >8800             * VDP read data
VDPSTA EQU  >8802             * VDP status
VDPWD  EQU  >8C00             * VDP write data
VDPWA  EQU  >8C02             * VDP set read/write address

* Workspace
WRKSP  EQU  >8300             * Workspace
R0LB   EQU  WRKSP+1           * R0 low byte reqd for VDP routines

MSG1   TEXT 'Hello Bob'
MSG1E

       EVEN
.
.
.
      LIMI 0
      LWPI WRKSP

      LI   R0,396
      LI   R1,MSG1
      LI   R2,MSG1E-MSG1
      BL   @VMBW
.
.
.

* VDP Multiple Byte Write
*
* R0   Starting write address in VDP RAM
* R1   Starting read address in CPU RAM
* R2   Number of bytes to send to the VDP RAM
*
* R0 is modified, but can be restored with: ANDI R0,>3FFF
*
VMBW   MOVB @R0LB,@VDPWA * Send low byte of VDP RAM write address
       ORI  R0,>4000     * Set read/write bits 14 and 15 to write (01)
       MOVB R0,@VDPWA    * Send high byte of VDP RAM write address
VMBWLP MOVB *R1+,@VDPWD  * Write byte to VDP RAM
       DEC  R2           * Byte counter
       JNE  VMBWLP       * Check if done
       B    *R11

Matthew

--- In [email-masked], "kabldb" <kabldb@...> wrote:
> --- In [email-masked], rmcarmany@ wrote:
> >

---

From: "Beery" <[email-masked]>
Date: Tue, 30 Mar 2010 20:29:45 -0000

I just saw this message so I am dropping into the discussion way late.  Does this test hold true if rather than a 9900, it is a 9995 running the code? i.e, if the code is running on a Geneve?

--- In [email-masked], "Matthew" <matthew@...> wrote:
> --- In [email-masked], "kabldb" <kabldb@> wrote:
> >
> > ; r0=destination in vdp

---

From: tursi <[email-masked]>
Date: Tue, 30 Mar 2010 14:24:39 -0700 (PDT)

> I just saw this message so I am dropping into the discussion way late. 
> Does this test hold true if rather than a 9900, it is a 9995 running the 
> code? i.e, if the code is running on a Geneve?

No, we only tested on TI-99/4A consoles (not having any 9995 based 
machines :) ).

It might be interesting to see if Matthew's game using the techniques 
works on the Geneve or not. Nevertheless, the guidelines we came up with 
only apply to the 4A.