No, Most sectors are 4 pages (64KB), except for $7C-$7D, which is one, and $7E (certificate page) is two 8KB sectors. Boot code is its own. They're laid out at the beginning of the data sheet, btw Very Happy
(Note: translate pages for 84+ and 83+, the non-SE's)
The extra $4000 is just to get it onto the flash page. I could have added $5000, $6000, or $7000 if I wanted. (most significant hex digit doesn't count)
Wait, how many bytes is a sector? If I wanted to erase page 7E (god forbid), how?
You have to erase both sectors of it. first addresses starting with $4000, the other set with $6000. My code would have to be modified.
So an ErasePage routine would have to be adaptable for different pages?
Nah, only the certificate page is special Very Happy everything else works normally since the other sectors are at least a page in size.
calcdude84se wrote:
Nah, only the certificate page is special Very Happy everything else works normally since the other sectors are at least a page in size.
At least a page? So are some sectors multiple pages in length?
Most sectors are 4 pages. One sector, $7C-$7D, is two, and $7F is its own sector.
calcdude84se wrote:
Most sectors are 4 pages. One sector, $7C-$7D, is two, and $7F is its own sector.
Very nice, thanks for clarifying that, although I could have saved myself the stupid question if I had read the other Flash topic first. Smile
Ameh. All the raw flash control code you could ever need is here (except the full-chip erase). By the way, the documented autoselect commands don't work. This program helpfully provides code that proves this.
DrDnar wrote:
Ameh. All the raw flash control code you could ever need is here (except the full-chip erase). By the way, the documented autoselect commands don't work. This program helpfully provides code that proves this.
Very impressive! Is that your own work, DrDnar?
Yeah. You'll recognize the style, especially the menu routine, from other software I've released on ticalc.org. I never uploaded because I don't figure it's really a useful program. Not that that stops other people.
DrDnar wrote:
Yeah. You'll recognize the style, especially the menu routine, from other software I've released on ticalc.org. I never uploaded because I don't figure it's really a useful program. Not that that stops other people.
I'd say that not only is it somewhat useful on its own, the routines it contains are extremely valuable, so I think you should at least release it in the Routines section! You obviously put plenty of hard work into this, and you deserve more recognition (not even your name in the program?) for it.
Hm... that code and your username look familiar...
Oh, that's right, I've seen you on UTI.
I can't believe I didn't remember this earlier; I could have saved myself some trouble by just linking to your posts Very Happy
calcdude84se wrote:
Hm... that code and your username look familiar...
Oh, that's right, I've seen you on UTI.
I can't believe I didn't remember this earlier; I could have saved myself some trouble by just linking to your posts Very Happy
Hehe, and we return to the reinventing-the-wheel lessons that I was helping Sonlen to learn. Wink Still, I'm glad there's a bunch of information in this topic now from different people that all agrees.
I agree with KermMartian. This is hard stuff, and not well documented, until this thread.
As Brandon likes to point out, there's no significant advantage to writing your own flash manipulation routines, perhaps aside from being able to run other code while the flash chip is busy. But you wouldn't be able to do much, because you can't read from flash while a write/erase operation is in progress.
Or perhaps it could be required if OP1 can't be corrupted...
SirCmpwn wrote:
Or perhaps it could be required if OP1 can't be corrupted...
I'm most interested in independence from the TI-OS. Razz
Okay, so the ErasePage routine isn't working, ideas?

Code:
; Erases page in A
; Requires flash to be unlocked
ErasePage:
    out (6), a
    ld bc, ErasePageRAMDone-ErasePageRAM
    push bc
    call AllocateExecutableMem
    ex hl, de
    ld hl, ErasePageRAM
    pop bc
    push de
    ldir
    pop de
    ex hl, de
    jp (hl)
    ret
ErasePageRAM:
    ; 555h\AAh, 2AAh\55h, 555h\80h, 555h\AAh, 2AAh\55h, 555h\10h
    ld a, 0AAh
    ld (4555h), a

    ld a, 55h
    ld (42AAh), a

    ld a, 80h
    ld (4555h), a

    ld a, 0AAh
    ld (4555h), a

    ld a, 55h
    ld (42AAh), a

    ld a, 10h
    ld (4555h), a
    ret
ErasePageRAMDone:
Did you try comparing your routine with Dr. Dnar's routine?
  
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 3 of 5
» 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