Author Topic: TI84+ RFID help.  (Read 4785 times)

0 Members and 1 Guest are viewing this topic.

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
TI84+ RFID help.
« on: September 05, 2010, 08:37:24 pm »
Ok, was wondering why this code would run once then be "invalid" the next time I ran it. I got my calc hooked up to an RFID reader and Im trying to get the thing to work. It turns the thing on and will get some data but its always the same data. I still need to synchronize the speed but It would be nice to get a few bits before I go through all the work.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: TI84+ RFID help.
« Reply #1 on: September 06, 2010, 12:07:46 am »
Good call on your very last comment. The memory in the calculator is all stored in one huge stack. When you run a program, it is "pushed" onto the stack in front of the next item. But since you only have 1 program on your calc, that next program is the original copy of your program. When you store all the data you read from the rfid, it gets put into the memory currently being used by your original program. Which means that next time you run the program, the first 255 bytes of it are garbage.

It's a very simple fix. Put this at the top of your program.
Code: [Select]
storedBytes .equ appBackUpScreen ;255
testBytes .equ storedBytes+255 ;1 you can put this here for good measure

AppBackUpScreen is a 768 byte space that is specifically designed for programs to use.

I also just realized, you didn't put .db $BB, $6D at the top of your program. I forget exactly what it stands for, but put it at the top and .org $9D93 to accommodate for it.

The reason you can't call bcalls is because 1) they themselves are rst 28h's (which are like calls to $0038), and 2) they are far more complex than a call (follow one in an emulator if you want to see what I mean.)
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: TI84+ RFID help.
« Reply #2 on: September 06, 2010, 01:51:28 am »
Thats perfect, Ill just store 768 bytes and then just copy the backup to the actual screen. I wont be able to see it in hex, but just looking at the pixels I should be able to see what kind of patterns it has. Unfortunately I dont have a good emulator, It would be nice to step through my programs code! Oh, and I use assembly studio so the $bb $6d isnt required, I think that defines the program type. Thanks for the info, I need to get that thing working by tonight.

Offline thepenguin77

  • z80 Assembly Master
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1594
  • Rating: +823/-5
  • The game in my avatar is bit.ly/p0zPWu
    • View Profile
Re: TI84+ RFID help.
« Reply #3 on: September 06, 2010, 02:34:39 pm »
Ah, ok. I've never used assembly studio, I just go with plain and simple TASM.  To see what the hex is, you could use Calcsys. But if you did this you would need to store your data somewhere else since Calcsys uses about the first 20 bytes of appBackUpScreen. PlotSScreen (9340h) and SaveSScreen (86ECh) are 768 bytes areas that shouldn't get destroyed if you immediately quit your program and run calcsys.

WabbitEmu is the best ti emulator there is. You have to get a rom off you calculator, but that is very easy with Rom8x. Debugging makes things so much easier, but for your purposes, it might not help that much since you are working with hardware.
zStart v1.3.013 9-20-2013 
All of my utilities
TI-Connect Help
You can build a statue out of either 1'x1' blocks or 12'x12' blocks. The 1'x1' blocks will take a lot longer, but the final product is worth it.
       -Runer112

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: TI84+ RFID help.
« Reply #4 on: September 06, 2010, 03:57:20 pm »
Is assembly studio the ASM IDE Assembly Coders Zenith made? Or was that for the 86 only? I know now people use Zilog Developer Suite (like SirCmpwn) and Spasm and some stuck with TASM.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline AssemblyBandit

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 374
  • Rating: +60/-1
  • ~AssemblyBandit~
    • View Profile
    • briandm82.com
Re: TI84+ RFID help.
« Reply #5 on: September 06, 2010, 08:07:57 pm »
I got it to store just straight to the plotsscreen, then i just display it, and then i display the 768 bytes in hex. Im going to download wabbitemu right now. And yeah, its the assembly studio by ACZ. It works for the 86, 83, and 84. I should probably give ZDS a try but i like the way you can create your own dlls for assembly studio and have the code compile into different filetypes. When i get done with the RFID reader, ill upload the code and schematics for it. Not that anyone would probably have a use for it.