Subject: Cart ROM interaction

From: Owen Brand <[email-masked]>
Date: Wed, 16 Jun 2010 11:38:07 -0400

I'm working on a cartridge game at the moment and I have some  
questions to start off with.  I need to find some documentation on how  
it varies from writing an EA5 program.  I'm hoping to use the  
following implements

Cart (8-64k)
32k mem expansion
Disk drive access for large chunks of data

I know an EA5 program can be made to work on a cart (Never-Lander as  
an example) but I was hoping to take a "cart-first" approach to  
writing this game to allow for broad-scale optimization and a very  
thought-out architecture.  I will require disk access, as there will  
be roughly 35-50k of static data (maps an such) which will require  
access to diskette.  I plan to release it as a cart+disk package when  
it is complete.  Thanks in advance for any help.  BTW, assembly makes  
XB look like a dead slug.  Just thought I'd throw that in there.  :)

Owen Brand

        **webmaster**
http://www.Opry99er.com

---

From: mark wills <[email-masked]>
Date: Wed, 16 Jun 2010 20:24:38 +0000 (GMT)

It varies from an EA5 program quite a lot, I'm afraid.

Even with an EA5, you have the security of knowing that there are certain utilities to fall back on (the VDP stuff, calls to ROM (XMLLNK) calls to GPL (GPLLNK) etc, routines for supporting devices and files (DSRLNK) etc etc.

*None* of that is available to you as a cart programmer. You have to code *everything* yourself. As an EA3/5 programmer, you have a cushion, insulating you from the hardware of the machine. Nice little utilities help you. In a cart, it's just you and the silicon.

Fortunately, developers such as yours truly, and I'm sure many others, have already solved these problems. I have for example:

KSCAN
GPLLNK
DSRLNK (written by Paolo)
VSBR
VMBR
VSBW
VMBW
VSBWM
VWTR
Bank switch code
Return from a bank switch code

etc, all ready, wrapped up to go.

If there's anything specific you need to know, just jump in. However, SWPB is the best mailing list for questions of this nature. All the Guru's hang out there, and it's nice to use SWPB for assembly discussions exclusively, as the archive builds up into a nice, searchable knowledge base.

Mark

----- Original Message ----
> From: Owen Brand <[email-masked]>
> To: [email-masked]
> Sent: Wed, 16 June, 2010 16:38:07
> Subject: [TI994A] Cart ROM interaction
> 
questions to start off with.  I need to find some documentation on 
> how  
it varies from writing an EA5 program.  I'm hoping to use 
> the  
following implements

Cart (8-64k)
32k mem 
> expansion

I know an EA5 
> program can be made to work on a cart (Never-Lander as  
an example) but 
> I was hoping to take a "cart-first" approach to  
writing this game to 
> allow for broad-scale optimization and a very  
thought-out 
> architecture.  I will require disk access, as there will  
be 
> roughly 35-50k of static data (maps an such) which will require  
access 
> to diskette.  I plan to release it as a cart+disk package when  
it 
> is complete.  Thanks in advance for any help.  BTW, assembly 
> makes  
XB look like a dead slug.  Just thought I'd throw that in 
> there.  :)

Owen Brand

> >http://www.Opry99er.com

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

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: ti99_forever <[email-masked]>
Date: Wed, 16 Jun 2010 14:09:28 -0700 (PDT)

Actually, you start developing in EA3. You have all those routines available to you.Then you finish it and "package" it as EA5. And it works.
Later, you turn your TI on and try it and it CRASHES! What the hell? Why?You try the EA3 program again. Ok. EA5 again. IT WORKS?!?!?! What is going on?
EA5 doesn't have those utilities available without a CALL INIT. EA3 loader DOES a CALL INIT, EA5 doesn't. So your program runs AFTER EA3 loads the routines. From a cold boot, those routines haven't been loaded...
That is why you add an EA5 file with the utilities to the program files that get loaded...
As for cart programming, you could do something similar if you know 32k is present, since those utilities load in the lower bank (move a copy of the utilities from your module to their normal locations). Or use your own (better choice). Been nicer if TI had just given us relocatable versions of those utilities to link with, instead of a disappearing crutch. Or you can use an assembler which allows you to link with those routines from its library (ISTR that RAGasm does that).

