Again, just an uneducated guess here, but with the clock set to 32768Hz, it'll take a few hundred cycles before the countdown does anything I think. Not sure how long call _SetXXXXOP2 etc takes.
I thought that it decrements 32768 times per second... hmm
Here are the 2 mini-programs I wrote :

The 1st one initialise then start the countdown:


Code:
.nolist
#include "ti84pce.inc"
.list
.org userMem-2
.db tExtTok,tAsm84CeCmp

.assume ADL=1
; Initialise & start:

      ld hl,$f1000c
      ld (hl),%11001
      ld de,$ffffff
      ld l,$04
      ld (hl),de      
      ld de,$5ab9ff
      ld l,$07
      ld (hl),de
      ret


The 2nd one just read the value :


Code:
.nolist
#include "ti84pce.inc"
.list
.org userMem-2
.db tExtTok,tAsm84CeCmp

.assume ADL=1

;    now, read

   ld de,($f10001)
   ld hl,$ffffff
   sbc hl,de
   jp _DispHL


EDIT: after checking, I understood that the counter value (in the upper program) increase +128 /sec
thus , 2^24 /128 / 60 = 131072 seconds = 2184.5 Minutes = more than 36 hours till the end !!
Using the watchdog timer as a timer, is a really, really bad idea. It triggers a non-maskable interrupt which completely resets the CPU when the counter is reached. This may only happen sometimes, depending on what you set the value of the timer to, which is why you may not have noticed it? Anywho, I would highly recommend using one of the more functional General Purpose Timers, as that is what they are supposed to be used for Wink
I agree with Mateo concerning the watchdog timer : it might reset the cpu...unless we initialise correctly a few bits before launching it, (especially bits 1 & 2 = 0) at address $f1000c (port 600c) Smile

As explained on Brandon Wilson's page http://wikiti.brandonw.net/index.php?title=84PCE:Ports:6000 :

600C (R/W):

Bit 0: Timer enable. Set to make the counter count down.
Bit 1: System reset enable. Set to reboot the calculator when the counter reaches 0.
Bit 2: System reset interrupt enable. Set to trigger a non-maskable interrupt when the counter reaches 0.
Bit 3: External signal enable. Set to enable the external signal when the counter reaches 0 (this may have no effect).
Bit 4: Clock source. Set to 1 to use the 32768Hz clock, or 0 to use the CPU clock.

