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

Pages: 1 ... 14 15 [16] 17 18 ... 20
226
General Calculator Help / Re: RAM loss?
« on: November 11, 2010, 10:39:29 pm »
It only does anything when you turn the calculator on after a reset.  And I'd guess it isn't documented anywhere because TI never anticipated people would ever need to use it - I think the main reason it exists is to allow you to boot the OS and reset the archive if it ever gets seriously corrupted.

Normally, for every archived variable, the OS keeps a VAT entry in RAM - i.e., the variable's name, type, and the address where it's stored in Flash.  These entries are used so that the OS, and other programs, can easily locate the variable.  Like DrDnar said, holding CLEAR when you first turn the calculator on stops the OS from scanning the archive and building these VAT entries; as a result, all your archived variables will be "hidden."

227
ASM / Re: WikiTI
« on: November 11, 2010, 12:27:26 pm »
Oh, I see.  You mean going around behind the USB controller's back, as it were, and controlling the data lines individually.  I don't know if that's even possible - as far as I know, the set of low-level operations that the CPU can control is pretty limited.

And it wouldn't be compatible with the OS or with standard USB devices, and you'd be relying on the least-well-understood parts of the hardware, and it would be much slower than using the USB protocol, but who knows?  Maybe it's worth a try.  I suspect that using the USB protocol would be easier and more rewarding, though.

228
ASM / Re: WikiTI
« on: November 10, 2010, 10:47:54 pm »
Oh, yeah, I was starting to write up documentation of the USB ports at one point.  Then I got distracted by something else.  That seems to happen a lot.

Yeah, I have the USB8X source code lying around, but it depends heavily on TIOS routines.  I would also probably write most of that stuff from the ground up, considering that it has no support for hubs, and is a bit outdated.
USB8x doesn't actually use the OS routines for very much - there's not very much interesting stuff the OS routines can do.  The main thing USB8x relies on the OS for is USB interrupt handling, and that's because there isn't any other choice if you're going to use IM 1.  (But that should be pretty easy to re-implement yourself if you want to.)

It does have some basic hub support - if a hub is connected, AutoSetup will turn on the ports one by one and try to connect to the first non-hub device it finds.  I'm not sure how much more is physically possible, as I'm not sure that there's any way to talk to, or listen to, more than one peripheral device at a time.  But I haven't tested anything to do with hubs myself.

Well, we know almost nothing about those ports.  We pretty much have to use TI's routines, which I can't steal and put in KnightOS unless I'm clever about it.  With the information we have, I could probably manage unit-to-unit file transfers, but for advanced stuff like unit-to-PC and peripherals such as flash drives we need more documentation.
Which ports are we talking about here?

And talking to a PC is easier than talking to another calculator: in the former case you only have to deal with peripheral mode, whereas in the latter case you need both host and peripheral modes.  And maybe SRP and HNP.

229
ASM / Re: Swapping Pages during Program...
« on: November 10, 2010, 10:25:58 pm »
Why not put your code into the app as well?

But yeah, you can basically do whatever you want with port 6 - the OS doesn't mind - but you do have to be careful to restore the port to its original value when your program exits.  Also note that you need to have the correct value in port 6 when calling shell library routines (e.g., ionFastCopy).

230
Other Calculators / Re: CAS+ dumping / flashing / Ndlessing
« on: November 07, 2010, 02:15:37 pm »
Does it have an RS232 "serial console" like the regular Nspire models do?

231
There isn't a Chinese localization app for the 83+/84+, but there is a "Chinese Help" app similar to Catalog Help.  As far as true localization goes (displaying Chinese characters on the homescreen and in BASIC programs and such), I wouldn't go so far as to say it's impossible, but it would be very difficult.

232
Axe / Re: transform an image displayed in hexadecimal String
« on: November 07, 2010, 01:57:42 pm »
Are you saying that you want to take the image that is currently displayed on the screen, and dump it out as a hex string?  It would be pretty straightforward to do that in assembly language; I don't know if there's a simple way to do that with Axe.

233
ASM / Re: A GetKey that doesn't wait?
« on: November 02, 2010, 11:15:16 pm »
If I remember correctly, if you press the ON key during _getKey a flag is set which causes exactly what you want. If you set this flag manually, it might just work.
That's an interesting point.  I'm not sure if that would work or not.

