Jump to content

Photo

TI Invaders Source Code


15 replies to this topic

#1 wyerd ONLINE  

wyerd

    Moonsweeper

  • 415 posts
  • Location:Lake George, NY

Posted Wed Nov 15, 2017 1:38 PM

Does anyone have the source code of TI Invaders disk version that they could post? I have the scanned PDF, but could do with the original source. Thanks.

#2 digdugnate OFFLINE  

digdugnate

    Dragonstomper

  • 724 posts
  • Location:SW Missouri

Posted Wed Nov 15, 2017 3:16 PM

like disk format?  here it is in tidisk.

Attached Files



#3 wyerd ONLINE  

wyerd

    Moonsweeper

  • Topic Starter
  • 415 posts
  • Location:Lake George, NY

Posted Wed Nov 15, 2017 7:28 PM

like disk format?  here it is in tidisk.

 

Thanks, but it appears to be a load of hex. Are you sure it's the source code and not the object code?



#4 Ksarul OFFLINE  

Ksarul

    River Patroller

  • 4,235 posts

Posted Wed Nov 15, 2017 7:46 PM

The disk only came with the object code. The photocopy of the printout is the only copy of the source code I've seen in the wild. The same went for Parsec until I took the printed source, scanned it in, and ran it through an OCR followed by about 20 runs to correct errors. Paul Urbanus was of immeasurable help in that process, as he and I tag teamed for the error correction cycles.



#5 wyerd ONLINE  

wyerd

    Moonsweeper

  • Topic Starter
  • 415 posts
  • Location:Lake George, NY

Posted Wed Nov 15, 2017 8:14 PM

The disk only came with the object code. The photocopy of the printout is the only copy of the source code I've seen in the wild. The same went for Parsec until I took the printed source, scanned it in, and ran it through an OCR followed by about 20 runs to correct errors. Paul Urbanus was of immeasurable help in that process, as he and I tag teamed for the error correction cycles.

 

Thanks for confirming - I thought as much. Looks like I've got some OCR'ing to do  :-o  :-o


Edited by wyerd, Wed Nov 15, 2017 8:14 PM.


#6 Asmusr ONLINE  

Asmusr

    River Patroller

  • 2,496 posts
  • Location:Denmark

Posted Thu Nov 16, 2017 1:09 AM

This?

Attached Files



#7 wyerd ONLINE  

wyerd

    Moonsweeper

  • Topic Starter
  • 415 posts
  • Location:Lake George, NY

Posted Thu Nov 16, 2017 5:48 PM

This?

 

Thanks Rasmus, just what I was looking for.

 

Question. How are the TITLES characters on page 4 being defined as they are all greater than >D0? 


Edited by wyerd, Thu Nov 16, 2017 5:50 PM.


#8 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,993 posts
  • Location:Denmark

Posted Thu Nov 16, 2017 11:52 PM

How are the TITLES characters on page 4 being defined as they are all greater than >D0?

 
If you take a closer look at this screen below, you'll find TITLES is like a complete screenshot, 768 characters (SIT), or pointers to character definitions (PDT) and colors (CT).
 
SIT is the Screen Image Table, PDT is the Pattern Definition Table and CT is the Color Table.

tiinvaders5.png
 
tiinvaders6.png

tiinvaders7.png

 

 


Edited by sometimes99er, Thu Nov 16, 2017 11:58 PM.


#9 wyerd ONLINE  

wyerd

    Moonsweeper

  • Topic Starter
  • 415 posts
  • Location:Lake George, NY

Posted Fri Nov 17, 2017 7:40 AM

 
If you take a closer look at this screen below, you'll find TITLES is like a complete screenshot, 768 characters (SIT), or pointers to character definitions (PDT) and colors (CT).
 
SIT is the Screen Image Table, PDT is the Pattern Definition Table and CT is the Color Table.

tiinvaders5.png
 
tiinvaders6.png

tiinvaders7.png

 

 

 

Sorry, I still can't figure out where the 3 character sets are being created. The invaders for instance have their pattern generator sets from page to around page 11. 



#10 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,993 posts
  • Location:Denmark

Posted Fri Nov 17, 2017 8:11 AM

Sorry, I still can't figure out where the 3 character sets are being created. The invaders for instance have their pattern generator sets from page to around page 11.

  
Okay. Take a look at lines 1097-1106.

       BL   @WRTVCL          INVADER PATTERNS
       DATA >800,384,IP30L
       BL   @WRTVCL          FIRST CHARACTER SET
       DATA >980,512,CHAR
       AI   VDPADD,>200
       BL   @WRITE           SECOND CHARACTER SET
       BL   @WRTVCL
       DATA >0D80,512,CHAR1  THIRD CHAR SET(LARGE CHAR SET) - JEDI
       BL   @WRTVCL          COPY RIGHT SYMBOL
       DATA >C80,8,COPYRT


