This is an archived, read-only copy of the United-TI subforum , including posts and topic from May 2003 to April 2012. If you would like to discuss any of the topics in this forum, you can visit Cemetech's z80 & ez80 Assembly subforum. Some of these topics may also be directly-linked to active Cemetech topics. If you are a Cemetech member with a linked United-TI account, you can link United-TI topics here with your current Cemetech topics.

This forum is locked: you cannot post, reply to, or edit topics. Z80 & 68k Assembly => z80 & ez80 Assembly
Author Message
thepenguin77


Advanced Newbie


Joined: 17 Jul 2009
Posts: 72

Posted: 30 Jul 2009 03:03:34 pm    Post subject:

Is there a faster way than using _LoadDEIndPaged and _LoadCIndPaged to access the flash memory? I'm making a sound player so those routines are way too slow.

I'm currently reading from RAM with sp and I want to make the songs bigger than 24k.

Also, is there a way to make some kind of file on the calculator that is larger than 65k?
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 30 Jul 2009 06:22:05 pm    Post subject:

Well, FlashToRam is faster than reading individual bytes or words. If you want something faster than that, though, then you need to do it yourself. Use port 6 to map other Flash pages into memory, then read them directly.

Obviously you need to be careful; if you're writing a Flash app, you need a RAM subroutine that writes to port 6, reads the data you want, then restores the old mapping. If you're writing a RAM program, you need to be sure to restore the original value of port 6 before calling any shell routines, and before your program exits.

If you're writing an app, you can also try using port 7; be sure that you disable interrupts, and don't call any system routines.

Flash apps can be as large as you want. Normal archived variables can be, at most, slightly less than 64k. Obviously one option would be to split up your data into several files.
Back to top
thepenguin77


Advanced Newbie


Joined: 17 Jul 2009
Posts: 72

Posted: 30 Jul 2009 07:52:20 pm    Post subject:

I'm making a RAM program. The FlashToRam I don't think will work because doing it all at once will be too slow. I think I'll just split the file up and store all the different locations before it is played.

But when a file runs off the end of a flash page, does it go to the higher next or lower next page? So 7 to 8 or 7 to 6?


Last edited by Guest on 30 Jul 2009 07:53:07 pm; edited 1 time in total
Back to top
FloppusMaximus


Advanced Member


Joined: 22 Aug 2008
Posts: 472

Posted: 30 Jul 2009 08:08:34 pm    Post subject:

Archived variables are stored pretty much as you'd expect. When you get to the end of a page, you move to the start of the next higher page (8 to 9, etc.)

Flash apps, if you're wondering, are a somewhat different story; they are loaded starting at the end of archive space and working backwards. So "page 0" of an app might be Flash page 15, "page 1" would be Flash page 14, and so on. Of course, you can store data in the app in any order you want to; all that matters is that the "first" page (stored at the highest address in Flash) begins with a header, and the "last" page (stored at the lowest address) ends with a signature.
Back to top
Display posts from previous:   
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
    »
» View previous topic :: View next topic  
Page 1 of 1 » All times are UTC - 5 Hours

 

Advertisement