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

Pages: 1 ... 12 13 [14] 15 16 ... 20
196
TI Z80 / Re: Chess
« on: March 01, 2011, 10:21:33 pm »
Yeah, but he said including the king. It should never be possible to actually capture the king, because it's illegal for your opponent to make a move that lets you do so.

197
Other Calculators / Re: I know a TI staff!
« on: February 28, 2011, 04:58:19 pm »
Or, ask for USB port documentation.
For the Nspire? We already found that, actually.

198
Other Calculators / Re: Ti-NSpire getkey function.
« on: February 28, 2011, 04:19:03 pm »
It's not exactly a "trojan" - that implies a program. Downgrade protection has always been there, previous OSes just always had the minimum allowed version field to 1.1.9253 (non-CAS) or 1.1.9170 (CAS) - the earliest production versions - so you never saw it.

It's not illegal, because TI never said you had the ability to downgrade the OS. In fact, the manual always said you couldn't.

199
TI Z80 / Re: Chess
« on: February 28, 2011, 12:06:28 am »
This looks like a lot of fun, you should see if you can at some point transfer it to the Nspire. Please
I'm sure it will work on the 84+ emulator included with the regular Nspire. :)
It runs (and you can exit it if you know the right keys to press) but you can't see anything but a white screen. I think TI's emulator doesn't support IM 2 interrupts.

200
TI Z80 / Re: Chess
« on: February 27, 2011, 01:37:53 pm »
This is just impressive! I love playing chess, and sometimes I like an opponent to play against.

One bug I noticed though (I think): if you choose a piece (say the rook on A1 in the beginning), but that piece cannot move anywhere, I cannot deselect the rook and choose another piece.
It works for me. (press Clear to de-select)

201
Other Calculators / Re: TI-Nspire prototype 1.1.7320
« on: February 27, 2011, 01:35:20 pm »
According to the above tests, it seems that prototype cannot exchange data through USB.
Where is the USB linking code?
In the OS? In the Boot2? In both of them?

Both of them. But judging from the picture you posted, this boot2 is noticeably smaller than the later versions (0x1742EC bytes uncompressed, compared to 0x199B58 bytes for 1.1.8310) so most likely the linking code is not present in it.

202
News / Re: More free space on your Nspire with TNOC
« on: February 27, 2011, 12:55:23 pm »
You can't delete the compressed copies of the language files inside the OS file (in the 8200 field in TI-Nspire.img), the OS won't validate if that's modified. Maybe you could delete the uncompressed files from the filesystem, but you would need an Ndless program or something for that.

203
TI Z80 / Re: Chess
« on: February 27, 2011, 02:03:54 am »
Pretty nice. The AI occasionally works surprisingly well for being so simple. More often it doesn't do too well though, I've seen it just leave pieces undefended and let me take them for no reason. I guess the Z80 probably isn't powerful enough for something super sophisticated, though.