Edited by sometimes99er, Fri Nov 17, 2017 8:12 AM.


#11 PeteE ONLINE  

PeteE

    Chopper Commander

  • 101 posts
  • Location:Beaverton, OR

Posted Fri Nov 17, 2017 10:30 AM

  
Okay. Take a look at lines 1097-1106.
 

       BL   @WRTVCL          INVADER PATTERNS
       DATA >800,384,IP30L
       BL   @WRTVCL          FIRST CHARACTER SET
       DATA >980,512,CHAR
       AI   VDPADD,>200
       BL   @WRITE           SECOND CHARACTER SET
       BL   @WRTVCL
       DATA >0D80,512,CHAR1  THIRD CHAR SET(LARGE CHAR SET) - JEDI
       BL   @WRTVCL          COPY RIGHT SYMBOL
       DATA >C80,8,COPYRT

Interesting, it looks like they are passing constant parameters to WRTVCL as DATA immediately following the BL instruction.  I've started doing this in a few places in my own code, but I hadn't seen it discussed in the assembly programming thread.  For each parameter, using DATA is one word shorter than using LI and passing in registers.  The called function can easily get each parameter using MOV *R11+, <reg>, and that also moves the return address in R11 to the correct location after the DATA statements.



#12 S1500 OFFLINE  

S1500

    River Patroller

  • 4,583 posts
  • Location:Twin Cities

Posted Fri Nov 17, 2017 10:49 AM

Where's the smiley & frowny faces in the game?



#13 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,993 posts
  • Location:Denmark

Posted Fri Nov 17, 2017 11:07 AM

Where's the smiley & frowny faces in the game?

 

They don't appear in the game, but are indeed part of the data (GROM) in the cartridge.
 

tiinvaders4.png



#14 Stuart ONLINE  

Stuart

    Dragonstomper

  • 713 posts
  • Location:Southampton, UK

Posted Fri Nov 17, 2017 4:17 PM

Interesting, it looks like they are passing constant parameters to WRTVCL as DATA immediately following the BL instruction.  I've started doing this in a few places in my own code, but I hadn't seen it discussed in the assembly programming thread.  For each parameter, using DATA is one word shorter than using LI and passing in registers.  The called function can easily get each parameter using MOV *R11+, <reg>, and that also moves the return address in R11 to the correct location after the DATA statements.

It's fairly common - TI use the technique is some of their own example programs. You can do the same with a BLWP instruction by using MOV *R14+,Rx.

 

Also useful for supplying jump addresses for a subroutine. For example, suppose you had a routine to input some hex characters from the user. You BL (or BLWP) to the routine, and follow that with a DATA statement containing a jump address if the user makes a null input, then another DATA statement containing a jump address if the user inputs a non-hex character, then the code returns to the next word if the user input is valid and the program continues.



#15 wyerd ONLINE  

wyerd

    Moonsweeper

  • Topic Starter
  • 415 posts
  • Location:Lake George, NY

Posted Sun Nov 19, 2017 7:16 PM

  
Okay. Take a look at lines 1097-1106.
 

       BL   @WRTVCL          INVADER PATTERNS
       DATA >800,384,IP30L
       BL   @WRTVCL          FIRST CHARACTER SET
       DATA >980,512,CHAR
       AI   VDPADD,>200
       BL   @WRITE           SECOND CHARACTER SET
       BL   @WRTVCL
       DATA >0D80,512,CHAR1  THIRD CHAR SET(LARGE CHAR SET) - JEDI
       BL   @WRTVCL          COPY RIGHT SYMBOL
       DATA >C80,8,COPYRT

 

OK, I see what's happening here, but these line of code are saving the default character set and also the copyright symbol. Is the copyright symbol part of the ROM, because I've never seen it defined in Basic or XB? I suppose it must be somewhere. Why is it reading the VDP RAM to save these characters? Does the VDP RAM get loaded from the ROM on startup? I've only just started to learn assembly over the last few days and I thought ripping this code apart was the best way to do it! :-o

       BL   @RDVCL           SAVE SMALL CHAR SET - JEDI -
       DATA >900,512,CHAR
       BL   @WRTVCL          CLEAR SCREEN
       DATA >FF8,8,ZEROES
       BL   @CLRSCR
       BL   @RDVCL           SAVE COPY RIGHT SYMBOL
       DATA >850,8,COPYRT

Edited by wyerd, Sun Nov 19, 2017 7:18 PM.


#16 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 3,993 posts
  • Location:Denmark

Posted Sun Nov 19, 2017 10:39 PM

Is the copyright symbol part of the ROM, because I've never seen it defined in Basic or XB? I suppose it must be somewhere.

 

Yes, it's defined in GROM. You've got 3 capital letters/uppercase character sets followed by the definition for the TI symbol and then the copyright sign.

 

tiinvaders8.png

  

  






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users