Omnimaga

Calculator Community => TI Calculators => ASM => Topic started by: Jerros on October 22, 2010, 07:58:03 am

Title: App-Page switching - How fast is that?
Post by: Jerros on October 22, 2010, 07:58:03 am
Short question:
Is it for a routine that needs to run VERY fast better to keep all info on one page, or is switching between App pages not that slow to do?
Title: Re: App-Page switching - How fast is that?
Post by: calc84maniac on October 22, 2010, 09:01:51 am
It depends on the page-swapping method. If you use a Bcall, that will certainly be slow. A home-made swapping routine will probably run faster. However, to answer your question, it will run the fastest if you can keep all the info on one page.
Title: Re: App-Page switching - How fast is that?
Post by: Jerros on October 22, 2010, 09:25:38 am
Using Bcall...
Okay, thanks. I'll keep the info on the same page then, even if this means that I have the same stuff on multiple pages.
Title: Re: App-Page switching - How fast is that?
Post by: Hot_Dog on October 22, 2010, 09:29:59 am
Using Bcall...
Okay, thanks. I'll keep the info on the same page then, even if this means that I have the same stuff on multiple pages.

There are some things that you can keep on multiple pages if you are not concerned about speed.  For my game, 16 KB (one page) is too little to make the game speed-efficient all the time.  So for when the player is doing nothing but looking at text and scrolling through menus, I keep THAT code on another page.  True, it means I use about 60 B_CALLS a second during that time, but because the code doesn't need to run as fast at that point, its a fair exchange for using the first page to run processor-intensive stuff.
Title: Re: App-Page switching - How fast is that?
Post by: Jerros on October 22, 2010, 09:41:38 am
There are some things that you can keep on multiple pages if you are not concerned about speed.  For my game, 16 KB (one page) is too little to make the game speed-efficient all the time.  So for when the player is doing nothing but looking at text and scrolling through menus, I keep THAT code on another page.  True, it means I use about 60 B_CALLS a second during that time, but because the code doesn't need to run as fast at that point, its a fair exchange for using the first page to run processor-intensive stuff.
Yes, I'm doing just that myself too. Though during the game, it loops a lot of pictures and loops ect. Since I have more levels than there fit on one page, I need to copy those pictures and loops to each page to make it speedy.
Waste of space (4 page App at the moment >.<) but the ROM is big enough ^_^.