* WalrusIRC

You need to have 5 posts and not be part of restricted usergroups in order to use the WalrusIRC embedded shoutbox. However, you can also access our IRC channel called #CodeWalrus via EFnet.

Author Topic: Making a Modern TI-82 Include  (Read 1093 times)

0 Members and 1 Guest are viewing this topic.

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
Making a Modern TI-82 Include
« on: December 15, 2015, 02:10:53 am »
In pursuit of bettering what is already TI's greatest invention since the integrated circuit, I'm writing a new ti82.inc based on TI's ti83asm.inc and BrandonW's ti83.inc, targeting the SNG shell. SNG only has 30 ROM calls documented in its standard include file sng10.inc, and was the most complete one until now. So far, I have identified 138 ROM calls, using a Python script that follows call tables to compare the code of the routines mentioned in ti83.inc to the call table at the end of the TI-82's ROM page 0. It does not find calls that are on page 0; I need to do this manually, so those will take longer to identify.

RAM equates were fairly straightforward, except for the StatVars saferam area. Because the statistics implementation for the TI-82 is not nearly as advanced as the TI-83's, there will be significantly less saferam available there (279 bytes at most, compared to 531). Finding IY flag equivalents should not be terribly hard if I can find ROM calls common to both models that use a particular flag.

The latest version of the include file can be found here. Addresses here are for ROMs 15.0 and 16.0.

There are some necessary changes to ROM_CALL() that need to be made to support all of these calls. With the TI-83, TI introduced indirect calling, allowing the user to access some lesser-used functions outside of page 0. However, as user assembly wasn't implemented in the TI-82, there is no directly way to access these calls from page 0. Instead, you have to ROM_CALL(___bank_call) \ .dw addr \ .db page. You'll notice that this requires looking ahead three bytes, and ___bank_call (in ROM 16.0, at $2E46) does this by looking at the stack. This isn't compatible with the existing ROM_CALL() routines. For reasons of efficiency I will probably use a separate BANK_CALL() macro for this. Furthermore, to achieve compatibility with ROMs before 15.0, the ROM_CALL() routine needs to be updated with the new values for each of those ROM versions and take account for the missing values in the call table. Since all of this will happen within the shell, this is less important.

PROGRESS:
  • ☑ Find names for page 0 call table functions
  • ☑ Find TI-82 calls not on TI-83 page $0C
  • ☑ Find RAM equates*
  • ☐ Find IY flag equates
  • ☐ Add in key code equates
  • ☐ Test the ROM calls, RAM equates (I need people to test the uncertain ROM calls)
  • ☐ Find address corrections for ROMs before 15.0
*RAM equates may be of different size

I'm not responsible for any RAM clears or property damage (probably through user rage) that results from using this experimental include file.


  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Offline alexgt

  • Just your friendly neighborhood Ninja Stach Fancy Iron Man
  • Super User
  • Join Date: Dec 2014
  • Location: Behind you
  • Posts: 2611
  • Post Rating Ratio: +6/-1
  • Something should go here...
    • /u/alexgt9123
  • Gender: Male
Re: Making a Modern TI-82 Include
« Reply #1 on: December 15, 2015, 03:43:33 am »
Most of that when over my head but from what I understood it sounds pretty cool :)
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Offline xlibman

  • Omni founder & CW co-founder
  • CodeWalrus Staff
  • Super User
  • Original 5
  • CodeWalrus Supporter
  • *
  • Join Date: Nov 2014
  • Location: Quebec, Canada
  • Posts: 18420
  • Post Rating Ratio: +93/-4
    • dj_omnimaga
    • DJOmnimaga.music
    • @DJOmnimaga
    • dj_omnimaga
    • @DJOmnimaga
    • /u/DJ_Omnimaga
    • DJOmnimaga
    • 112/11286
    • @djomnimaga
    • @DJOmnimaga
    • DJ Omnimaga music store
  • Gender: Male