(If not, a trivial GetKey hook could do the same thing.)

234
ASM / Re: A GetKey that doesn't wait?
« on: November 02, 2010, 10:53:43 pm »
For grayscale, you might be able to make it work with a GetKey hook, but for accurate timing I'd think you'd want to use an IM 2 handler.  To make grayscale look good, you generally want to have consistent timing regardless of whatever else is going on in your program, and regardless of whether the user is pressing keys.  I didn't think of mentioning IM 2 handlers before, but that might be the way to go.

On the other hand, a GetKey hook requires less memory to set up.

235
ASM / Re: A GetKey that doesn't wait?
« on: November 02, 2010, 10:21:03 pm »
I just want to make a program that can work while waiting for key inputs and accepts key inputs in the A/keyExtend format.

You said that already.  The question is why.  For example, "I'm writing a game in which the user needs to type the answers to trivia questions in l33tspeak, while simultaneously using the arrow keys to dodge attacks from a giant lava monster."  Or "I'm writing a text editor where all the O's are actually eyes, that follow the cursor around the screen and blink at random intervals."

236
ASM / Re: Some general Questions
« on: November 02, 2010, 10:13:19 pm »
That code will not do what you want.  You can't load an 8-bit value from memory directly into a register, except for the A register.  TASM interprets "ld l, (foo)" as "ld l, foo"; i.e., a request to store the value "foo" in L, not to store the contents of memory location "foo" in L; the Z80 doesn't have an instruction to do the latter.  TASM is then complaining because you're trying to store a 16-bit value in an 8-bit register.

What you want to do is either "ld hl, (foo)" or "ld a, (foo) / ld l, a".  Obviously the former will destroy the contents of H, while the latter will destroy the contents of A.

237
Axe / Re: Music using Freq(
« on: November 02, 2010, 10:00:17 pm »
Funny, you're right, the wavelengths in that table are close to the values you want (though unless I've made a mistake somewhere, they're actually off by about an octave.)

If f is your frequency in hertz, and t is your duration in seconds,

frequency parameter (or I guess wavelength parameter would be a better name), k = ((3000000 / f) − 59) / 47
or k ≈ (63830 / f) − 1.3

duration parameter, d = t · 6000000 · k / (47k + 59)
or dt · 127660 · (k / (k + 1.3))
(or for low frequencies, dt · 127660)

and if you want to play a continuous tone using two 'Freq' commands, make sure that for the first command, d is a multiple of 2k.

238
ASM / Re: A GetKey that doesn't wait?
« on: November 02, 2010, 01:05:38 am »
Uh... no.  Not what he was asking.  There's GetCSC, which he mentioned, and GetK (BASIC's getKey), which he didn't.  Both of those routines return raw scancodes; they don't handle the shift keys, contrast control, APD, 2nd+Off, TIKB, or silent link.

239
ASM / Re: A GetKey that doesn't wait?
« on: November 02, 2010, 12:40:54 am »
It's... a bit complicated.  Maybe it would help if you could explain what exactly you're trying to do.

240
Axe / Re: Music using Freq(
« on: November 02, 2010, 12:35:56 am »
Untested, but based on the source code provided, it looks like it's 47·n + 59 clock cycles per iteration (or on the 84+, 47·n + 61 in RAM, 55·n + 70 in a Flash app.)  Each iteration is only half a cycle of your square wave, though.  So if you wanted to play a tone of 440 Hz, you'd want the frequency parameter to be ((6,000,000 / 880) - 59) / 47 = 144.

For the time parameter, figure each tick is about 47/6 = 7.8333 microseconds, so a second would be 128,000 ticks.  This will vary depending on the frequency parameter, though.  (If you want to play notes longer than 65536, I think it would work so long as you ensure that the time parameter is a multiple of twice the frequency parameter.  Or maybe 1 less.)

Since it's all based on the CPU clock, your mileage will vary - you won't get perfectly precise hardware-independent tones in any case.  Still, you might want to experiment a little.

No, you can't play chords with that routine.

Pages: 1 ... 14 15 [16] 17 18 ... 20