One bug I noticed: Queenside castling is broken... it moved the wrong rook (from the h-file to the f-file, instead of a- to d-), and overwrote my bishop :(

204
TI-Nspire / Re: TI-Nspire emulator
« on: February 26, 2011, 01:35:55 pm »
That's not what I mean, I have set the standby time to 30 minutes  ;)

My output looks more like
Code: [Select]
usb reset
usb reset
usb reset
...

And the calculator doesn't crash.
Yes. With the new modifications to the USB code, the symptoms have changed, but it's still the same bug. And I still don't see it any sooner than whatever the standby time is set to (unless emulation is sped up by pressing "`" or something)

205
TI-Nspire / Re: TI-Nspire emulator
« on: February 26, 2011, 01:21:51 pm »
I have just experienced a bug, after idling around in the nspire home screen for some minutes, the console starts spamming usb resets and I can't send any files... I have used 0.41 before and haven't had this error.

This is actually not new, there have always been problems when the OS tries to go into standby (after 3 minutes of idleness). In previous versions, you would see an infinite loop of unsupported USB port accesses:
Quote
Warning at PC=10374D2C: Bad read_word: b00001bc
debug> c
Warning at PC=10374D50: Bad write_word: b00001bc 00000000
debug> c
Warning at PC=10374D2C: Bad read_word: b00001ac
debug> c
Warning at PC=10374D2C: Bad read_word: b00001bc
debug>

206
Other Calculators / Re: TI-Nspire prototype 1.1.7320
« on: February 25, 2011, 08:19:27 pm »
The nand reader seem to freeze randomly.
(after severall minutes with the down-arrow key stuck)
I checked out this routine in DIAGS 1.1.9266 (it's still there, just not called from anywhere, so I can test it in nspire_emu by hex-editing) and it has a bug - it uses another 72 bytes of stack memory every time you move up or down. Since the stack is only 32kB, this means after about 70 flash pages (420 movements) it will corrupt the heap :(

If you want to save a little time (and a lot of wear on the keypad connector) by not having to reboot, just leave the reader (by pressing esc - going back to the address entry screen with enter does not free the memory) whenever you've gone far enough that it's about to freeze.

207
I currently need more development workforce than testing. How about implementing the Touchpad keypad protocol from Goplat's spec? :)

Did you want to implement the I2C code? It might be easier to just make syscalls for the OS functions for read/write. Quick example of usage: (for OS 2.0.1 non-CAS)

Code: [Select]
#include <os.h>

// returns 0 on failure, 1 on success
// addresses are for 2.0.1 non-CAS
#define touchpad_read ((int (*)(unsigned char start, unsigned char end, void *buf))0x10174A48)
#define touchpad_write ((int (*)(unsigned char start, unsigned char end, const void *buf))0x10174B38)

static inline void clearScreen() {
  memset(SCREEN_BASE_ADDRESS, 0xFF, SCREEN_BYTES_SIZE);
}

static inline void setPixel(int x, int y, int color) {
  unsigned char* p = (unsigned char*)(SCREEN_BASE_ADDRESS + ((x >> 1) + (y << 7) + (y << 5)));
  *p = (x & 1) ? ((*p & 0xF0) | color) : ((*p & 0x0F) | (color << 4));
}

int main() {
  int cpsr;
struct {
unsigned char width[2];
unsigned char height[2];
} size;
int width, height;

// be sure to turn interrupts off when accessing a different touchpad page
// TI's interrupt handler expects it to be set to page 4
asm ("mrs %0, cpsr" : "=r" (cpsr));
asm ("msr cpsr_c, %0" : : "r" (cpsr | 0xC0));
touchpad_write(0xFF, 0xFF, "\x10");
touchpad_read(0x04, 0x07, &size);
touchpad_write(0xFF, 0xFF, "\x04");
asm ("msr cpsr_c, %0" : : "r" (cpsr));

width = size.width[0] << 8 | size.width[1];
height = size.height[0] << 8 | size.height[1];

clearScreen();

while (*(int *)0x900E001C & 0x80) { // loop until ESC pressed
struct {
unsigned char contact;
unsigned char proximity;
unsigned char x[2];
unsigned char y[2];
} cur;
int x, y;
touchpad_read(0x00, 0x05, &cur);
if (cur.contact) {
x = cur.x[0] << 8 | cur.x[1];
y = cur.y[0] << 8 | cur.y[1];
x = x * 319 / width;
y = 239 - (y * 239 / height);
if (x >= 0 && y >= 0 && x < 320 && y < 240)
setPixel(x, y, 0);
}
}

return 0;
}

208
TI-Nspire / Re: TI-Nspire emulator
« on: February 25, 2011, 12:04:31 pm »
Will this version run at accurate speed?
Timing is the same as it always was (1 instruction per cycle). I may make it more accurate at some point, but various features of the CPU make exact cycle timing impractical.

Does this mean that we now have enough information on the USB controller to implement on-calc drivers?
I think we already did: we know that it's Freescale's USB OTG module, revision 0x42; you can find documentation of it in the MCF54455 reference manual (the MCF54455 is not related to the TI-Nspire but just happens to use the same revision of this module). The host interface is based on EHCI 1.0.

209
TI-Nspire / Re: TI-Nspire emulator
« on: February 25, 2011, 01:28:57 am »
So is there a download here? (and yeah, that can be a little troublesome)
See below.

Are there any plans to support color from the CX?
Perhaps. The CX isn't just a normal Nspire with a color screen. We know it has extra RAM and flash - what else in the hardware might have changed? We'll just have to wait and see.

Yay for that. Will there be another linux-compatible release? :)
Someone else made that, not me. I'm not familiar with Linux GUI libraries.

Anyway, here's the new version, 0.50:
  • Implement enough USB emulation to get file sending to work. This is a big milestone: No more OS-version-dependent code! :D Yes, that's right, you can now send documents to any OS version, past, present, and (hopefully) future.
  • After an error, debugger command "c" now resets rather than quitting.

210
TI-Nspire / TI-Nspire emulator
« on: February 25, 2011, 01:20:07 am »
This topic is the new home for nspire_emu, the TI-Nspire emulator with the highly uncreative name.

Current version: v0.70 (post, download)

Pages: 1 ... 12 13 [14] 15 16 ... 20