Re: Making a Modern TI-82 Include
« Reply #2 on: December 22, 2015, 05:13:21 pm »
That is cool @CVSoft. I wonder if that could be handy for making new games for multiple platforms that imclude the TI-82? I wish that calc was documented like this earlier.
  • Calculators owned: TI-57, 73, TI-80 (broken), TI-81, TI-82, TI-83, TI-83+ (broken), TI-83+ (broken), TI-83+SE (broken), TI-84+, TI-84+CSE, TI-84+CE, TI-85, TI-86, TI-89T, TI-92, TI-Nspire, TI-Nspire CX (semi-broken), HP 39gII, HP Prime, Casio fx-7000G, fx-7400G+, fx-7700GE, fx-9750G+, fx-9750GII, fx-9860G, cfx-9850G, FX-1.0+, fx-CG10, fx-CP400
  • Consoles, mobile devices and vintage computers owned: Samsung i5510, Nexus 5, Atari 2600, Lynx, SMS, Game Gear, Genesis, Dreamcast, NES, SNES, N64, GCN, Wii, Wii U, GBA, DS, 3DS, PS2, PS3, PS4, PSP, PSVita, XBox 360, XBOne

Bandcamp|Reverbnation|Facebook|Youtube|Twitter
Retired Omnimaga admin (2001-11) and editor (2012-14)

Offline Max Leiter

  • Full User
  • Join Date: Oct 2015
  • Location: California
  • Posts: 85
  • Post Rating Ratio: +0/-0
Re: Making a Modern TI-82 Include
« Reply #3 on: December 23, 2015, 04:24:26 am »
Very cool you're doing this, like DJ said. Is the script opensource/available online somewhere? I'm curious as to how it works

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
Re: Making a Modern TI-82 Include
« Reply #4 on: December 26, 2015, 07:13:30 am »
@DJ Omnimaga yeah, it'll make porting things over significantly easier. It will make it possible to port over a lot of things to the TI-82 from the TI-83, but not everything can because of different saferam and missing calls.

@Max Leiter I'll release it when it's done -- I don't think it's ready for exposure as I still need to finish the methods it uses to map out calls. The tools will probably be GPLv2 licensed but the include file produced will only require attribution within the include itself.
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

Offline utz

  • Full User
  • Join Date: Jun 2015
  • Location: Absurdistan
  • Posts: 145
  • Post Rating Ratio: +11/-0
  • 01000101110
    • utz82
    • utz's hp
  • WalriiPoints: 50
Re: Making a Modern TI-82 Include
« Reply #5 on: January 09, 2016, 03:58:17 pm »
@CVSoft Thanks a lot for this excellent work! I'm sure this will come in handy for my projects at some point.
Do you have any plans to add addresses for ROM versions 17.0-19.0?
  • Calculators owned: TI-82, TI-83, TI-83+, TI-85, TI-86, TI-92+, Sharp PC-1403

Offline CVSoft

  • Full User
  • Safe-haven access
  • Join Date: May 2015
  • Location:
  • Posts: 100
  • Post Rating Ratio: +5/-0
    • calcvids
    • 100007522540514
    • @CVSoft_
    • notipa
    • @UCj2udNPPnu58d4EgWs6gjhA
    • /u/notipa
    • 10819
    • BosaikNet
  • Gender: Male
Re: Making a Modern TI-82 Include
« Reply #6 on: January 09, 2016, 07:57:32 pm »
For the sake of compatibility, ROM_CALL() and BANK_CALL() will take care of adjusting addresses to the correct values.
  • Calculators owned: TI-73, TI-81, TI-81, TI-81, TI-81, TI-81, TI-81, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-82, TI-83, TI-83, TI-83 Plus, TI-84 Plus, TI-85, TI-86, TI-89 Titanium

 


You can also use the following HTML or bulletin board code to share it on your page or forum signature!


Also do not forget to check our affiliates below.
Planet Casio TI-Planet Calc.news BroniesQC BosaikNet Velocity Games