Author Topic: A question about the TI-83+SE/84+(SE) interrupt/error trap hardware.  (Read 3485 times)

0 Members and 1 Guest are viewing this topic.

Offline Jsec42

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +0/-0
    • View Profile
Hello omnimaga, long time no see. I'm building an operating system for the TI-84+ series calculators(and perhaps the TI-83+SE if I can find someone to test it during the beta phase). Part of its design includes exploiting the hardware's error traps O.O(eg. No-EXEC, Port elevation, authorized read, etc.), however, I can't find any info stating whether the traps simply reset the CPU or if they execute an NMI(eg. an RST 60h) ???. Does anyone have any info on this behavior? If so, please reply! Thanks!


Computer Science is not the only science that matters, but it's definitely the most interesting.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: A question about the TI-83+SE/84+(SE) interrupt/error trap hardware.
« Reply #1 on: September 11, 2016, 06:04:42 pm »
Generally, executing in non-executable memory will cause a hardware reset. Anything else, like writing to Flash or protected ports while not in privileged mode, is just ignored without any kind of trap. There are no NMI sources on the 83+/84+(SE).

I assume you're using WikiTI for your hardware info? It's definitely indispensable: http://wikiti.brandonw.net/index.php?title=Category:83Plus:Ports:By_Address

On a side note, the 84+CE actually does trigger NMIs for traps, but at this point there's no easy way to develop an OS for it.
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Jsec42

  • LV2 Member (Next: 40)
  • **
  • Posts: 20
  • Rating: +0/-0
    • View Profile
Re: A question about the TI-83+SE/84+(SE) interrupt/error trap hardware.
« Reply #2 on: September 12, 2016, 02:53:18 am »
Ok that is what I needed to know - no need to build an NMI trap at 60h if there is no way to trigger it ;D. I am using WikiTI - it is the most complete documentation I can find on the Z80/EZ80 based calculators. I was aware of the NMI traps used by the 84+CE, but I'm also aware that even though the rom call interface is written in such a way that programs written for CISPL and QSPL would be cross-compatible to an extent, assembly programs would require some translation due to the physical 24-bit bus(in particular, non-relative jumps and anything involving register loads from memory would require modification)(Since the QSPL/CISPL interpreters run within a logical 16-bit stack environment, anything that directly adresses the stack would need to be rewritten to work within 24-bit. Also, integers would overflow at higher numerical values, so programs relying on this behavior may behave abnormally unless I find some way to mask the MSB while preserving the sign bit, but then you wont have the benefit of 24-bit integers :D. And all of that is without mentioning that any ASM programs contained within the script would require a rewrite.). For this reason and others(for example, the fact that you cannot practically build an OS for the TI-84+CE), I'm going to first focus on getting this OS running on the 128k monochrome calculators, then get the 48k calculators working(did I mention that the kernel memory allocation routines work within the full logical 24 bit environment provided by the ASIC? They will need to be rewritten slightly to deal with the discrepancy between those two revisions), then if I'm feeling particularly daring I might try to get this thing running on the TI-84+CSE.


Computer Science is not the only science that matters, but it's definitely the most interesting.