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 - thepenguin77
Pages: 1 ... 36 37 [38] 39 40 ... 108
556
« on: October 07, 2011, 03:48:14 pm »
XOR A where would we be without it.
POP AF/PUSH AF is a great way to move SP 2 places.
Similar to yours, CPD not only decreases DE and BC but checks to see if BC is zero.
EX (SP), HL \ EX (SP), HL - 38 t-states in only 2 bytes.
557
« on: October 07, 2011, 03:38:20 pm »
the game is actually harder in wabbitemu because there is no blur
What ?the game is actually harder in wabbitemu because there is no blur
What ? What ? What ?
Nevermind. This is even cooler than the ice cream I just ate !!!
It's actually a pretty simple concept. The real change in difficulty all happens around triple spikes, which, until this level, were the hardest part of the game. When playing on the calculator, the perfect time to jump is right when your block enters the front of the triple. What is happening is that due to blur, you are not actually inside the triple, but it appears that you are. It is this timing that allows you to clear triples with ease. When the screen is perfect on the other hand, you actually have to time your jump before the spike, which is much harder to do. As a testament to this, I had a guy who had beaten the secret part of the first version of my game about 7 times. When I told him to make a screen shot of it, he couldn't, and I feel this is because without the blur, he couldn't get his timing consistent enough to clear the 50 or so triples in that mode.
558
« on: October 07, 2011, 03:31:16 pm »
It'd still be ridiculously hard to use. The difference would be that you could actually make stuff with it. I support this.
I'd like to point out that BrainF*ck is turing-complete. What this means is that anything that can be done on any modern computer, can be done in BrainF*ck. If you had a lot of time to spare, it is, by definition, possible to factor the Nspire OS key using only BrainF*ck.
559
« on: October 06, 2011, 10:44:50 pm »
I've done flood fills, though, it wasn't for painting or anything, but here's how I did it. 1. Make a buffer the same size as the number of pixels in your drawing area and fill it with 00's. 2. Take all the spaces eligible for filling and mark them with 01 on the new buffer. 3. Mark the space that was picked by the cursor with a 02. This part is a loop: 4. Search the buffer for a 02 5. When you find it, check the 4/8 (depending on implementation) squares around the 2, if they are 1, mark them with 2, if they are 0, do nothing. 6. Mark the current square with a 03 7. Repeat this part Flood fill is over when there are no more 02's left. 8. Find all of the 03's and fill them in back on the original picture This technique should work as long as you don't have a massive buffer. But even if you did have a buffer the size of the screen, a full buffer for this would only require 6,144 bytes. Then, since this method only has values between 0 and 3, you could potentially store 4 pixels to a byte and get your size down to 1,536. If space is not a problem, I also have an optimization to make this technique run faster. Checking the edges can slow the process down because you always have to figure out whether you need to check all 4 sides. This can be avoided by making your buffer 1 extra row wide and 2 extra rows tall. Let's say you have a 16x16 picture. If you make your buffer 17 pixels wide, you'll have 1 pixel boundary along both edges, this would mean you never have to check left/right boundaries. Then, if you give the buffer an extra row on the top and bottom, you can check the whole thing without fear of going over an edge. Just remember, you obviously don't want to perform your buffer operations on that 17th row, just skip it when checking for 02's. Edit: After I wrote this, I wrote a tutorial on it. I've decided that instead of making posts like this, from now on I'll just write tutorials and link them
560
« on: October 06, 2011, 08:40:23 pm »
I promised a screen shot, and here's how far I got. I could probably get a little farther if I played it some more, but this is good for now. I forgot to check the Stat screen, but that should have been about 70% where I died. You'll have to wait until I make a bot if you want the full thing though, the game is actually harder in wabbitemu because there is no blur (crazy right?) so I'm not sure I can beat in in wabbitemu (if at all)
561
« on: October 06, 2011, 03:44:20 pm »
Nope, that is not a issue at all. Right to left or left to right doesn't matter because the update happens so quickly.
562
« on: October 06, 2011, 02:55:18 pm »
If you are sending lines to the screen in TI-OS manner (columns) then it won't really make a whole lot of difference.
But, if you are sending lines row by row, then yes, that will make quite a difference. The reason is because the LCD copies the data to the screen starting at the top. So, if you copy data from bottom to top, you are going to cross paths with the updater twice as often, resulting in twice the interference. In fact, if you manage to calibrate the screen perfectly, you might actually see two glitch lines at once.
It's probably a bit late for your project, but if you are dead set on updating the screen with LDD, you could update the LCD regularly but actually invert your buffer so that the top is at plotSScreen+768-12. I did that in the Impossible game (for other reasons) but it's still a valid technique.
If you are wondering, yes, I have tried to update the screen that way before, so I'm not just assuming it updates top down.
563
« on: October 04, 2011, 03:25:04 pm »
Rather than give you some long and complicated response, here is the code for numbers only:
;##################################### ;The all inclusive typing routine ;input: c = length ; de = curRow ; hl = buffer location ;output: ; b = length ; de = byte after ; hl = beginning ; carry = quit ; zero terminated string ;destroys: ; af, bc ; 2 bytes after length of string
typing: push hl ld (hl), e inc hl ld (hl), d inc hl ld (curRow), de
push hl push bc bcall(_clrTxtShd) pop bc pop hl
ld b, 0
editEntry: set curAble, (iy + curFlags)
typeLoop: call cursorOn typeLoop2: halt push hl bcall(_getCSC) pop hl or a jr z, typeLoop2
push af call cursorOff pop af
cp skEnter jr nz, notEnter
res curAble, (iy + curFlags)
pop hl push hl ld de, 2 add hl, de pop de push de
push bc ld c, b ld b, 0 ldir
pop bc pop hl xor a ld (de), a ret
notEnter:
cp skLeft jr nz, notLeft doLeft: ld a, b or a jp z, typeLoop dec b
dec hl ld (hl), 0 ld de, (curRow) dec d jp p, notOffEdge ld d, 15 dec e notOffEdge: ld (curRow), de ld a, ' ' bcall(_putMap) jp typeLoop
notLeft: cp skDel jr z, doLeft notDelete: cp skMode jr nz, notMode res curAble, (iy + curFlags)
pop hl scf ret notMode: cp skClear jr nz, notClear
ld a, b or a jp z, typeLoop
pop hl push hl ld e, (hl) inc hl ld d, (hl) inc hl push hl
push de ld (curRow), de
push bc ld c, b ld b, 0 inc bc bcall(_memClear)
pop bc ld a, ' ' clearLoop: bcall(_putC) djnz clearLoop
pop de ld (curRow), de
pop hl jp typeLoop
notClear: sub skChs jp c, typeLoop cp skComma - skChs + 1 jp nc, typeLoop
push hl
ld hl, numTable
setFound:
ld e, a ld d, 0 add hl, de
ld a, b cp c jr z, noMore
ld a, (hl)
or a noMore: pop hl jp z, typeLoop
inc b
ld (hl), a inc hl bcall(_putC) jp typeLoop
cursorOn: res curOn, (iy + curFlags) jr readyk cursorOff: set curOn, (iy + curFlags) readyk: ld a, 1 ld (curTime), a ei halt ret
NumTable: .db $1A, "369", 00, 00, 00, 00 .db ".258", 00, 00, 00, 00 .db "0147", $1B
I didn't test it, so it might give you a assembler error somewhere. Also, I left in the little E and the negative sign in case you want to handle them. If you don't, you can just zero them out in the character list.
564
« on: October 03, 2011, 07:52:48 pm »
Basic's Menu( command is acting up. It's giving me an Err: Lbl and once it filled my homecreen with the black dot character (I believe it is FFh).
Fixed - flag
Nope. 84+SE running 2.43. I'll talk to you more about it tomorrow if you like.
Ok, now I fixed it. What I changed the first time didn't do a thing. I must have messed up while testing it. The problem was since zStart was running the program, the system "App" was kExtApps, which is not what is supposed to be running. In reality, kQuit, which is the homescreen, is supposed to be running. End result, everything is back to normal. Don't know what causes it, but sometimes when I press on+vars, it clears ram. It puts the text that says "Archiving" at the top right and immediately turns off.
That sounds terrible. The code looks pretty sound, so I turned off interrupts. It does some weird memory stuff so that was probably the cause. Also, zStart will work on 83+SE's, the only thing that won't work is running on ram clears, which, honestly, I could do.
I have an 83+SE and use it as my Basic coding calc. I would love to put zStart on it. Can it be done? Please?
Edit: Don't even try it on an 83+BE, you won't get very far Edit2: Stupid darl breaking all my apps. The label editor now works better, (no more crashing when you press clear), so 1.3.003 is here.
565
« on: October 02, 2011, 06:53:28 pm »
Ok, so you could be in one of two situations:
1. You have a text string with the numerical data If this is the case, the answer is pretty easy, copy low nibbles of the text data into the data section OP1. Then, take the number of nibbles you copied, add it to 7F, and store that in the exponent field.
Example: Text = 12345 = $31, $32, $33, $34, $35 Copy this into OP1, OP1 = 00 84 12 34 50 00 00 00 00
2. You have a hex number in some register/location This one is way easier. There are two bcalls you'll be interested in. bcall(_setXXOp1) and bcall(_setXXXXOp2). The first one uses A and the second one uses HL. Either way, OP1/OP2 will be formatted correctly.
566
« on: October 02, 2011, 06:43:13 pm »
Oooh, how about you write a mini safe RAM clear program that I and Freyaday can hook to [ON]+[num]? I think that would be the best solution!
Send both of these to the archive and set safeclrr to run on ram clears. Then just run safeclrs to perform the whole operation. I copied the code right from zStart so it should work fine. It doesn't backup appVars on purpose I believe. If it did, you'd run into weird problems. By the way, thepenguin, did you ever release the copy/paste program as an external program so people (me!) can use it on their 83+/83+SEs? I went looking for it the other day but I couldn't find it and couldn't remember if you released it as a stand alone program or not.
Actually, that won't work well at all. The copy/paste uses the extra ram page as scrap space, without that, you wouldn't be able to do much. Also, zStart will work on 83+SE's, the only thing that won't work is running on ram clears, which, honestly, I could do.
567
« on: October 02, 2011, 05:59:35 pm »
Meh, sorry about that. For an alternative, just press ON+VARS, then clear ram. It won't unarchive your stuff, but still works. (It was either that or having BASIC not work so... ) Edit: You guys didn't know it but that routine took up a ton of space.
568
« on: October 02, 2011, 05:53:06 pm »
The run on home option appears to break the Basic Menu( command. It always gives Label errors even if the label is valid.
Fixed - flag Also, I figured out that you can't edit programs in math print.
Fixed The calculator froze when I was at the bottom of the program and selected bottom from the ON+Vars lbl menu.
Fixed I'm still having troubles with the label menu...only things installed are Axe, omnicalc thru zStart, and zStart itself.
Running archived source program from homescreen then opening up the label menu starts it, then when you go to scroll around it does fun stuff (noting that opening it from the edit menu does not glitch)
Fixed - flagish I've also noticed that if I recall a string into a program, and open the label menu and jump to another label and try to scroll to another part of the program, the cursor moves off-screen and my calculator ensuingly crashes.
Fixed - flagish Basic's Menu( command is acting up. It's giving me an Err: Lbl and once it filled my homecreen with the black dot character (I believe it is FFh).
Fixed - flag I had another weird bug today: I assigned a Basic program to a shortcut key. I then ran it. This is what happened:
As you can tell, it showed quotes around every output (and maybe display) when ran from a shortcut. Running it from the homescreen didn't cause this affect. What's going on?
Fixed - flag I have a suggestion. On the font view screen (the one that appears when you press ALPHA whilst editing a char) you currently clear and then refill the screen whenever the cursor is moved. I came up with a way to fix that. Instead of clearing the screen every time, all you have to do it print the char and the char to its left in black-on-white, then move the cursor, then do whatever! I even wrote an Axe program that'll do it! Lemme know if you'd like it.
Done Oh! UnArchive prgm and Archive prgm don't work. it just tries to run the program.
Fixed - worked with any two byte token Sometimes when I try to edit an archived program, it just goes to the homescreen and displays done.
Fixed I'm still having troubles with the label menu...only things installed are Axe, omnicalc thru zStart, and zStart itself.
Running archived source program from homescreen then opening up the label menu starts it, then when you go to scroll around it does fun stuff (noting that opening it from the edit menu does not glitch)
Not sure if this is fixed already, but lately while editing from the homescreen, label jumping works correctly about 1 out of, say, 20 times..?
Fixed - flagish I found this out because very often i am not allowed to edit programs with prgm, right, select. Not sure if that is zstart though.
Fixed Also, I've noticed the label menu doesn't handle a lowercase L at all, it just skips it. So if I had a label named
Lbl Sml In the label menu it would show up as
Snm Fixed - TI handles lowercase letter in a terrible way I noticed that if you press enter without typing anything in the name new font thing, it creates a strange appvar that messes with the mem menu. I encountered it accidentally.
Fixed However, all of these fixes come at a price. I had to get rid of the safe ram clears. I feel like no one uses them (at least I don't) so they're gone. The reason I needed this is because I was just flat out running out of space. Oh, zStart crashes nspires with the 84 keypad And isn't zstart supposed to let you jump to the source of the problem when Axe has an error? If so, it's not working for me.
84+ keypad doesn't surprise me, though, the only thing that should crash it is the grayscale stuff. I don't think I used any undocumented instructions. I also never planned on going to the source of a problem with axe. If it works, cool. (Though it doesn't sound like it does.)
569
« on: October 01, 2011, 04:35:45 pm »
Oh, sorry, I mis-typed there. This routine allows you to type letters, but you can remove that ability.
This routine will get the numbers for you. It also allows you to type letters, but you can remove that ability* To get rid of letters, just take out the alpha and 2nd functionality and make sure it always chooses a letter from NumTable:. It saves the text wherever you want it to, just pass it HL. (It destroys 2 extra bytes after the maximum length you specify for the string)
570
« on: October 01, 2011, 03:00:03 pm »
For getting the text, here's an awesome routine I made.
;##################################### ;The all inclusive typing routine ;input: c = length ; de = curRow ; hl = buffer location ;output: ; b = length ; de = byte after ; hl = beginning ; carry = quit ; zero terminated string ;destroys: ; af, bc ; 2 bytes after length of string
typing: push hl ld (hl), e inc hl ld (hl), d inc hl ld (curRow), de
push hl push bc bcall(_clrTxtShd) pop bc pop hl
ld b, 0
editEntry: set shiftAlpha, (iy + shiftFlags) res shiftLwrAlph, (iy + shiftFlags) set curAble, (iy + curFlags)
typeLoop: call cursorOn typeLoop2: halt push hl bcall(_getCSC) pop hl or a jr z, typeLoop2
push af call cursorOff pop af
cp skEnter jr nz, notEnter
res curAble, (iy + curFlags) res shiftLwrAlph, (iy + shiftFlags) res shiftAlpha, (iy + shiftFlags)
pop hl push hl ld de, 2 add hl, de pop de push de
push bc ld c, b ld b, 0 ldir
pop bc pop hl xor a ld (de), a ret
notEnter: cp sk2nd jr nz, not2ndz
res shiftLwrAlph, (iy + shiftFlags) res shiftAlpha, (iy + shiftFlags) jr typeLoop
not2ndz: cp skAlpha jr nz, notAlpha
set shiftAlpha, (iy + shiftFlags) ld a, (iy + shiftFlags) xor %00000001 << shiftLwrAlph ld (iy + shiftFlags), a jr typeLoop
notAlpha: cp skLeft jr nz, notLeft doLeft: ld a, b or a jp z, typeLoop dec b
dec hl ld (hl), 0 ld de, (curRow) dec d jp p, notOffEdge ld d, 15 dec e notOffEdge: ld (curRow), de ld a, ' ' bcall(_putMap) jp typeLoop
notLeft: cp skDel jr z, doLeft notDelete: cp skMode jr nz, notMode res curAble, (iy + curFlags) res shiftLwrAlph, (iy + shiftFlags) res shiftAlpha, (iy + shiftFlags)
pop hl scf ret notMode: cp skClear jr nz, notClear
ld a, b or a jp z, typeLoop
pop hl push hl ld e, (hl) inc hl ld d, (hl) inc hl push hl
push de ld (curRow), de
push bc ld c, b ld b, 0 inc bc bcall(_memClear)
pop bc ld a, ' ' clearLoop: bcall(_putC) djnz clearLoop
pop de ld (curRow), de
pop hl jp typeLoop
notClear: sub skAdd jp c, typeLoop cp skMath - skAdd + 1 jp nc, typeLoop
push hl
ld hl, numTable bit shiftAlpha, (iy + shiftFlags) jr z, setFound ld hl, lowTable bit shiftLwrAlph, (iy + shiftFlags) jr nz, setFound ld hl, charTable
setFound:
ld e, a ld d, 0 add hl, de
ld a, b cp c jr z, noMore
ld a, (hl)
or a noMore: pop hl jp z, typeLoop
inc b
ld (hl), a inc hl bcall(_putC) jp typeLoop
cursorOn: res curOn, (iy + curFlags) jr readyk cursorOff: set curOn, (iy + curFlags) readyk: ld a, 1 ld (curTime), a ei halt ret
CharTable: .db $22, "WRMH", 00, 00 .db "?", $5B, "VQLG", 00, 00 .db ":ZUPKFC", 00 .db " YTOJEB", 00, 00 .db "XSNIDA"
NumTable: .db "+-*/^", 00, 00 .db $1A, "369)", 00, 00, 00 .db ".258(", 00, 00, 00 .db "0147,", 00, 00, 00, 00 .db $1C, 00, 00, $12, $11, 00
lowTable: .db $22, "wrmh", 00, 00 .db "?", $5B, "vqlg", 00, 00 .db ":zupkfc", 00 .db " ytojeb", 00, 00 .db "xsnida"
This routine allows you to type letters, but you can remove that ability.
Then, as far as making a number out of it. You could probably parse it yourself, and if you can't do that, you might be able to save it as a string and parse it into a TI float, though, I don't really know how to do that. (Probably undocumented.)
Pages: 1 ... 36 37 [38] 39 40 ... 108
|