Author Topic: Asm for the TI84+  (Read 16055 times)

0 Members and 1 Guest are viewing this topic.

Offline DarkLechuga

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Asm for the TI84+
« on: January 31, 2012, 07:31:19 pm »
I have a TI84+, and want to learn how to program games for it in Asm. So far i haven't been able to find a tutorial for Asm programming for TI84+, so i've been using a cpl different tutorials for the 83+. Everything i've read says programs for the 83+ should run just fine on the 84+, but i've been having some minor difficulties. All i've done so far is make a few extremely simple programs clear the screen, move to a new line, display the "Done" message, and display text. When i run these programs thru the TI Flash Debugger for 83+, they run the way i intend, but when i send them to my calc and run them, they act funny. A program made to produce a few lines of text followed by a blank line runs fine on the debugger, but when on the actual calc, the text displays but then the "Done" message appears on top of (and obscuring) the text on the top right of the screen, and the cursor ends up over the text on the left hand side of the second row. It seems that on the 83+, when a program finishes, the cursor stays where the program left it, but on the 84+ it automatically reverts to left hand second row. Any ways to fix this??? Anything else i should know that differs between 83+ asm and 84+???

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: Asm for the TI84+
« Reply #1 on: January 31, 2012, 07:34:20 pm »
maybe fiddle with CurCol and CurRow?
Sig wipe!

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: Asm for the TI84+
« Reply #2 on: January 31, 2012, 07:53:43 pm »
Hi and welcome, DarkLechuga. TI-84 Plus assembly should be identical in most ways, and since you're asking about text on the home screen, I'll point you to this lesson in the 28 Days tutorial. Good luck!
« Last Edit: January 31, 2012, 07:54:03 pm by Deep Thought »




Offline Juju

  • Incredibly sexy mare
  • Coder Of Tomorrow
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 5730
  • Rating: +500/-19
  • Weird programmer
    • View Profile
    • juju2143's shed
Re: Asm for the TI84+
« Reply #3 on: January 31, 2012, 08:36:33 pm »
Yeah, the TI-84+ is backwards compatible with the 83+, the only thing that differs is that the 84+ has additional BCALLs for the additional hardware, the rest should be the same as the 83+. And the .org value too, if I'm right?

Remember the day the walrus started to fly...

I finally cleared my sig after 4 years you're happy now?
THEGAME
This signature is ridiculously large you've been warned.

The cute mare that used to be in my avatar is Yuki Kagayaki, you can follow her on Facebook and Tumblr.

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Asm for the TI84+
« Reply #4 on: January 31, 2012, 08:38:16 pm »
Yeah, the TI-84+ is backwards compatible with the 83+, the only thing that differs is that the 84+ has additional BCALLs for the additional hardware, the rest should be the same as the 83+. And the .org value too, if I'm right?

na teh .org value is the same. the only differance is the bcalls for the hardware and the ability to use 15mhz speed instead of 6

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Asm for the TI84+
« Reply #5 on: January 31, 2012, 08:43:32 pm »
Also on the 84+, there is extra RAM too (hidden from the user). It's 16 KB of extra space on models from April 2007 and later and 80 KB for 2004-March 2007 models. I don't recommend using the extra RAM, the crystal timers nor the clock, though, if you plan to reach a larger audience of TI-83 Plus owners, unless your game is just too much for the 6 MHz models and you only plan a TI-84 Plus release.

Welcome here by the way. Good luck with ASM programming. :)

Offline DarkLechuga

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Re: Asm for the TI84+
« Reply #6 on: January 31, 2012, 08:57:44 pm »
I've fiddled with Currow and Curcol some, it still resets to the aforementioned cursor position when the program finishes. I seriously hope i'm not the only one with this problem... Read thru the 28 days tutorial page Deep Thought linked, i'm actually using both 28 days alongside another tutorial (i believe by someone named jeff chai) to learn. Thanks for the warm welcome everyone!

Offline Geekboy1011

  • The Oneironaut
  • Donator
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2031
  • Rating: +119/-2
  • Dream that Awakening dream
    • View Profile
Re: Asm for the TI84+
« Reply #7 on: January 31, 2012, 09:01:23 pm »
mind pasting your source code? i can take a look and try to help ^^

Offline DarkLechuga

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Re: Asm for the TI84+
« Reply #8 on: January 31, 2012, 09:24:45 pm »
Here it is:

