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 - Runer112

Pages: 1 ... 9 10 [11] 12 13 ... 153
151
Axe / Re: Axe Q&A
« on: May 14, 2015, 09:51:10 pm »
It's pretty unsurprising, really. Only a few people have the existing knowledge of how to make a good audio engine, Axiom development isn't exactly very popular, and the Axiom system is better suited for simple commands that user code calls when needed rather than orchestrating a whole engine that has to run in parallel with user code.

152
Axe / Re: Axe Q&A
« on: May 14, 2015, 09:44:55 pm »
There's no simple way to produce "nice" audio. At least, not without heavy, very specialized assembly code that would only run on the 84+. Such code doesn't really fit into Axe as a built-in, and that's not even considering the fact that "nice" audio has only ever been implemented by a few people.

If one such individual knows what they're doing, they could theoretically make an Axiom/library for it.

153
Axe / Re: Axe Q&A
« on: May 12, 2015, 03:48:58 pm »
Are you not supposed to load a file onto an existing file? Like, if I put appvHELLO to [Y2] and then do appvHELLO2 to [Y2], does it break some stuff, because when I tried to read another file in [Y1], it doesn't work anymore, program crashes after having the run indicator turn on and then pressing any button.

I don't believe this should cause any issues. Unless, of course, other parts of your code still expect the old variable to be pointed to by Y2.

154
Axe / Re: Help with greyscale tile engine?
« on: May 12, 2015, 09:34:27 am »
I tried the build of TinyCraft from the first post. That gif was definitely recorded with the program running at full speed, so that's a 2.5x speed boost. And I checked the screen update rate, which is only 30-40Hz; the proper update rate for "perfect" grayscale is about 60Hz. That gives it a 2x speed boost on top of the 2.5x for a total 5x more free CPU time than a "perfect" grayscale program running at normal speed.

For the Pokemon example I made for GrayLib, two simple tactics I used to boost the performance for the 83+ were to scroll two pixels per frame instead of just one and to use #ExprOn to request that Axe optimize for speed instead of size. These two together should make scrolling somewhere between 1.5x and 2x as fast.

155
Axe / Re: Flagged! Axiom
« on: May 11, 2015, 12:59:39 pm »
Still, the token hook doesn't work on my setups (both real and emulated). Could you transfer me your compiled program file to see if the problem comes from my calc or the compilator ? Thanks.

Here it is.

156
Axe / Re: Flagged! Axiom
« on: May 10, 2015, 04:12:31 pm »
-> Info : I'm using Axe 1.2.2a. Which one do you use Runer ?

Same.

I use ld s on absolute addresses, not relative ones... Did I misunderstand ?

Notice each command's code starts with .org 0. This means that all the labels in your code are offsets relative to the start of the code, and the REP_NEXT macro signals that the next 16-bit immediate value is such a relative value to which the actual base address of the code should be added when compiled.

The ABS_NEXT macro signals that the next 16-bit immediate value is an absolute (fixed) value that is not relative to anything and should not be offset.

157
Axe / Re: Flagged! Axiom
« on: May 10, 2015, 02:52:51 pm »
The token hook works for me:




As for functions behaving incorrectly, I see two issues in a first look:
  • The code you use to signal that the next address should be replaced actually signals not to replace the next address. The correct signal is $7F. I'd also advise using the REP_NEXT macro provided by Axe.inc instead of producing the signals manually, although some tweaking may need to be done for it to work properly in some assemblers.
  • All arguments are passed as 16-bit values, but you pop some off the stack into af. This puts the low byte (the one you want) into f, not a. You should pop these arguments into a 16-bit register pair and then move them into a.

158
Axe / Re: Axe Q&A
« on: May 07, 2015, 06:52:22 pm »
When reading from archive, does it disable interrupts as well?

No, reading a byte/word from an archived pointer doesn't disable interrupts.

Also, is there a really fast way to get a user to input a variable? It takes too long to make one from scratch every time.

For string input, you can sometimes get away with the input command. But that reads a string of tokens instead of characters, which is often a problem. You can convert it to characters with the Detokenize axiom, though.

For numerical input, there's no built-in. So you do have to do it yourself.

Is there any way i can keep the var archived and still use my buffer approach?

No. Keeping it archived means reads are still slow. And even if you did manage to speed up the archive reads, you still couldn't write back changes.

When reading from archive, does it disable interrupts as well?
I believe so as interrupt based greyscale has to be reloaded after the file-IO in my project imd working on. Idk if the culprit is the archive / unarchive command thou.

I wouldn't really call the mass data movement commands "reading from archive," but the Copy() from flash, Archive, and UnArchive commands probably kill custom interrupts. They may also disable OS interrupts.

159
Axe / Re: Axe Q&A
« on: May 07, 2015, 11:29:57 am »
1) how many cpu  Cycles does it take to read a byte from a file like {y1}

