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

Pages: 1 ... 303 304 [305] 306 307 ... 317
4561
General Calculator Help / Re: BASIC (Ab)Uses of Assembly Opcodes
« on: November 21, 2010, 01:12:28 am »
Okay, say you want to make a rectangle with one corner at the pixel coordinate (8,8) and the opposite corner at (17,26). Converted to hex and you get:
(8,8)=   (08,08)
(17,26)=(11,1A)

For this opcode, you need to switch the coordinates around:
1st coordinate: 210808
2nd coordinate:111A11
Then you just choose your rectangle method.

4562
General Calculator Help / Re: BASIC (Ab)Uses of Assembly Opcodes
« on: November 21, 2010, 01:04:17 am »
The cool part is that you can combine codes like this:

210000
112F1F
EF5F4D

213020
115F3F
EF5F4D

C9

That was my whole premise to my ASMDRAW programs.

4563
General Calculator Help / Re: BASIC (Ab)Uses of Assembly Opcodes
« on: November 21, 2010, 12:34:58 am »
Thanks! I didn't even notice that, so thanks all! If anybody has questions about these opcodes or ideas, feel free to let me know. I only have a few ideas... (my next one will be how to make an assembly library).

4564
General Calculator Help / Re: BASIC (Ab)Uses of Assembly Opcodes
« on: November 21, 2010, 12:17:59 am »
Okay, so anyway, here is the next thing, something I mentioned in my previous post. Rectangles. This was the first thing I cracked as a BASIC programmer.
Here is a rectangle that inverts the upper left quarter of the screen:
210000
112F1F
EF5F4D
C9

Again, the blue has rules...
  • 210000 is what determines the upper left coordinate. The first 00 is the left coordinate and the second 00 is the upper coordinate. 5F and 3F are the maximums, respectively
  • 112F1F is the lower right coordinate where the 2F is the right coordinate (2F=47) and the 1F is the lower coordinate (1F=31)
  • EF5F4D is a B_Call, but if you change the 5F to certain values, you get a different style of rectangle as listed below
IMPORTANT: if you put incorrect coordinates such as coordinates going off the screen or where the right coordinate is smaller than the left, you will crash your calculator.
EF5C4D-Clear Rectangle
EF624D-Fill Rectangle
EF5F4D-Invert Rectangle
EF7D4D-Rectangle Border
EF864D-Clear Rectangle Border
EF8C4D-Draw Border, Clear inside

4565
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: November 20, 2010, 01:37:36 pm »
What? It wasn't MY code! :D

