home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.tar / ftp.whtech.com / Geneve / 9640news / CAT15 / CRTRDGN.ARK < prev    next >
Text File  |  2006-10-19  |  3KB  |  58 lines

  1. ?
  2.  
  3.            INS and OUTS
  4.              By Mack McCormack
  5.  
  6. This is a text file discussion of the ROM cartridge port for the TI-99/4A. It
  7. represents information I have been able to obtain from various references.
  8. Cartridge programs must operate from >6000 to >7FFF. When the computer is RESET
  9. or turned on, the power up routine looks for a Header or Control block at
  10. location >6000 in the cartridge port. This contol block establishes the linkage
  11. into your cartridge program and allows you to have multiple entry points.  Here
  12. is an example contol block used to provide one entry point;
  13.  
  14. 0000 AA01       DATA     >AA01     6000      ID FOR BOOT
  15. 0002 0000       DATA     >0000     6002
  16. 0004 0000       DATA     >0000     6004
  17. 0006 000C       DATA     CHAIN     6006      ADDRESS OF MENU LIST
  18. 0008 0000       DATA     >0000     6008
  19. 000A 0000       DATA     >0000     600A
  20. 000C 0000 CHAIN DATA     >0000     6010      CHAIN POINTER
  21. 000E 0020       DATA     SLOAD     6012      ENTRY POINT
  22. 0010   0F       BYTE     SLOAD-$-1 6014      LENGTH OF MENU TEXT
  23. 0011   54       TEXT     'CARTRIDGE NAME'
  24. 0020 0460 SLOAD B        START
  25. 0022 092E
  26.  
  27. Let's examine the control block. If the TI operating system finds >AA at >6000
  28. it knows a cartride is plugged in the port. The next byte must be a >01 at
  29. location >6001. This informs the operating system that the code in the
  30. cartridge is executable machine language. Other codes are used for GROM, but
  31.  hat's another discussion. The data at location >6002 - >6005 is zero. Location
  32. >6006 must contain a word pointer to a list which identifies the menu text and
  33. associated entry point when that item is selected. This location usually
  34. contains a >600C. Locations >6008 - >600B must be zero. The chain list at >600C
  35. contains the following:
  36.  
  37.    Bytes 1 & 2 = chain pointer to the next menu list - or 0000 is this is the
  38. last list in the chain.
  39.    Bytes 3 & 4 = entry point associated with this menu selection.
  40.    Byte 5 = length of the menu text.
  41.    Bytes 6 - N = Menu Text - this is displayed on main menu.  Craig Miller's
  42. newsletter has additional information on the power up routine for the computer.
  43.  
  44. Remember all dynamic data must be in RAM usually in the >8300 area. This area
  45. is used for registers plus VDP RAM is used for variable storage. Cartridges
  46. cannot REFerence any label or routine outside the cartridge. This means the
  47. cartridge program must provide it's own VSBW, VSBR, VMBW, and VMBR routines
  48. which are normally loaded from the Editor Assembler cartridge. Examples of what
  49. hese routines look like may be found in the Tombstone City game or Craig
  50. Millers newsletter. Armed with this information, it possible to disassemble
  51. code to see how the program works. Hope you find this information useful.
  52.  
  53.  
  54.  
  55. Download complete.  Turn off Capture File.
  56.  
  57.  
  58.