About 200 cycles. For reference, it only takes 14 cycles to read a byte from RAM. So if you're going to read this data often and are worried about speed, you should consider migrating this data to RAM.

And doing exp》{y1}  automaticallysagves it to the appvar that very instance right?

Is supposed to be , the store operator? In that case, I hope Axe would throw an error if you tried to compile that, as you cannot (for most intents and purposes) write data directly to archive.

Combining your two questions together, it sounds like you're planning on doing many read/write operations to an appvar. In that case, you should probably UnArchive it to work on it and Archive it when done.

160
TI Z80 / Re: [AXE LIBRARY] GrayLib: (nearly) perfect grayscale
« on: May 05, 2015, 12:26:08 pm »
When I used GIHB for some before hooks, I think it didn't work for me. Used it a while ago, so don't know the specifics of what was wrong. When I looked at the code, it also called up a subprogram called GHB0(), which does not exist. Is it a typo with the last label of GHB?

Yes, this was a typo. I fixed it a while ago in my local development copy of GrayLib, but seeing as it took until now for someone else to run into the issue, I didn't think it was worth a new release to fix it.

161
TI Z80 / Re: [AXE LIBRARY] GrayLib: (nearly) perfect grayscale
« on: April 30, 2015, 09:54:16 pm »
I've successfully torn out the juicy asm codes and put them in my program. Just want to make sure that you will be ok with me doing so? I will credit you for "writing the greyscale interrupt code" in my programs.

I'm still not sure why you wanted to manually pull the library apart to include bits of it in your program instead of simply letting the library and its preprocessor conditionals handle it for you, but I guess that's your prerogative. The point of the library is for people to be able to use the code after all, although you've done so in a strange way.

Also can you pls explain what exactly Gwait() does?

GWait() waits until the frame most recently offered up for display with GDisp() has been "fully" displayed. This means displayed twice for 3-level grayscale and displayed three times for 4-level grayscale, as that's how many grayscale updates it takes to go through all the phases of the dithering mask so all of the pixels have been displayed for the correct ratio of time. Whether or not this actually improves the visual quality, I'm not totally sure. But it's also useful as a timing mechanism to keep your program running at a constant rate.

<sarcastic comment> waiting seems the best thing to do when the interupt  takes up a third of the cpu time!</sarcastic comment>.

One third? I think you might be dreaming. The interrupt takes more like three fourths of the CPU time. I should probably add this information to the first post/readme to clarify for potential users that "perfect" grayscale is a very expensive feature.

Ps, in an earlier post on this thread you said you where writing a more efficient timer interrupt. Was that implemented or is it still coming?

I'm still experimenting with it. Nothing I can put into the library yet, but work is being done.

162
Axe / Re: Axe Q&A
« on: April 30, 2015, 06:15:05 pm »
I don't understand what the r1 pointers (found under the vars>polar menu) are used for

Those are the variables that function arguments are stored in. For instance, Func(A,B,C) is effectively syntactic sugar for A→r₁:B→r₂:C→r₃:Func().

163
The Axe Parser Project / Re: Image scaling
« on: April 30, 2015, 01:16:30 pm »
Alright, so as far as I can tell, the modification was successful. It uses the same tokens and input format as the original Axiom, but each token now starts with an "H." Some weird OS behavior that I can't explain may make the "ZoomFit" token not be replaced with "HScaledClip-On(" in menus, but it should otherwise work correctly.

The Axiom and its source are attached to this post. Let me know how it goes!

164
Axe / Re: Axe Q&A
« on: April 30, 2015, 08:55:09 am »
1) how do I seed the random numbers generator?

You could theoretically set the seed, as the seed value does exist at a fixed location in memory. But this is relatively pointless, because...

2) once seeded will the rng always return the same stream of numbers?

No. Axe's PRNG is not deterministic, as it uses both a time source and a pseudorandom memory read as sources of entropy for every number generated.

This has always bothered me, really... would people be interested in it being replaced with a deterministic PRNG?

165
The Axe Parser Project / Re: Axe Parser Compatible with 84+ Keypad?
« on: April 30, 2015, 08:43:26 am »
I know one of the goals of Axe was to be compatible with the Nspire 84+ emulator. However, I think the compatibility for the app itself may have been lost at some point, and only the compatibility of compiled programs retained. My best guess would be the 1.0.0 release is that point, as that's when Axe started using a flash unlock exploit and writing data to flash, and I wouldn't be surprised if these aren't emulated properly.

Does anyone have experiene with using past versions of Axe on their Nspire 84+ emulator, or would anyone be willing to take some time and pinpoint the version that broke compatibility? If my guess isn't correct and it wasn't in fact the 1.0.0 release, it may be something that's reasonably fixable.

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