1036
News / Re: Grayscale chess with AI
« on: March 26, 2011, 12:03:18 am »
If you have pieces, I'd love to see them. Although they need to fit in 8x8 squares.
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. 1036
News / Re: Grayscale chess with AI« on: March 26, 2011, 12:03:18 am »
If you have pieces, I'd love to see them. Although they need to fit in 8x8 squares.
1037
ASM / Re: Bezier curves HELP!!« on: March 25, 2011, 10:51:44 pm »
Well, that's technically a yes. But in all reality, it doesn't matter at all. The only time it matters is when you are sending commands 4-7 which set the way the driver moves after each write (up, down, left, right). But at least on wikiTI it says both the x/y and the vertical/horizontal, so you don't have to worry about it.
Also, it's pretty easy to remember that the columns start at $20 and the rows start at $80. Those are the two numbers you'll need if you write a graphBufferCopy routine. 1038
News / Re: Grayscale chess with AI« on: March 25, 2011, 10:30:43 pm »
Hey, there should be an update for this coming pretty soon. I just got finished adding in the ability for AI to see if a piece is unprotected.
After I put some check checks in castling and fix the new problems created by ^^ (putting king in check is now the greatest move ever), you'll have a new version. 1039
ASM / Re: What happens when a calculator crashes...« on: March 25, 2011, 05:28:11 pm »
Sir, I would say that it must go to the boot code. My reasoning for this is that if no OS is present, jumping to 0000 will just cause a rst 38h which will loop into oblivion. The way to test would be to write a jump at 0000 and at 0053 and see which one gets on crashing.
1040
ASM / Re: Pixel on/off, drawing lines« on: March 25, 2011, 05:20:33 pm »
Nobody's given a diagonal line routine yet This one comes from Missile.
You need to define (increment) somewhere. I believe you also need a getpixel that takes de = xy for input and doesn't destroy anything. Code: [Select] ;###############################
1041
ASM / Re: Bezier curves HELP!!« on: March 25, 2011, 05:13:17 pm »
Sorry for the over your head stuff, lately I've been tending to write pretty cryptic code for optimizations. Like using a loop to do x then y, but that's just easier for me I guess.
When I say .256 decimal, I mean fixed point decimal, but in a very specific way. First you take your typical 1 byte value, and place it in the high byte of a two byte number. The lower byte of that two byte is now its decimal place. So just treat it like a two byte number, and when the time comes to see what the value is, only read the upper byte. As for updating the LCD, that example right there is a clean as it gets (I love DWAIT.) Just make sure that you grab the byte from the buffer, or else you will overwrite the old bits with white. 1042
ASM / Re: Disable "Done" message« on: March 23, 2011, 05:38:48 pm »Just as a small spot of randomness, I have been working on a .TAB thing for TASM in case I ever get around to manually converting my programs to mnemonics... is it bad practice if I do things like making ld hl,bc or if I change FE00 to B7 and whatnot? I've always thought it would make source codes much easier to read with things like: Xeda, I wouldn't do that. It makes things slightly easier, but it causes way more problems than it fixes. For one, while those look like 1 or 2 byte instructions, ld bc, (hl) is 4 bytes long. Sometimes you will have optimized ways to do those routines, for instance if h is already 0. And the main problem with this is that it will make your code incompatible with other people. Plus, it's not much harder to just write ld h, 0 \ ld l, a and that way you know what is really going on. 1043
Casio Calculators / Re: I wish CFX-9850G series were still in production and had ASM support« on: March 22, 2011, 10:40:07 pm »
Holy necropost batman! 18 months!
(I've always wanted to say that) 1044
ASM / Re: Bezier curves HELP!!« on: March 22, 2011, 08:53:54 pm »
I was bored, so here is that demo I talked about. It uses 256 point decimal, which is great for physics applications.
It is also commented for clarity. 1045
Axe / Re: Shutdown command/asm line« on: March 22, 2011, 05:46:18 pm »
So...
Code: [Select] :[110F0019117298011000EDB0C37298EFF142EB5E235621959DEF5743EF0850]->GDB000 That ought to work. Just define GDB000, or whatever you want to call it, then run that little bit of code. The calculator should turn off. Code: [Select] sizeToAdd: Needless to say, you should not run this from within Mirage. Nothing good can happen basically. 1. Program is in ram: The routine will find either the correct size, or random garbage, at which point it will delete your program, and possibly all of ram including the VAT. Or nothing if it's pointing to 0000's. (I've had like 31KB legitimately free before.) 2. Program is in flash: The routine will find some garbage value for the size and will delete all kinds of things in ram either giving you positive or negative memory leaks. But your program should still be intact. Basically, just don't do it. 1046
Axe / Re: Shutdown command/asm line« on: March 21, 2011, 11:19:47 pm »
Here it is. This will turn the calculator off properly with no memory leaks, the only downside is it's a little big.
Asm(21 E1 E5 22 72 98 3E C9 32 74 98 CD 72 98 11 0F 00 19 11 72 98 01 10 00 ED B0 C3 72 98 EF F1 42 EB 5E 23 56 21 95 9D EF 57 43 EF 08 50) Put the name of your program in OP1 and run this, it deallocates your program and turns the calculator off. Needless to say, you should not run this from within Mirage. Code: [Select] ld hl, $E5E1 ;pop hl, push hl Edit: I don't know much about axe, but if you can get a pointer to the start of this routine, I can make it substantially smaller. 1047
Axe / Re: Program DRM?« on: March 21, 2011, 10:49:32 pm »
I have no idea on the Nspire, that's in Ti/Calc84's hands.
If it's an emulator, it appears that it just returns, at least that's what it did when I just watched it in wabbitEmu. It returns NZ if it couldn't get the ID, but I don't know how to check that in Axe. 1048
ASM / Re: Bezier curves HELP!!« on: March 21, 2011, 09:38:59 pm »
First off, I love how this is structured, nested loops are so cool and clever. But it's amazing that such a small mistake can cause the entire program to fail.
You had: Code: [Select] ld h, a You wanted: Code: [Select] ld h, 0 Down in your problem area. By putting time in l, then reading it from h, you are essentially dividing it by 256. I attached a file with some edits I made to it, it works fine with just that little change, but these are just some things to help you. For instance, I think it just looks better to render from left to right, but that might just be me. The lines don't come out that pretty because you are getting some serious rounding issues (11 rounds per pixel), so I would suggest making all of your number .256 decimal, but of course that requires a complete rewrite. I'll see if I can give you an example so you can see what it would look like. And lastly, you can get some serious speed improvements by using a custom GrBufCpy, or even better yet, only plot the current byte in the LCD driver, but that's a bit advanced. 1049
Axe / Re: Program DRM?« on: March 21, 2011, 08:41:37 pm »
Fill OP4 with some default value, (in case the calc has no ID (emulators)). Asm(EF7E80) then look in OP4 for the CalcID, it is 5 bytes long. (I don't know where OP4 is in Axe, but I'm sure you can find it, it's 8499h in memory.)
1050
Web Programming and Design / Re: RFG Image Uploader« on: March 21, 2011, 08:14:57 pm »
Great website. So much easier than using photobucket or the like.
|
|