.nolist
   #include "ti83plus.inc"
.list

.org $9D93
.db t2ByteTok, tAsmCmp
   b_call(_ClrLCDFull)
   ld hl,0
   ld (CURCOL),hl
   ld hl,0
   ld (CURROW),hl
   ld hl,txtMsg
   b_call(_PutS)
   b_call(_NewLine)
   ret
txtMsg:
   .db "Displaying text "
   .db "on the home page"
   .db "using a new call"
   .db "that may or may "
   .db "not work.       ",0
.end
.end

This program displayed fine on the debugger with the "Done" and cursor below all the text when the program finished, but on my 84+ the "Done" and cursor were on the first and second rows on top of my text.
Any advice is welcome here (although preferably pertaining to the original question), i'm thoroughly new to Asm and need all the help i can get. Thanks again!

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Asm for the TI84+
« Reply #9 on: January 31, 2012, 09:28:35 pm »
I think the "Done" covering the text is the normal behavior and that the emulator you are using is incorrect.  Regardless, I would add a res 5,(iy+0) to the beginning of the program which tells the OS to not display "Done" at the end.  Also, I recommend WabbitEmu instead as it has more features and emulates more accurately.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline ralphdspam

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 841
  • Rating: +38/-1
  • My name is actually Matt.
    • View Profile
Re: Asm for the TI84+
« Reply #10 on: January 31, 2012, 10:06:17 pm »
I think the "Done" covering the text is the normal behavior and that the emulator you are using is incorrect.  Regardless, I would add a res 5,(iy+0) to the beginning of the program which tells the OS to not display "Done" at the end.  Also, I recommend WabbitEmu instead as it has more features and emulates more accurately.
Also on the topic of text display, some BCALLs, like DispHL, do not work in mathprint mode.
ld a, 0
ld a, a

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Asm for the TI84+
« Reply #11 on: February 01, 2012, 07:38:40 am »
Be careful using HL to store one byte into an address, when you're storing HL into CURCOL, you're also updating CUROFFSET. Check out ti83plus.inc:
Quote from: ti83plus.inc
curRow               EQU  844Bh
curCol                EQU  844Ch
curOffset            EQU  844Dh
As HL is a 2-byte register, you load the value of L into CURCOL ($844C) and the value of H into CURCOL+1 ($844D aka CUROFFSET). You could use the accumulator (A) instead, or just load HL into CURROW to update both CURROW and CURCOL.
« Last Edit: February 01, 2012, 07:39:02 am by chickendude »

Offline DarkLechuga

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Re: Asm for the TI84+
« Reply #12 on: February 01, 2012, 08:40:18 am »
Quigibo: My little brother has an 83+, i put the program on it and ran it and it worked okay, with the cursor below all the text. It seems the 84+ automatically resets the cursor while the 83+ just picks it up where the program left it (which is what i want). Any way to make it not reset the cursor? Also, when you say "the beginning of the program" where exactly do you mean?

Chickendude: Thanks for the tip, I'm still getting the hang of registers. What does CUROFFSET do? Also, what exactly does HomeUp do?
« Last Edit: February 01, 2012, 08:41:03 am by DarkLechuga »

Offline chickendude

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 817
  • Rating: +90/-1
  • Pro-Riot Squad
    • View Profile
Re: Asm for the TI84+
« Reply #13 on: February 01, 2012, 02:09:47 pm »
To be honest, i have no idea what curOffset is, it may have something to do with text input but i'm not sure. _HomeUp should set curRow/curCol to 0 ( ld hl,0 / ld (curRow),hl ). A common "trick" is to pause the program (_getKey) before ending. Apart from that, you can try changing curRow/curCol before exiting, it might just be a change in your OS version (what version OS do you use?). Maybe you could try getting a ROM from your calc and see if it still displays differently? And the TI Flash debugger pretty much sucks, it's slow and not very accurate. Try WabbitEmu/TiEmu, both have nice debuggers and are much more accurate.

Offline DarkLechuga

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Re: Asm for the TI84+
« Reply #14 on: February 01, 2012, 04:58:41 pm »
My 84+ has v2.53MP. Downloaded WabbitEmu, i'll take it for a spin tonight if i have the time. And what exactly do you mean, get a ROM from my calc, and how do i do that? Sorry if that's a stupid question :|