Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - fb39ca4

Pages: 1 ... 9 10 [11] 12 13 ... 126
151
ASM / Re: I need to load page x of an app without calling code.
« on: December 16, 2013, 01:47:29 pm »
I've got another question about multi page apps, this time having to do with spasm and the defpage macro. When I run spasm, I get an error that a page is being skipped, then a message stating that same page was added successfully:
Code: [Select]
Pass one...
Pass two...
-----------------------------------------------
Beginning APP "MyApp", courtesy of SPASM macros
-----------------------------------------------
(error)
Warning: Skipping page 1 at user request.
Page 0 free space: 14895
(error)
Warning: Skipping page 2 at user request.
Page 1 free space: 131
Page 2 free space: 144
Success: Page sizes validated and "MyApp" is ready for signing.
           In 3 page(s), 15170 bytes are available.
Done
Assembly time: 0.036 seconds

I have a lot of pages in my app (above, I commented everything out but the first two temporarily to reduce compile time), so this is the structure to my code:

main.asm:
Code: [Select]
#include "ti83plus.inc"
#include "app.inc"

defpage(0, "MyApp")

[code goes here]

#include "pageinc.asm"

validate()

pageinc.asm:
Code: [Select]
#include "page01.asm"
#include "page02.asm"
#include "page03.asm"
[and so on...]

page01.asm:
Code: [Select]
defpage(1)
.db [data goes here]

And so on for all the pages. Can someone help me understand what is causing these error messages?

152
I hope we move to something better than domain names by then.

153
HP Prime / Re: [WIP] Trailblazer Prime
« on: December 16, 2013, 12:24:52 am »
I see what you mean. But here, as screen lines are always parallels to lines of texels, the BLIT_P function of PPL does this for me even faster. Nothing is computed at pixel level in fact : BLIT_P scales and copies on screen a whole line of a tile at once.
Ah, so it will scale the textels automatically for you? That's even better.

154
HP Calculators / Re: Adventures with the HP 28S
« on: December 15, 2013, 09:27:07 pm »
Ah yes, I revived one of those for my uncle. We didn't have any N-sized batteries laying around, so I attached an AA battery holder to the back and ran wires to the inside of the battery compartment.

155
News / Re: Hands on with the transparent TI-73 overhead
« on: December 15, 2013, 02:25:04 pm »
So they're like the buttons you would find on a microwave?

156
News / Re: Hands on with the transparent TI-73 overhead
« on: December 15, 2013, 01:21:55 pm »
What does the keyboard feel like? Is there very much travel in the keys?

@DJ Omnimaga: You double posted.

157
HP Prime / Re: [WIP] Trailblazer Prime
« on: December 15, 2013, 12:38:31 am »
Are you calculating a lookup table for each pixel of the screen?

Not for each pixel. I use three tables :
rayTable stores the distance to the rendered plane for each screen line,
x1Table and x2Table are lists of lists of projected horizontal starts and ends of each square, for each screen line again.
Those are computed in init().
Good. I had originally done the naive per pixel look up table when writing my Nspire mode 7 engine, but I also came across a similar method. Instead of storing the start and end positions for each scanline, I stored the start position and a vector to increment the position by each pixel. I don't know the performance penalties for different calculations in HP-BASIC, but a vector addition per pixel should be cheaper than a vector linear interpolation (which involves multiple additions and multiplications) each pixel, so you may want to try it.

158
HP Calculators / Re: HP PPL Fade in/out effects (SNES style)
« on: December 14, 2013, 10:30:43 pm »
This even blows most ndless stuff for nspire out of the water. Prime basic is awesome.
Properly written graphics routines in C would still work quite well. The Prime does have the advantage of a faster CPU.

159
ASM / Re: I need to load page x of an app without calling code.
« on: December 14, 2013, 10:26:49 pm »
When your application starts, read the value of port 6, which dictates which page of physical flash the base page of your app resides on. Subsequent pages of your app extend downwards in physical page numbers.
Ok, so it's all linearly mapped, and there's no table the OS stores to access? Thanks, that's all I needed to know.

160
ASM / Re: I need to load page x of an app without calling code.
« on: December 14, 2013, 02:14:45 pm »
What if there is another app installed that occupies that page? The OS would install my app to a different page.

161
ASM / Re: I need to load page x of an app without calling code.
« on: December 14, 2013, 12:31:30 pm »
Well, I guess this should be written somewhere in your app when it's compiled. Then all you'll have to do is get that number and output it to port 6 from RAM.
But page x of an app does not correspond to page x of the physical flash page. If you have multiple apps installed, some of them will have to be offset.

162
ASM / Re: I need to load page x of an app without calling code.
« on: December 14, 2013, 10:17:39 am »
Also, for copying code to RAM, how do I get spasm to compute jp addresses as if they were for that RAM? If I don't, the addresses would still point flash, which would not work.
Just add another .org before the RAM code.
Thanks, I didn't realize it would be that simple.

You must not think of flash and RAM as two separate memories. Memory $0000-$7FFF is flash, and $8000-$FFFF is RAM.

To make a flash page available, just write its number to port 6 to put it in $4000-$7FFF, and port 5 to put it in $0000-$3FFF (a flash page is 16384 = $3FFF bytes).

When code of an app is executed, all addresses between $4000 and $7FFF refers to its own code (since it always takes one full page), so if you want to copy something in RAM, only a ldir instruction is enough.
I get that part, but I need to know what page to swap to. From what I understand, the OS maps pages of an application to different physical flash pages.

163
ASM / I need to load page x of an app without calling code.
« on: December 13, 2013, 10:46:44 pm »
For my app, which is going to consist of 1% code and 99% data, I need to be able to swap to an arbitrary page. I plan on copying my code to RAM, so that I am free to switch pages. I know you can switch to a physical flash page by writing to a port, but I need to switch to pages based on the order they appear in the app. Can someone help me out?

Also, for copying code to RAM, how do I get spasm to compute jp addresses as if they were for that RAM? If I don't, the addresses would still point flash, which would not work.

164
Anime and Manga / Re: Swimming Anime
« on: December 13, 2013, 04:26:31 pm »
Nobody mentioned Hyouka? The animation in it is god-tier.

165
HP Prime / Re: [WIP] Trailblazer Prime
« on: December 12, 2013, 10:32:53 pm »
Are you calculating a lookup table for each pixel of the screen?

Pages: 1 ... 9 10 [11] 12 13 ... 126