I've done that and never seen any reset on my TI83PremiumCE when the register reachs 0 Wink
As recommended, I'm finally studying the general purpose timers !
(see http://wikiti.brandonw.net/index.php?title=84PCE:Ports:7000 )
I was wondering...We know the frequency of crystal timer (=32768Hz), If we decide to use a timer based on cpu clock , we first need to know its frequency.
I wrote a mini-program which runs 2 timers at the same time (1st one based on crystal 32768hz, other on cpu clock ????hz)
After 10 secondes, we'll see what value there will be in the 2nd timer's counter register Smile


Code:

.nolist
#include "ti84pce.inc"
.list
.org userMem-2
.db tExtTok,tAsm84CeCmp
.assume ADL=1

      ld hl,$f20030
      ld a,(hl)
      and %11000000
      ld (hl),a
      inc l
      set 1,(hl)
      set 2,(hl)
      ld l,h
      ld de,0
      ld (hl),e
      inc l
      ld (hl),de
      ld l,$10
      ld (hl),e
      inc l
      ld (hl),de
      ld l,$30
      ld a,(hl)
      or %1011
      ld (hl),a
      ld de,$f20010
      ld l,$02
      ld a,5
wwai:   cp (hl)
      jp nz,wwai
      ex de,hl
      ld hl,(hl)
      jp _DispHL


my TI83PCE displays 10244129 !
How does a VAT entry at the ez80 looks like? When I'm debugging it in CEmu, it gives me (reversed), the data pointer, another byte, and the program name, but this website says there's more between the data pointer and the name... Neutral
It's exactly what's describe in ASM in 28 Days (that's a more up-to-date version of the tutorial), with the only difference being that instead of Page, DAH, DAL, it's DAHH, DAH, DAL, now, with [DAHH, DH, DAL] forming the 24 bits of the starting address of the variable. The only thing between the data pointer and the name is the length of the name. Does that appear to be missing?
I'm looking for a bunch of consecutive RAM/Memory, without deleting anything. I thought of starting at vRAM until D7FFFF, is that safe? (without the screen messed up) And can I use D80000-DFFFFF too? (WikiTI said it is mirrored of vRAM or whatever)
I assume you already took a look at this memory table for the TI-84+CE? There's only VRAM from $D40000 through $D657FF; as the wait states page indicates, anything after that is not mapped to anything useful. And if you use VRAM, it will definitely change the contents of the screen (of course, if you have the screen in half resolution mode, you can use half of the VRAM for scratch RAM).
KermMartian wrote:
I assume you already took a look at this memory table for the TI-84+CE? There's only VRAM from $D40000 through $D657FF; as the wait states page indicates, anything after that is not mapped to anything useful. And if you use VRAM, it will definitely change the contents of the screen (of course, if you have the screen in half resolution mode, you can use half of the VRAM for scratch RAM).

Of course I did Smile
I only want to ask if you CAN use the memory after vRAM for your own purpose, so from D65800-D7FFFF, without crashing the OS.
PT_ wrote:
I only want to ask if you CAN use the memory after vRAM for your own purpose, so from D65800-D7FFFF, without crashing the OS.

There is no memory there. pixelShadow provides 69090 continuous bytes of saferam. Smile
So I was busy with the project TILES, and one part of it, is creating an appvar of about 8200 bytes, for the spritesheet. I've a prgram that works fine, but there is one giant bug that I think I can't solve. When I first create an appvar in RAM, and move it to the Archive, no problem. But when I again create an appvar of 8200 bytes, still no problems, but sometimes Y1, Y2, Y3 etc get ALL be overwritten, and are now about the 16K of data each. When I want to delete them, the calc crashes. What is my problem and how can I solve it? Sad
Sounds like you are writing too much data to the appvar than it can hold. What does your code look like?
While I was working at ICE, I encountered a problem. The maximum program size is 65536 bytes. It is very unlikely that the user has 65536 free bytes of RAM, so for creating the program, I will first (maybe) do this in the Archive (but when I write to the Archive, it crashes), or are there other places in RAM where is enough continuous free space, and not will be overwritten? Thanks in advance Smile
I'd say it's reasonable to limit the maximum program size to either 64KB or the maximum amount of free RAM, whichever is smaller. You cannot write byte-by-byte to Archive, as you discovered; there is plenty of scratch RAM, as documented in the following, but you really should just use regular UserMem for storing the source of the program currently under editing.
http://wikiti.brandonw.net/index.php?title=Category:84PCE:RAM:By_Address
Soooo... time for a new question Smile
While I was working on ICE (always...), I thought about the customs tokens which could be a replacement of existent tokens. No worry, but the main problem is, that I need to provide my own menu of these tokens. Looking at WikiTI at the page I wrote myself (Razz), it seems that the options should be represented by an extended keycode in DE ?????
1) Can anyone explain my WHY?
2) If I have a random (one-byte) token, can I get easily the extended keycode from it.
3) Looking at all the tokens, is there any logic between the token and the extended keycode?

I know it has something to do with _KeyToString, _ConvKeyToTok and maybe more, but I can't figure these calls out Sad

I only figured out that D is $FC, $FD, $FE or $FF, but yeah, more not Razz

Thanks in advance! Smile

EDIT: it seems that a 'FC key' corresponds to a 2-byte token
How can the CE turn to (non-)ADL mode within a program for example? Can a program change the ADL bit, and if so, how? Or is the Z80 mode only used with .s?
You can read all about it in the "Persistent Memory Mode Changes in ADL and Z80 Modes" section of the eZ80 manual, but the sparknotes version is that suffixed call, jp, rst, and ret instructions allow switching memory modes. All but jp require being in mixed memory mode, which can be set in ADL mode with the stmix instruction and reset with rsmix. Also, don't use ret.s, always use ret.l.
Which hook is called (or none) if you press + on a token (not necessary via the Catalog)? Is there already documentation about it?
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 2 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement