https://wikiti.brandonw.net/api.php?action=feedcontributions&user=Michael&feedformat=atomWikiTI - User contributions [en]2024-03-29T01:47:07ZUser contributionsMediaWiki 1.23.5https://wikiti.brandonw.net/index.php?title=83Plus:Software:usb8x/Asm_Interface/MSD/DOS_countFilesInDir83Plus:Software:usb8x/Asm Interface/MSD/DOS countFilesInDir2006-08-17T20:11:12Z<p>Michael: /* Notes */</p>
<hr />
<div>== Synopsis ==<br />
'''Name:''' DOS_countFilesInDir<br />
<br />
'''Minimum usb8x version:''' 0.10<br />
<br />
Gets number of files in specified directory.<br />
<br />
=== Inputs ===<br />
* HL points to an ASCIIZ string of the directory path<br />
<br />
=== Outputs ===<br />
* BC is number of entries<br />
* C set if problems<br />
<br />
=== Destroys ===<br />
* AF, BC, DE, HL<br />
<br />
== Notes ==<br />
If the root directory is checked, no further action is necessary. However, if you use this function on a subdirectory, it will count the "." and ".." directory entries as folders. These are pointers to the current and parent directory used by FAT16. To you, this simply means you need to subtract two when dealing with a subdirectory.<br />
Example code to count number of files/folders in the "test" directory, which is in the root directory:<br />
<code><br />
ld hl,sDirectory<br />
U_CALL DOS_countFilesInDir<br />
dec bc<br />
dec bc<br />
;BC contains number of files/directories<br />
...<br />
sDirectory: DB "/test",0<br />
</code><br />
If you are writing an application, you must copy the strings you use to RAM first, or else usb8x will not be able to see them.<br />
<br />
== See Also ==<br />
* [[../FAT_lookupPath|FAT_lookupPath]] - Find whether specified file/directory exists</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2083Plus:Ports:202006-05-07T05:44:20Z<p>Michael: /* Comments */</p>
<hr />
<div>[[Category:83Plus:Ports:By Address|20 - CPU Speed Port]] [[Category:83Plus:Ports:By Name|CPU Speed Port]]<br />
{{SE-Only Port|00}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 20h<br />
<br />
'''Function:''' CPU Speed Port<br />
<br />
This port controls the calculator's CPU speed. The CPU can be set to run at either 6MHz or 15MHz with this port.<br />
<br />
=== Read Values ===<br />
* 00h : The CPU is running at 6MHz.<br />
* 01h: The CPU is running at 15MHz.<br />
<br />
=== Write Values ===<br />
* 00h : Set the CPU to 6MHz.<br />
* 01h: Set the CPU to 15MHz.<br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:00|Port 00h]].<br />
<br />
This port can contain values of 2 and 3, but the difference in speed is negligible. Values 2 and 3 were intended for use with 20 MHz and 25 MHz speeds, but this functionality was left out before production began. Using the crystal timers I came to these approximate values.<br />
{| width="30%" border="1" cellspacing="1" bgcolor="white"<br />
| width="40%" | Port Contents<br />
| width="60%" | CPU Clock Speed<br />
|-<br />
| width="40%" | 00<br />
| width="60%" | ~6.089 mhz<br />
|-<br />
| width="40%" | 01<br />
| width="60%" | ~14.965 mhz<br />
|-<br />
| width="40%" | 02<br />
| width="60%" | ~14.980 mhz<br />
|-<br />
| width="40%" | 03<br />
| width="60%" | ~14.990 mhz<br />
|}<br />
I suggest still using 1 as the speed setting value since the total effect of the other values are not known. These modes are distinguished by LCD delaying hardware, ports 29-2C.<br />
<br />
== Example ==<br />
<nowiki> in a, (2)<br />
and 80h<br />
jp z, NoCPUGoverner<br />
rlca ;Move the 1 bit in bit 7 to bit 0 (80h -> 01h)<br />
out (20h), a<br />
NoCPUGoverner:</nowiki><br />
<br />
Michael Vincent documented another method to set the CPU speed (which is probably faster than my example).<br />
<nowiki>in a, (2)<br />
rla<br />
sbc a, a<br />
out (20h), a</nowiki><br />
<br />
The only side effect of this is that on the TI-83+ Basic this will cause both linkport lines to go high - which shouldn't matter too much if you're not using the linkport at that time, especially since both lines are high normally...<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation and his faster approach as found [http://michaelv.org/programs/calcs/ports/port20.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=Talk:83Plus:Ports:2CTalk:83Plus:Ports:2C2005-08-23T05:32:28Z<p>Michael: </p>
<hr />
<div>With regards to ports 2B and 2C, they really are intended I think for 20 and 25 MHz operation. Do we want to note this?<br />
<br />
You see, the SE was originally going to be 6/15/20/25 MHz. That is why port 20h will also accept 2 and 3 as values. TI dropped the faster speeds but the hardware is still somewhat in there.<br />
<br />
<br />
- Michael</div>Michaelhttps://wikiti.brandonw.net/index.php?title=Talk:83Plus:Ports:2CTalk:83Plus:Ports:2C2005-08-23T05:31:46Z<p>Michael: </p>
<hr />
<div>With regards to ports 2B and 2C, they really are intended I think for 20 and 25 MHz operation.<br />
<br />
You see, the SE was originally going to be 6/15/20/25 MHz. That is why port 20h will also accept 2 and 3 as values.</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B7883Plus:Hooks:9B782005-04-07T03:16:33Z<p>Michael: /* Using the Hook */</p>
<hr />
<div>[[Category:83Plus:Hooks:By Address|9B78 - Link Activity Hook]]<br />
[[Category:83Plus:Hooks:By Name|Link Activity Hook]]<br />
== Synopsis ==<br />
'''Name:''' Link Activity Hook<br />
<br />
'''Hook Pointer Block Address:''' [[83Plus:RAM:9B78|9B78]]<br />
<br />
'''Hook Enable BCALL:''' [[83Plus:BCALLs:4F84|4F84]]<br />
<br />
'''Hook Disable BCALL:''' [[83Plus:BCALLs:4F87|4F87]]<br />
<br />
'''Hook Call BCALL:''' [[83Plus:BCALLs:4F81|4F81]]<br />
<br />
'''Hook Active Flag:''' [[83Plus:Flags:33#Bit_4|4, (iy + 33h)]]<br />
<br />
'''Hook Override Flag:''' [[83Plus:Flags:33#Bit_3|3, (iy + 33h)]]<br />
<br />
This hook is called whenever link activity is detected by the OS's interrupt handler.<br />
<br />
== Using the Hook ==<br />
This hook is unique in the respect that there is an OS-managed override bit. If 3, (iy + 33h) is set, the hook will not be called. This bit is called upon entry to GetKey, and is restored to its original value upon exit (for the curious, iy + 33h is copied to bpSave). Consequently it is impossible (without using another hook to reset the flag during GetKey) to receive events during GetKey; this means this hook can't be triggered throughout most parts of the TI-OS.<br />
<br />
The hook is called whenever the interrupt detects link activity; that is, one of the two data lines has been pulled low. A contains the value the interrupt read from the link port, nothing more than the value from port 0 with the upper 6 bits masked out. All values / flags returned are ignored.</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B7C83Plus:Hooks:9B7C2005-04-07T03:14:40Z<p>Michael: /* Comments */</p>
<hr />
<div>[[Category:83Plus:Hooks:By Address|9B7C - Cursor Hook]] [[Category:83Plus:Hooks:By Name|Cursor Hook]]<br />
== Synopsis ==<br />
'''Name:''' Cursor Hook<br />
<br />
'''Hook Pointer Block Address:''' [[83Plus:RAM:9B7C|9B7C]]<br />
<br />
'''Hook Enable BCALL:''' [[83Plus:BCALLs:4F60|4F60]]<br />
<br />
'''Hook Disable BCALL:''' [[83Plus:BCALLs:4F69|4F69]]<br />
<br />
'''Hook Call BCALL:''' [[83Plus:BCALLs:4F57|4F57]]<br />
<br />
'''Hook Active Flag:''' [[83Plus:Flags:34#Bit_7|7, (iy + 34h)]]<br />
<br />
This hook is called when the edit cursor (the flashing block cursor) is shown or hidden.<br />
<br />
== Using the Hook ==<br />
There are three events that are passed for various events, identified when A = 22h, 23h, or 24h. I'm not aware of any event where A < 22h.<br />
<br />
* '''A = 22h:''' This is one of the two events that occur before the cursor will be displayed. Returning with the zero flag set will abort the display sequence, but returning with the zero flag reset will cause the sequence to continue. If you want to change the cursor, draw your own one here and return with the zero flag set.<br />
* '''A = 23h:''' I (JasonM) have no clue why this event exists! It is called after event 22h, but before the actual drawing occurs. It's only called if you returned with the zero flag reset for event 22h (basically, if you said you want the cursor to flash.) If you return with zero set, it cancels the flash, otherwise it will draw it's usual cursor. It would appear that the TI-OS just wants to confirm your decision from the first event!<br />
<br />
* '''A = 24h:''' This event is called when the cursor block is about to be replaced with the character underneath it. Returning with the zero flag set will cause this operation to be canceled (the cursor block will be left on the screen.) The character underneath the cursor is passed in B (it's simply a copy of [[83Plus:RAM:844E|curUnder]]), and you should return the character in A. If you want to, you can return any character you like: this will make it appear that the cursor is above a character other than it actually is (note: this doesn't actually edit the text in the edit buffer.) The TI-OS tends to cause redraw errors if you return a character other than in B, so it's probably a good idea to to just return B (make sure you do an "or a" to clear the zero flag, or the cursor won't disappear.)<br />
<br />
== Comments ==<br />
<br />
This hook is pretty useless (unless you're saving the manatees). Still, since it will be fired when the user enters most contexts (any context that starts in an edit buffer), it can serve as a useful hook if you want to fire in a particular context after the context is set up. It could also serve as a replacement for a custom interrupt under some situtations.<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Example of hook usage in [http://www.detachedsolutions.com/omnicalc Omnicalc]</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Hooks:9B7C83Plus:Hooks:9B7C2005-04-07T03:14:30Z<p>Michael: How dare you misspell "manatees!"</p>
<hr />
<div>[[Category:83Plus:Hooks:By Address|9B7C - Cursor Hook]] [[Category:83Plus:Hooks:By Name|Cursor Hook]]<br />
== Synopsis ==<br />
'''Name:''' Cursor Hook<br />
<br />
'''Hook Pointer Block Address:''' [[83Plus:RAM:9B7C|9B7C]]<br />
<br />
'''Hook Enable BCALL:''' [[83Plus:BCALLs:4F60|4F60]]<br />
<br />
'''Hook Disable BCALL:''' [[83Plus:BCALLs:4F69|4F69]]<br />
<br />
'''Hook Call BCALL:''' [[83Plus:BCALLs:4F57|4F57]]<br />
<br />
'''Hook Active Flag:''' [[83Plus:Flags:34#Bit_7|7, (iy + 34h)]]<br />
<br />
This hook is called when the edit cursor (the flashing block cursor) is shown or hidden.<br />
<br />
== Using the Hook ==<br />
There are three events that are passed for various events, identified when A = 22h, 23h, or 24h. I'm not aware of any event where A < 22h.<br />
<br />
* '''A = 22h:''' This is one of the two events that occur before the cursor will be displayed. Returning with the zero flag set will abort the display sequence, but returning with the zero flag reset will cause the sequence to continue. If you want to change the cursor, draw your own one here and return with the zero flag set.<br />
* '''A = 23h:''' I (JasonM) have no clue why this event exists! It is called after event 22h, but before the actual drawing occurs. It's only called if you returned with the zero flag reset for event 22h (basically, if you said you want the cursor to flash.) If you return with zero set, it cancels the flash, otherwise it will draw it's usual cursor. It would appear that the TI-OS just wants to confirm your decision from the first event!<br />
<br />
* '''A = 24h:''' This event is called when the cursor block is about to be replaced with the character underneath it. Returning with the zero flag set will cause this operation to be canceled (the cursor block will be left on the screen.) The character underneath the cursor is passed in B (it's simply a copy of [[83Plus:RAM:844E|curUnder]]), and you should return the character in A. If you want to, you can return any character you like: this will make it appear that the cursor is above a character other than it actually is (note: this doesn't actually edit the text in the edit buffer.) The TI-OS tends to cause redraw errors if you return a character other than in B, so it's probably a good idea to to just return B (make sure you do an "or a" to clear the zero flag, or the cursor won't disappear.)<br />
<br />
== Comments ==<br />
<br />
This hook is pretty useless (unless your saving the manatees). Still, since it will be fired when the user enters most contexts (any context that starts in an edit buffer), it can serve as a useful hook if you want to fire in a particular context after the context is set up. It could also serve as a replacement for a custom interrupt under some situtations.<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Example of hook usage in [http://www.detachedsolutions.com/omnicalc Omnicalc]</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2E83Plus:Ports:2E2005-04-05T14:28:10Z<p>Michael: /* Example */</p>
<hr />
<div>[[Category:83Plus:Ports:By Address|2E - CPU Speed Adjustment]] [[Category:83Plus:Ports:By Name|CPU Speed Adjustment]]<br />
{{SE-Only Port|0E}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 2Eh<br />
<br />
'''Function:''' CPU Speed Adjustment<br />
<br />
This port for reasons unknown has a slight effect on the CPU speed. It works in both the 6 MHz and 15 MHz modes. Every bit on the port affects the speed, but only bits 5 and 4 have any significant effects. The default value for this port is 45h on the TI-84 Plus Silver Edition and 45h on the TI-83 Plus Silver Edition.<br />
<br />
=== Read Values (bits 5-4)===<br />
* 00: The CPU is running at normal speed (100%)<br />
* 01: The CPU is running at ~82% of normal speed<br />
* 10: The CPU is running at ~99% of normal speed<br />
* 11: The CPU is running at ~81% of normal speed<br />
<br />
<br />
=== Write Values (bits 5 and 4)===<br />
* 00: Set the CPU to run at 100% of normal speed<br />
* 01: Set the CPU to run at ~82% of normal speed<br />
* 10: Set the CPU to run at ~99% of normal speed<br />
* 11: Set the CPU to run at ~81% of normal speed<br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:0E|Port 0Eh]].<br />
<br />
== Example ==<br />
<nowiki><br />
ld a,74h ;Set the CPU to ~12.09 MHz/~4.8 MHz<br />
out (2Eh),a<br />
</nowiki><br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation found [http://michaelv.org/programs/calcs/ports/port2e.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2983Plus:Ports:292005-04-05T03:15:43Z<p>Michael: /* Values */</p>
<hr />
<div>[[Category:83Plus:Ports:By Address|29 - LCD Speed (6 MHz)]] [[Category:83Plus:Ports:By Name|LCD Speed (6 MHz)]]<br />
{{SE-Only Port|09}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 29h<br />
<br />
'''Function:''' LCD Speed (6 MHz)<br />
<br />
This port controls the calculator's LCD speed when it is running at 6 MHz. It is complicated and the lower four bits have not been thoroughly investigated but should be 7h on the TI-83/84 Plus Silver Edition at all times.<br />
<br />
=== Values ===<br />
<br />
Setting bits 4-7 on this port has the effect of shortening the required LCD delay. Bits 7-5 control the removed delay in powers of 2 (i.e. setting bit 7 removes 1/2 of the original delay, setting bit 6 removes 1/4, and bit 5 1/8). Bit 4 is related to bits 7-5 by a factor of 3/26. If the entire upper nibble of port 29h is zero, the LCD will not update.<br />
<br />
The formula below calculates the amount of delay removed by setting bits 7-4 (the lower nibble of the port should always be 7). b7, b6, b5, b4 are either 0 or 1 and represent the value of their corresponding bit.<br />
<br />
Percentage of delay removed [0-1] = (b7/2) + (b6/4) + (b5/8) + (3/26)(b7)(b4) + (3/52)(b6)(b4) + (3/104)(b5)(b4).<br />
<br />
Note however if port 29h is set to 27h, then the % of delay removed is actually (1/8) - (3/104).<br />
<br />
For a simple table of common values:<br />
<br />
<nowiki>Value Relative speed (100% is normal, 200% would mean the LCD is twice as fast)<br />
17 100%<br />
27 110%<br />
47 133%<br />
67 160%<br />
87 200%<br />
A7 267%<br />
C7 400%<br />
E7 1300%<br />
F7 1600%</nowiki><br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:09|Port 09h]].<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation as found [http://michaelv.org/programs/calcs/ports/port29.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2983Plus:Ports:292005-04-05T03:15:36Z<p>Michael: /* Values */</p>
<hr />
<div>[[Category:83Plus:Ports:By Address|29 - LCD Speed (6 MHz)]] [[Category:83Plus:Ports:By Name|LCD Speed (6 MHz)]]<br />
{{SE-Only Port|09}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 29h<br />
<br />
'''Function:''' LCD Speed (6 MHz)<br />
<br />
This port controls the calculator's LCD speed when it is running at 6 MHz. It is complicated and the lower four bits have not been thoroughly investigated but should be 7h on the TI-83/84 Plus Silver Edition at all times.<br />
<br />
=== Values ===<br />
<br />
Setting bits 4-7 on this port has the effect of shortening the required LCD delay. Bits 7-5 control the removed delay in powers of 2 (i.e. setting bit 7 removes 1/2 of the original delay, setting bit 6 removes 1/4, and bit 5 1/8). Bit 4 is related to bits 7-5 by a factor of 3/26. If the entire upper nibble of port 29h is zero, the LCD will not update.<br />
<br />
The formula below calculates the amount of delay removed by setting bits 7-4 (the lower nibble of the port should always be 7). b7, b6, b5, b4 are either 0 or 1 and represent the value of their corresponding bit.<br />
<br />
Percentage of delay removed [0-1] = (b7/2) + (b6/4) + (b5/8) + (3/26)(b7)(b4) + (3/52)(b6)(b4) + (3/104)(b5)(b4).<br />
<br />
Note however if port 29h is set to 27h, then the % of delay removed is actually (1/8) - (3/104).<br />
<br />
For a simple table of common values:<br />
<br />
<nowiki>Value Relative speed (100% is normal, 200% would mean the LCD is twice as fast)<br />
17 100%<br />
27 110%<br />
47 133%<br />
67 160%<br />
87 200%<br />
A7 267%<br />
C7 400%<br />
E7 1300%<br />
F7 1600%</nowiki><br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:09|Port 09h]].<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation as found [http://michaelv.org/programs/calcs/ports/port29.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2983Plus:Ports:292005-04-05T03:15:26Z<p>Michael: /* Values */</p>
<hr />
<div>[[Category:83Plus:Ports:By Address|29 - LCD Speed (6 MHz)]] [[Category:83Plus:Ports:By Name|LCD Speed (6 MHz)]]<br />
{{SE-Only Port|09}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 29h<br />
<br />
'''Function:''' LCD Speed (6 MHz)<br />
<br />
This port controls the calculator's LCD speed when it is running at 6 MHz. It is complicated and the lower four bits have not been thoroughly investigated but should be 7h on the TI-83/84 Plus Silver Edition at all times.<br />
<br />
=== Values ===<br />
<br />
Setting bits 4-7 on this port has the effect of shortening the required LCD delay. Bits 7-5 control the removed delay in powers of 2 (i.e. setting bit 7 removes 1/2 of the original delay, setting bit 6 removes 1/4, and bit 5 1/8). Bit 4 is related to bits 7-5 by a factor of 3/26. If the entire upper nibble of port 29h is zero, the LCD will not update.<br />
<br />
The formula below calculates the amount of delay removed by setting bits 7-4 (the lower nibble of the port should always be 7). b7, b6, b5, b4 are either 0 or 1 and represent the value of their corresponding bit.<br />
<br />
Percentage of delay removed [0-1] = (b7/2) + (b6/4) + (b5/8) + (3/26)(b7)(b4) + (3/52)(b6)(b4) + (3/104)(b5)(b4).<br />
<br />
Note however if port 29h is set to 27h, then the % of delay removed is actually (1/8) - (3/104).<br />
<br />
For a simple table of common values:<br />
<br />
<nowiki>Value Relative speed (100% is normal, 200% would mean the LCD is twice as fast)<br />
17 100%<br />
27 110%<br />
47 133%<br />
67 160%<br />
87 200%<br />
A7 267%<br />
C7 400%<br />
E7 1300%<br />
F7 1600%</nowiki><br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:09|Port 09h]].<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation as found [http://michaelv.org/programs/calcs/ports/port29.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2983Plus:Ports:292005-04-05T03:15:14Z<p>Michael: /* Values */</p>
<hr />
<div>[[Category:83Plus:Ports:By Address|29 - LCD Speed (6 MHz)]] [[Category:83Plus:Ports:By Name|LCD Speed (6 MHz)]]<br />
{{SE-Only Port|09}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 29h<br />
<br />
'''Function:''' LCD Speed (6 MHz)<br />
<br />
This port controls the calculator's LCD speed when it is running at 6 MHz. It is complicated and the lower four bits have not been thoroughly investigated but should be 7h on the TI-83/84 Plus Silver Edition at all times.<br />
<br />
=== Values ===<br />
<br />
Setting bits 4-7 on this port has the effect of shortening the required LCD delay. Bits 7-5 control the removed delay in powers of 2 (i.e. setting bit 7 removes 1/2 of the original delay, setting bit 6 removes 1/4, and bit 5 1/8). Bit 4 is related to bits 7-5 by a factor of 3/26. If the entire upper nibble of port 29h is zero, the LCD will not update.<br />
<br />
The formula below calculates the amount of delay removed by setting bits 7-4 (the lower nibble of the port should always be 7). b7, b6, b5, b4 are either 0 or 1 and represent the value of their corresponding bit.<br />
<br />
Percentage of delay removed [0-1] = (b7/2) + (b6/4) + (b5/8) + (3/26)(b7)(b4) + (3/52)(b6)(b4) + (3/104)(b5)(b4).<br />
<br />
Note however if port 29h is set to 27h, then the % of delay removed is actually (1/8) - (3/104).<br />
<br />
For a simple table of common values:<br />
<br />
<nowiki>Value Relative speed (100% is normal, 200% would mean the LCD is twice as fast)<br />
17 100%<br />
27 110%<br />
47 133%<br />
67 160%<br />
87 200%<br />
A7 267%<br />
C7 400%<br />
E7 1300%<br />
F7 1600%</nowiki><br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:09|Port 09h]].<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation as found [http://michaelv.org/programs/calcs/ports/port29.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2983Plus:Ports:292005-04-05T03:13:32Z<p>Michael: </p>
<hr />
<div>[[Category:83Plus:Ports:By Address|29 - LCD Speed (6 MHz)]] [[Category:83Plus:Ports:By Name|LCD Speed (6 MHz)]]<br />
{{SE-Only Port|09}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 29h<br />
<br />
'''Function:''' LCD Speed (6 MHz)<br />
<br />
This port controls the calculator's LCD speed when it is running at 6 MHz. It is complicated and the lower four bits have not been thoroughly investigated but should be 7h on the TI-83/84 Plus Silver Edition at all times.<br />
<br />
=== Values ===<br />
<br />
Setting bits 4-7 on this port has the effect of shortening the required LCD delay. Bits 7-5 control the removed delay in powers of 2 (i.e. setting bit 7 removes 1/2 of the original delay, setting bit 6 removes 1/4, and bit 5 1/8). Bit 4 is related to bits 7-5 by a factor of 3/26. If the entire upper nibble of port 29h is zero, the LCD will not update.<br />
<br />
The formula below calculates the amount of delay removed by setting bits 7-4 (the lower nibble of the port should always be 7). b7, b6, b5, b4 are either 0 or 1 and represent the value of their corresponding bit.<br />
<br />
Percentage of delay removed [0-1] = (b7/2) + (b6/4) + (b5/8) + (3/26)(b7)(b4) + (3/52)(b6)(b4) + (3/104)(b5)(b4).<br />
<br />
Note however if port 29h is set to 27h, then the % of delay removed is actually (1/8) - (3/104).<br />
<br />
For a simple table of common values:<br />
<br />
<nowiki><br />
Value Relative speed (100% is normal, 200% would mean the LCD is twice as fast)<br />
17 100%<br />
27 110%<br />
47 133%<br />
67 160%<br />
87 200%<br />
A7 267%<br />
C7 400%<br />
E7 1300%<br />
F7 1600%<br />
</nowiki><br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:09|Port 09h]].<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation as found [http://michaelv.org/programs/calcs/ports/port29.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=Category:83Plus:Ports:By_NameCategory:83Plus:Ports:By Name2005-04-05T02:31:37Z<p>Michael: </p>
<hr />
<div>[[Category:83Plus:Ports|Ports by Name]]<br />
<br />
See also [[:Category:83Plus:Ports:By Address|list of ports by address/number]].<br />
<br />
Please read our page on [[Contributing]] before editing these pages!</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2E83Plus:Ports:2E2005-04-05T02:31:15Z<p>Michael: </p>
<hr />
<div>[[Category:83Plus:Ports:By Address|2E - CPU Speed Adjustment]] [[Category:83Plus:Ports:By Name|CPU Speed Adjustment]]<br />
{{SE-Only Port|0E}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 2Eh<br />
<br />
'''Function:''' CPU Speed Adjustment<br />
<br />
This port for reasons unknown has a slight effect on the CPU speed. It works in both the 6 MHz and 15 MHz modes. Every bit on the port affects the speed, but only bits 5 and 4 have any significant effects. The default value for this port is 45h on the TI-84 Plus Silver Edition and 45h on the TI-83 Plus Silver Edition.<br />
<br />
=== Read Values (bits 5-4)===<br />
* 00: The CPU is running at normal speed (100%)<br />
* 01: The CPU is running at ~82% of normal speed<br />
* 10: The CPU is running at ~99% of normal speed<br />
* 11: The CPU is running at ~81% of normal speed<br />
<br />
<br />
=== Write Values (bits 5 and 4)===<br />
* 00: Set the CPU to run at 100% of normal speed<br />
* 01: Set the CPU to run at ~82% of normal speed<br />
* 10: Set the CPU to run at ~99% of normal speed<br />
* 11: Set the CPU to run at ~81% of normal speed<br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:0E|Port 0Eh]].<br />
<br />
== Example ==<br />
<nowiki><br />
ld a,74h ;Set the CPU to ~12.09 MHz/~4.8 MHz<br />
out (2Eh),a<br />
</nowiki><br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation found [http://michaelv.org/programs/calcs/ports/port2e.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:2083Plus:Ports:202005-04-05T02:27:00Z<p>Michael: /* Read Values */</p>
<hr />
<div>[[Category:83Plus:Ports:By Address|20 - CPU Speed Port]] [[Category:83Plus:Ports:By Name|CPU Speed Port]]<br />
{{SE-Only Port|00}}<br />
<br />
== Synopsis ==<br />
'''Port Number:''' 20h<br />
<br />
'''Function:''' CPU Speed Port<br />
<br />
This port controls the calculator's CPU speed. The CPU can be set to run at either 6MHz or 15MHz with this port.<br />
<br />
=== Read Values ===<br />
* 00h : The CPU is running at 6MHz.<br />
* 01h: The CPU is running at 15MHz.<br />
<br />
=== Write Values ===<br />
* 00h : Set the CPU to 6MHz.<br />
* 01h: Set the CPU to 15MHz.<br />
<br />
== Comments ==<br />
This port is not available on the normal TI-83+. On the normal TI-83+ this port is a shadow of [[83Plus:Ports:00|Port 00h]].<br />
<br />
== Example ==<br />
<nowiki> in a, (2)<br />
and 80h<br />
jp z, NoCPUGoverner<br />
rlca ;Move the 1 bit in bit 7 to bit 0 (80h -> 01h)<br />
out (20h), a<br />
NoCPUGoverner:</nowiki><br />
<br />
Michael Vincent documented another method to set the CPU speed (which is probably faster than my example).<br />
<nowiki>in a, (2)<br />
rla<br />
sbc a, a<br />
out (20h), a</nowiki><br />
<br />
The only side effect of this is that on the TI-83+ Basic this will cause both linkport lines to go high - which shouldn't matter too much if you're not using the linkport at that time, especailly since both lines are high normally...<br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' Documentation and his faster approach as found [http://michaelv.org/programs/calcs/ports/port20.html here].</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:BCALLs:4C5183Plus:BCALLs:4C512005-03-30T13:18:46Z<p>Michael: /* Credits and Contributions */</p>
<hr />
<div>[[Category:83Plus:BCALLs:By Name:Other|ExecuteApp]] [[Category:83Plus:BCALLs:By Name|ExecuteApp]] [[Category:83Plus:BCALLs:By Address|4C51 - ExecuteApp]]<br />
== Synopsis ==<br />
'''Official Name:''' ExecuteApp<br />
<br />
'''BCALL Address:''' 4C51<br />
<br />
Executes a flash application.<br />
<br />
=== Inputs ===<br />
* [[83Plus:RAM:84BF|progToEdit]]: Name of the application to start.<br />
<br />
=== Outputs ===<br />
None<br />
<br />
=== Destroys ===<br />
All<br />
<br />
== Comments ==<br />
This B_CALL never returns to the caller, when you exit the application it will return to the homescreen like it normally does.<br />
<br />
== Example ==<br />
<nowiki>ld hl, Appname<br />
ld de,progToEdit<br />
ld bc,8<br />
ldir<br />
B_CALL ExecuteApp<br />
Appname: db "Calcsys "</nowiki><br />
<br />
== Credits and Contributions ==<br />
* '''Michael Vincent:''' For documenting this B_CALL.</div>Michaelhttps://wikiti.brandonw.net/index.php?title=User:MichaelUser:Michael2005-03-27T07:00:29Z<p>Michael: </p>
<hr />
<div>moo!</div>Michaelhttps://wikiti.brandonw.net/index.php?title=83Plus:Ports:0183Plus:Ports:012005-03-27T05:28:21Z<p>Michael: /* Comments */</p>
<hr />
<div>== Synopsis ==<br />
'''Port Number:''' 01h<br />
<br />
'''Function:''' Keyboard Port<br />
<br />
This port controls the on-calc keypad. The keypad is divided into a series of groups.<br />
<br />
=== Read Values ===<br />
* Bits are set according whether corresponding keys from selected groups are pressed. Groups are selected through writing to the port. A pressed key reads a 0 bit. An unpressed key reads a 1 bit. The port reads FF after a reset (write FF).<br />
<br />
=== Write Values ===<br />
* $FF : Reset the keypad. This unselects all groups and resets the keypad state.<br />
* Anything else : Any 0 bit adds the corresponding group to the list of monitored groups. When a key in a monitored group is pressed, the corresponding key bit reads 1.<br />
<br />
== Comments ==<br />
The key map is laid out as follows:<br />
<br />
<nowiki> Group Bit -> 0 1 2 3 4 5 6 7<br />
Group Mask -> FE FD FB F7 EF DF BF 7F<br />
Key Bit (Mask)<br />
0 (FE) | DOWN|ENTER| (-) | . | 0 | |GRAPH| |<br />
1 (FD) | LEFT| + | 3 | 2 | 1 | STO |TRACE| |<br />
2 (FB) |RIGHT| - | 6 | 5 | 4 | LN |ZOOM | |<br />
3 (F7) | UP | * | 9 | 8 | 7 | LOG |WIND | |<br />
4 (EF) | | / | ) | ( | , | x^2 | Y= | |<br />
5 (DF) | | ^ | TAN | COS | SIN |x^-1 | 2nd | |<br />
6 (BF) | |CLEAR|VARS |PRGM |APPS |MATH |MODE | |<br />
7 (7F) | | | |STAT |X,T..|ALPHA| DEL | |</nowiki><br />
<br />
NOTE: Group FB Key FE is NEGATE, not to be confused with SUBTRACT.<br />
NOTE: Group DF Key FE could be ON, but the ON key is tested elsewhere (a "special case" key - after all, it is the ON key).<br />
<br />
== Example ==<br />
<nowiki>ld a, 0FFh ;Reset the keypad.<br />
out (1), a<br />
ld a, 0FEh ;Select group 0.<br />
out (1), a<br />
in a, (1) ;Test for keys.<br />
and 0FDh ;Test for Left Arrow key by making A 0 if left was pressed.<br />
call z, LeftArrowPressed ;If 0 then left was pressed.<br />
ld a, 0FFh ;Reset the keypad.<br />
out (1), a</nowiki></div>Michael