Port05

Basic Info

Port Address:05

TI 83+SE and TI 84 Family

RAM Paging Port

This port can be used to control what RAM page is paged into the C000h-FFFFh memory bank. Note that it can only map RAM pages, not flash pages.

Writing to Port

Sets the current RAM page, by giving a value in 00h-07h, inclusive.

Reading from Port

Returns the current RAM page.

TI 83+

port16 Configuration Port/Link Assist Read

This port configures which memory pages are locked or unlocked (i.e. whether or not the PC register is allowed to point within the page) by port 16h. Only bits 0..2 are considered, the rest have no effect. Also, this port is used to read the last byte the link assist received.

Writing to Port

The last byte received by the link assist (see port00 for more information).

Reading from Port

Writing a set bit to 16h protects the page; writing a clear bit unprotects the page. The value of Port 05 affects which bits of port16 are acted on. An 'X' in the table indicates the bit is ignored.
Port 05h Bit Port 16h Bit
2 ~ 1 ~ 0 ~ 7 ~ 6 ~ 5 ~ 4 ~ 3 ~ 2 ~ 1 ~ 0
0 0 0 ROM 0F ROM 0E ROM 0D ROM 0C ROM 0B ROM 0A ROM 09 ROM 08
0 0 1 ROM 17 ROM 16 ROM 15 ROM 14 ROM 13 ROM 12 ROM 11 ROM 10
0 1 0 X X X X ROM 1B ROM 1A ROM 19 ROM 18
1 1 1 X X RAM 01 X X X X RAM 00

Example Uses

It has been tested and confirmed that you can unlock RAM 00 on a Ti-83+ by using this port in conjunction with port $16. This allows you to run code in the $C000-$FFFF area. Once you succeed in unlocking flash, the following code can be used to unlock RAM page 0 from within TIOS:

;Tested on OS 1.16 - 1.19

   ld a, %00000111
   out ($05), a
   ld a, $1F
   out ($06), a
   xor a
   call $46DA  ; (assuming boot version 1.00; if you wanted to make
               ; this work in general, you'd need to search the boot
               ; page to find the appropriate code)

At least on my TI-84+, if you output a value with bit 3 set, reading from the port will return a value with bit 3 set. This would imply that you can use RAM pages 08h-0Fh, but these RAM pages do not exist—this bit is simply ignored (only bits 0-2 actually determine what RAM page is active.) - WikiTI


Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.