Jump to content
IGNORED

TI Invaders Source Code


wyerd

Recommended Posts

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.

  • Like 1
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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
  • Like 1
Link to comment
Share on other sites

 

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.

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

 

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
Link to comment
Share on other sites

  • 4 years later...

On the Geneve:

 

Neither QDE or Peter Muys EDIT are capable of loading the whole file.
 
genasm IS capable of compiling the source with no changes.
 
The resulting object file is:

 

image.png.04308383872bbc1a12f9a628395da72a.png
 
That object file can then be run via e/a option 3 in GPL mode.
  • Like 2
Link to comment
Share on other sites

@dhe

 

Use MyWord, and when you use the Load File command, do a LF then a filename of:

 

1 2000 HDS2.TISRC.TIINV.TIINVS

 

Save that out as PART1

 

Then, do another LF:

2001 4000 HDS2.TISRC.TIINV.TIINVS

Save that out as PART2

 

Repeat until you get the whole file broken down.

 

 

  • Like 1
  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...