Difference between revisions of "83Plus:Ports:05"

From WikiTI
Jump to: navigation, search
(Added TI-83 Plus Info)
 
(14 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:83Plus:Ports:By_Address|05 - RAM Page]] [[Category:83Plus:Ports:By_Name|RAM Page]] [[Category:83Plus:Ports:By_Name|83Plus:Ports:By_Name]]
+
[[Category:83Plus:Ports:By_Address|05 - RAM Page(SE) - Port 16 Config/Link Assist(83+)]] [[Category:83Plus:Ports:By_Name|RAM Page(SE) - Port 16 Config/Link Assist(83+)]]
 
+
{{wikify}}
+
 
+
 
== Synopsis (TI-83 Plus S.E. and TI-84 Plus Family) ==
 
== Synopsis (TI-83 Plus S.E. and TI-84 Plus Family) ==
 
'''Port Number:''' 05h
 
'''Port Number:''' 05h
Line 8: Line 5:
 
'''Function:''' RAM Paging Port
 
'''Function:''' 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 page RAM pages, not flash pages.
+
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.
  
 
=== Read Values ===
 
=== Read Values ===
Returns the current RAM pages.
+
Returns the current RAM page.
  
 
=== Write Values ===
 
=== Write Values ===
Sets the current RAM page, by giving a value in 00h-07h, inclusive. When you work with the other paging ports, RAM pages are given in 80h-87h, but this port does not need bit 7 to be set. You cannot set the upper four bits.
+
Sets the current RAM page, by giving a value in 00h-07h, inclusive.  
  
 
== Synopsis (TI-83 Plus) ==
 
== Synopsis (TI-83 Plus) ==
 
'''Port Number:''' 05h
 
'''Port Number:''' 05h
  
'''Function:''' Port 16h Configuration Port
+
'''Function:''' [[83Plus:Ports:16|Port 16h]] 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.
+
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.
  
 
=== Read Values ===
 
=== Read Values ===
Nothing of value.
+
The last byte received by the link assist (see [[83Plus:Ports:00|port 0]] for more information).
  
 
=== Write Values ===
 
=== Write Values ===
Writing a set bit to 16h protects the page; writing a clear bit unprotects the page.
+
Writing a set bit to 16h protects the page; writing a clear bit unprotects the page. The value of port 05h affects which bits of port 16h are acted on.  An 'X' in the table indicates the bit is ignored.
 
+
<table align="center" border="1" cellpadding="1" style="text-align: center">
+
<tr>
+
<th colspan=3>Port 05h Bit</th>
+
<th colspan=8>Port 16h Bit</th>
+
</tr>
+
<tr>
+
<th>2</th>
+
<th>1</th>
+
<th>0</th>
+
<th>7</th>
+
<th>6</th>
+
<th>5</th>
+
<th>4</th>
+
<th>3</th>
+
<th>2</th>
+
<th>1</th>
+
<th>0</th>
+
</tr>
+
<tr>
+
<td>0</td>
+
<td>0</td>
+
<td>0</td>
+
<td>ROM 0F</td>
+
<td>ROM 0E</td>
+
<td>ROM 0D</td>
+
<td>ROM 0C</td>
+
<td>ROM 0B</td>
+
<td>ROM 0A</td>
+
<td>ROM 09</td>
+
<td>ROM 08</td>
+
</tr>
+
<tr>
+
<td>0</td>
+
<td>0</td>
+
<td>1</td>
+
<td>ROM 17</td>
+
<td>ROM 16</td>
+
<td>ROM 15</td>
+
<td>ROM 14</td>
+
<td>ROM 13</td>
+
<td>ROM 12</td>
+
<td>ROM 11</td>
+
<td>ROM 10</td>
+
</tr>
+
<tr>
+
<td>0</td>
+
<td>1</td>
+
<td>0</td>
+
<td>X</td>
+
<td>X</td>
+
<td>X</td>
+
<td>X</td>
+
<td>ROM 1B</td>
+
<td>ROM 1A</td>
+
<td>ROM 19</td>
+
<td>ROM 18</td>
+
</tr>
+
<tr>
+
<td>1</td>
+
<td>1</td>
+
<td>1</td>
+
<td>X</td>
+
<td>X</td>
+
<td>RAM 01</td>
+
<td>X</td>
+
<td>X</td>
+
<td>X</td>
+
<td>X</td>
+
<td>RAM 00</td>
+
</tr>
+
</table>
+
  
 +
{|align="center" border="1" cellpadding="1" style="text-align: center"
 +
!colspan=3|Port 05h Bit
 +
!colspan=8|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
 +
|}
  
 
== Comments ==
 
== Comments ==
 +
 +
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:
 +
 +
<nowiki>;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)</nowiki>
 +
 
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.)
 
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.)
  
 
== Credits and Contributions ==
 
== Credits and Contributions ==
 
* '''Michael Vincent:''' Initial documentation.
 
* '''Michael Vincent:''' Initial documentation.
* '''Tijl Coosemans (sp? and correct mundane name?):''' Documenting TI-83 Plus functionality [http://www.kalimero.be/83phwinfo.txt here].
+
* '''Tijl Coosemans:''' Documenting TI-83 Plus functionality [http://tijl.ulyssis.be/83phwinfo.txt here].

Latest revision as of 08:44, 9 August 2011

Synopsis (TI-83 Plus S.E. and TI-84 Plus Family)

Port Number: 05h

Function: 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.

Read Values

Returns the current RAM page.

Write Values

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

Synopsis (TI-83 Plus)

Port Number: 05h

Function: Port 16h 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.

Read Values

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

Write Values

Writing a set bit to 16h protects the page; writing a clear bit unprotects the page. The value of port 05h affects which bits of port 16h 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

Comments

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.)

Credits and Contributions

  • Michael Vincent: Initial documentation.
  • Tijl Coosemans: Documenting TI-83 Plus functionality here.