4566
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: November 20, 2010, 01:34:51 pm »
Code: [Select]
Prompt E,N
If N(E=2
Disp "NRML
If E=2 or N=1
Disp "ALMST NRML
If ((N!=1)E!=2
Disp "WEIRD

I had no idea of this tricks though :P
Ah, well, it didn't work for me... It just displayed all three phrases.

4567
General Calculator Help / Re: BASIC (Ab)Uses of Assembly Opcodes
« on: November 20, 2010, 01:27:42 pm »
Okay, well here is a bit of a rundown... Back in 2008, my school loaned out TI-84+s to anybody interested, so I borrowed one as did most of my friends (only one of whom programs them). I started learning BASIC and after about a three months I had a cool RPG. It was right around the first time I broke my first assembly code to make it do what I wanted (the next one I plan to post), so it used maps made in assembly even though I had no assembly knowledge (I knew hex as a number system, of course). I had 60 items, monsters to fight, experience, stats, background stats, and my other pride: Polar Sprites (that is what I am calling them :D). Every sprite used 8 bytes and if it used less, I made it take 8 bytes so that I could easily do sub(Str1,8A+1,8→r1 where A is the monster number. I gave it to a bunch of friends, but two things went wrong. One, at the end of the year, we handed our calcs back in, and two, I had no cords to transfer it to a computer. In fact, my program, which was only about 6000 bytes in total, I put in by hand on each of the calculators.

Now, the game was mostly designed around the battling, so when you were on the map, you were just a pixel, but in the battle, the monsters had full fledged sprites that looked AWESOME. My favorite was Maxpider. The map was split up into 9 areas that had there own monsters and there was a house to enter in the center section to buy stuff and whatnot. Later on in the development, I made a program called Codem2 for cheats in my games and I made two maps to play on, but you only got to play on one which was decided at the beginning.

!!!! I just found some notes from the last time I tackled this project ♥. It is a little outdated, now, but this is what I have. (outdated because it was before I had SpriteLib and a few other programs).

Also, I am not going to guarantee that I will work on this much, but I do go back to it every now and then. I have a few other projects that I am working on as well on top of college where I am trying to complete my first major in the first two years, so I have my plate half full already :D

Edit crap, forgot to upload the files. Oh well, here are the polar coordinates at least taken from my notes:
Code: [Select]
T represents theta

Xmin=-pi/2
Xmax=pi/2
Ymin=-62pi/188
Ymax=62pi/188

I'll probably multiply the limits by 2 for the game
================================================================
Bufli sin(sin(tan(T
Magfly sin(cos(tan(T
Attack Master sin(tan(tan(T
Wataray cos(sin(tan(T
--- cos(cos(tan(T
Maxpider cos(tan(tan(T
Bufli (big) tan(sin(tan(T
Magfly (big) tan(cos(tan(T
Los-Wei tan(tan(tan(T


Eye sin(T+sin(T+sin(T
--- sin(T+sin(T+cos(T
Psyita sin(T+sin(T+tan(T
--- sin(T+cos(T+sin(T
--- sin(T+cos(T+cos(T
Shalka sin(T+cos(T+tan(T
??? sin(T+tan(T+sin(T
Healer sin(T+tan(T+cos(T
Sabem sin(T+tan(T+tan(T
--- cos(T+sin(T+sin(T
--- cos(T+sin(T+cos(T
??? cos(T+sin(T+tan(T
--- cos(T+cos(T+sin(T
Side Eye cos(T+cos(T+cos(T
??? cos(T+cos(T+tan(T
??? cos(T+tan(T+sin(T
Water Demon cos(T+tan(T+cos(T
??? cos(T+tan(T+tan(T
--- tan(T+sin(T+sin(T
--- tan(T+sin(T+cos(T
--- tan(T+sin(T+tan(T
--- tan(T+cos(T+sin(T
--- tan(T+cos(T+cos(T
??? tan(T+cos(T+tan(T
??? tan(T+tan(T+sin(T
??? tan(T+tan(T+cos(T
??? tan(T+tan(T+tan(T

4568
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: November 20, 2010, 01:15:59 pm »
Code: [Select]
:Prompt E,N
:If E=2 and N=1
:Disp "NRML
:If E != 2 or N!=1
:Then
:If E=2 or N=1
:Then
:Disp "ALMST NRML
:Else
:Disp "WEIRD
80bytes, for the first challenge

This is missing two end statements plus it could be optimized to this:
Code: [Select]
Prompt E,N
If N(E=2
Disp "NRML
If E=2 or N=1
Disp "ALMST NRML
If ((N!=1)E!=2
Disp "WEIRD

Yours uses 6 bytes more, and mine is not missing two end statements. It is the end of a program so it does not need them.

4569
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: November 20, 2010, 12:54:21 pm »
Where do you find this code ?
I made it :D It took me about 17 minutes, but I made it :D

4570
Axe / Re: Drawing flipped sprites.
« on: November 20, 2010, 12:53:16 pm »
Well, you can not edit the archive directly, but you can definitely invest in Grouping. Press [2nd][mem][8] and you can backup your RAM. After a RAM clear, just Ungroup from the same menu.

I don't know much about Axe, myself, but I do program in hex on the calculator. It is my primary method of programming :D, so it can be done.
And welcome to Omnimaga!

4571
BatLib / Re: SpriteLib
« on: November 20, 2010, 12:40:32 pm »
Actually DJ, I am glad you mentioned that. I have a few getKey routines floating around on my computer and on TICalc that I plan to use for this program. One of them will let you press up to two keys and return a real result (0 to 3191) that is unique for any two key presses, one that lets you test certain key groups for up to 8 keys at a time, and one that will just tell which keys are being pressed using a 7 element list as the output. I don't know when the last one will be added because the format will have to change a little for the parser hook, but the others are ready right now.

4572
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: November 20, 2010, 12:29:51 pm »
Okay, here is what I have, weighing in at 208 bytes of code:
Code: [Select]
ClrHome
Input "BASE1:",B
Input "BASE2:",C
Input "NUMBER:",Str1
DelVar D"0123456789ABCDEFGHIJKLMNOPQRSTUV→Str2
length(Str1→E
For(A,1,E
D+B^(E-A)(-1+inString(Str2,sub(Str1,A,1→D
End
iPart(log(D)/log(C
Ans-not(not(fPart(Ans→B
For(A,0,B
D/C^(B-A→D
Str1+sub(Str2,iPart(Ans+1),1→Str1
C^(B-A)fPart(D→D
End
sub(Str1,E+1,B+1

4573
BatLib / Re: SpriteLib
« on: November 20, 2010, 07:23:35 am »
I have six commands working, but they are pretty random and don't do much yet. This is from my notes:
Code: [Select]
Getkey 0,0
PauseKey 1,0
VarEditByte 2,Type,value,offset,"name"
ASMHex 3,"opcode"
HexToken 4,"hexstring"
LoadData 5,CharStart,#Chars
I plan to change the order of the commands, so I am not going to upload it yet. Plus, I have not made the APP with the new updates yet. I made a fun little program that makes a hook identical to the one made by the app until it gets to the functions. At that point, it loads the app at 4000h and uses the calls in the app. This will let me test the code without having to make an app every time. It is better to debug in RAM rather than Flash.

4574
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: November 20, 2010, 06:36:20 am »
Yeah, yeah, yeah. I know, I just copied my program from my calc...

4575
TI-BASIC / Re: [CHALLENGE]Logic and Optimization
« on: November 20, 2010, 06:26:51 am »
Does it need to ask specifically for eyes and noses? Or can it just be something like Prompt I,N?
53 bytes of code
Code: [Select]
Prompt I,N
sum({I,N}={2,1→I
"NRML
If not(I
"WEIRD
If I=1
"ALMST "+Ans
Ans

Edit: Removed Pause

Pages: 1 ... 303 304 [305] 306 307 ... 317