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

From WikiTI
Jump to: navigation, search
m
 
Line 1: Line 1:
'''Note:''' Do not take the information on this template page as actual documentation!
+
[[Category:83Plus:Ports:By_Address|21 - Hardware Type]]
 
+
[[Category:83Plus:Ports:By_Name|Hardware Type]]
The Ports are named by their number, in hexadecimal. An example is [[83Plus:Ports:00]].
+
[[Category:83Plus:Ports:By_Address:Protected|21 - Hardware Type]]
 
+
You also must put a variation on the following code into your page to have it categorized:
+
NaodW29-nowiki4e456ce16c2fc68b00000001
+
 
+
----
+
 
+
 
== Synopsis ==
 
== Synopsis ==
'''Port Number:''' 06h
+
'''Port Number:''' 21h
  
'''Function:''' Flash Memory Paging
+
'''Function:''' Hardware Type
  
This port controls what page is swapped into the 4000h to 7FFFh range. ('''DO NOT''' take this template page as real documentation on port 6!)
+
This port is simply a protected register which is set by the boot code according to the hardware version.
  
 
=== Read Values ===
 
=== Read Values ===
* [00h - FFh]: The current port mapped to the memory range 4000h through 7FFFh.
+
* Bit 0: 1 on either the 83+ SE or the 84+ SE, 0 on the 84+ basic.
 +
* Bit 1: ''Unknown -- always set to zero''
 +
* Bits 2-7 do not seem to do anything.
  
 
=== Write Values ===
 
=== Write Values ===
* [00h - FFh]: The new page to swap in to the memory range 4000h through 7FFFh
+
* [00h - FFh]: New value for the register
 
+
''Note: if you would have bitwise flags for your port, label them "bit X".''
+
  
 
== Comments ==
 
== Comments ==
The behavior of this port changes in different memory map modes.
+
This port does not exist on the standard 83+.  See [[83Plus:Ports:02|port 2]].
 +
 
 +
There is no reason to write to this port, but by reading from it you can determine something about the HW version.
 +
 
 +
TIOS polls both bits 0 and 1, by taking the logical AND with 3.
  
 
== Example ==
 
== Example ==
NaodW29-nowiki4e456ce16c2fc68b00000002
+
in a,[[83Plus:Ports:02|(2)]]
 
+
ld b,a
== Credits and Contributions ==
+
and 80h
* '''/dev/urandom:''' Because of your randomness, this project is possible.
+
jr z,TI83p_BE
 +
in a,(21h)
 +
and 3
 +
jr z,TI84p_BE
 +
bit 5,b
 +
jr z,TI83p_SE
 +
; calculator is an 84+ SE
 +
 +
TI84p_BE:
 +
; calculator is an 84+ BE
 +
 +
TI83p_SE:
 +
; calculator is an 83+ SE
 +
 +
TI83p_BE:
 +
; calculator is an 83+ BE

Revision as of 15:17, 29 March 2005

Synopsis

Port Number: 21h

Function: Hardware Type

This port is simply a protected register which is set by the boot code according to the hardware version.

Read Values

  • Bit 0: 1 on either the 83+ SE or the 84+ SE, 0 on the 84+ basic.
  • Bit 1: Unknown -- always set to zero
  • Bits 2-7 do not seem to do anything.

Write Values

  • [00h - FFh]: New value for the register

Comments

This port does not exist on the standard 83+. See port 2.

There is no reason to write to this port, but by reading from it you can determine something about the HW version.

TIOS polls both bits 0 and 1, by taking the logical AND with 3.

Example

	in a,(2)
	ld b,a
	and 80h
	jr z,TI83p_BE
	in a,(21h)
	and 3
	jr z,TI84p_BE
	bit 5,b
	jr z,TI83p_SE
	; calculator is an 84+ SE

TI84p_BE:
	; calculator is an 84+ BE

TI83p_SE:
	; calculator is an 83+ SE

TI83p_BE:
	; calculator is an 83+ BE