--- On Wed, 6/16/10, mark wills <[email-masked]> wrote:

From: mark wills <[email-masked]>
Subject: Re: [TI994A] Cart ROM interaction
To: [email-masked]
Date: Wednesday, June 16, 2010, 4:24 PM

KSCAN
GPLLNK

Mark

----- Original Message ----
following implements

Cart (8-64k)
32k mem 

I know an EA5 
an example) but 
writing this game to 
thought-out 
be 
access 
it 

Owen Brand

Yahoo! 

    (Yahoo! ID 

Yahoo! Groups Links

---

From: "Jacques Groslouis" <[email-masked]>
Date: Wed, 16 Jun 2010 18:24:02 -0300

Ben,

I think it is RAG Linker that adds the utilities when you save the object 
file in program format. Also RAG Linker allows you to save the file in cart 
format.

Regards,

Jacques

Nominate someone to your TI99HOF
Check out www.ti99hof.org

----- Original Message ----- 
From: "ti99_forever" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, June 16, 2010 6:09 PM
Subject: Re: [TI994A] Cart ROM interaction

Actually, you start developing in EA3. You have all those routines available 
to you.Then you finish it and "package" it as EA5. And it works.
Later, you turn your TI on and try it and it CRASHES! What the hell? Why?You 
try the EA3 program again. Ok. EA5 again. IT WORKS?!?!?! What is going on?
EA5 doesn't have those utilities available without a CALL INIT. EA3 loader 
DOES a CALL INIT, EA5 doesn't. So your program runs AFTER EA3 loads the 
routines. From a cold boot, those routines haven't been loaded...
That is why you add an EA5 file with the utilities to the program files that 
get loaded...
As for cart programming, you could do something similar if you know 32k is 
present, since those utilities load in the lower bank (move a copy of the 
utilities from your module to their normal locations). Or use your own 
(better choice). Been nicer if TI had just given us relocatable versions of 
those utilities to link with, instead of a disappearing crutch. Or you can 
use an assembler which allows you to link with those routines from its 
library (ISTR that RAGasm does that).

Even with an EA5, you have the security of knowing that there are certain 
utilities to fall back on (the VDP stuff, calls to ROM (XMLLNK) calls to GPL 
(GPLLNK) etc, routines for supporting devices and files (DSRLNK) etc etc.

*None* of that is available to you as a cart programmer. You have to code 
*everything* yourself. As an EA3/5 programmer, you have a cushion, 
insulating you from the hardware of the machine. Nice little utilities help 
you. In a cart, it's just you and the silicon.

Fortunately, developers such as yours truly, and I'm sure many others, have 
already solved these problems. I have for example:

KSCAN
GPLLNK

If there's anything specific you need to know, just jump in. However, SWPB 
is the best mailing list for questions of this nature. All the Guru's hang 
out there, and it's nice to use SWPB for assembly discussions exclusively, 
as the archive builds up into a nice, searchable knowledge base.

Mark

----- Original Message ----
following implements

Cart (8-64k)
32k mem

I know an EA5
an example) but
writing this game to
thought-out
be
access
it

Owen Brand

Yahoo!

(Yahoo! ID

Yahoo! Groups Links

---

From: ti99_forever <[email-masked]>
Date: Wed, 16 Jun 2010 15:32:21 -0700 (PDT)

Yes, you're right. Usually these two are packaged together. RAG Linker comes with a large library of routines and works most effectively with RAGasm.

--- On Wed, 6/16/10, Jacques Groslouis <[email-masked]> wrote:

From: Jacques Groslouis <[email-masked]>
Subject: Re: [TI994A] Cart ROM interaction
To: [email-masked]
Date: Wednesday, June 16, 2010, 5:24 PM

Ben,

Regards,

Jacques

----- Original Message ----- 
From: "ti99_forever" <[email-masked]>
To: <[email-masked]>
Sent: Wednesday, June 16, 2010 6:09 PM
Subject: Re: [TI994A] Cart ROM interaction

KSCAN
GPLLNK

Mark

----- Original Message ----
following implements

Cart (8-64k)
32k mem

I know an EA5
an example) but
writing this game to
thought-out
be
access
it

Owen Brand

Yahoo!

(Yahoo! ID

Yahoo! Groups Links

Yahoo! Groups Links