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 ... 143 144 [145] 146 147 ... 317
2161
ASM / Re: ASM Optimized routines
« on: March 12, 2012, 02:50:35 pm »
Wow, I am surprised I haven't posted these in this topic as I have been very proud of them for a long while now. They make a legitimate use of RRD and RLD, so for those questioning the use, check it out:
Code: [Select]
ShiftScreenRight4:
;Shifts the graph screen right 4 pixels
     ld hl,plotSScreen
     ld c,64
       xor a
       ld b,12
         rrd
         inc hl
         djnz $-3
       dec c
       jr nz,$-9
     ret
ShiftScreenLeft4:
;Shifts the graph screen left 4 pixels
     ld hl,plotSScreen+767
     ld c,64
       xor a
       ld b,12
         rld
         dec hl
         djnz $-3
       dec c
       jr nz,$-9
     ret
It is the same size as shifting 1 pixel, though 7680 cycles slower. That is still about 1 bazillion times faster than shifting left or right 1 pixel, 4 times. I've been using these for years in my graphics related programs x.x I hope they prove useful!

EDIT: In this case, 1 bazillion == 88664, apparently. To run the shifting right code once, it is 22166 cycles. The above codes use 29846 cycles.

2162
TI-BASIC / Re: Zeda's Hex Codes
« on: March 12, 2012, 02:40:42 pm »
Yay, a necropostable topic! I cannot believe I never added these two codes, these are codes I am proud of for making!

Shift screen right 4   (Added v1.32)
  2140930E40AF060CED672310FB0D20F5C9
    This will shift the screen right 4 pixels.
Shift screen left 4   (added v1.32)
  213F960E40AF060CED6F2B10FB0D20F5C9
    This will shift the screen 4 pixel left.

Also, for completeness:

Shift screen up 4   (added v1.32)
  21709311409301D002EDB0EB013000EF304CC9
    This will shift the screen 1 pixel up.

Shift screen down 4   (added v1.32)
  210F96113F9601D002EDB823013000EF304CC9
    This will shift the screen 1 pixel down.

I wonder what else I should add...

2163
Cool! I cannot wait to see what the topic is!

2164
News / Re: Site Updates and New Managment
« on: March 12, 2012, 10:08:59 am »
Hmm, the issue is that downrating will not necessarily deter a troll. A troll will see it and think it is funny and go for more. I remember back when this was being discussed a while ago (I think well over 6 months ago, actually), that DJ_O had a great idea:

Show two stats: All your upvotes and all your downvotes.

I don't pay much attention to my respect level, so under the old system, I wouldn't notice a few downvotes, so I would not notice that I had a bad post. However, if I saw a sudden spike in negative posts, I would be worried.

Plus, I know this might deter some folks from rating somebody down, especially a well respected member, for no reason. If a post had +15 uprates and a trollish person decided it wasn't really worth it and should be knocked down some, they might go to downrate it. This would be a noticeable action. I have had -5 downvotes in my history here, so I would notice if one day it went down when the only post I made got 14 uprates.

2165
Grammer / Re: Grammer Q&A
« on: March 12, 2012, 09:43:53 am »
I think I am about to complicate matters .__.
But I'm still kind of new to this data editing stuff with appvars and hexcode and stuff like that. So are appvars solely hexadecimal? And when I create a new one is it just a series of zeros until I write other data to it?
Appvars are whatever you want it to be. However, in Grammer, you have a few ways of editing them, including writing bytes to it through hexadecimal and numbers. For example, if Z points to the appvar:
int(Z,37 will write to the first byte of data the value 37.  The number is 0 to 255 and can be a variable.
Z[(111213 will write 3 bytes to Z in hexadecimal. They are 11h, 12h, and 13h. in decimal, that is 17,18, and 19.
Z[77,23,47 will write three bytes to Z, also

And there are a few more ways to do this. Basically, if you write a byte at Z+13, when you read it, it should be the same.

As for creating new vars, the data is filled with all zeros until you write to it :) It used to contain data that was not necessarily all zeros, but  changed that, so that is a good question.
And are tokens one byte each?
Not all tokens are 1 byte each. Some are 2 bytes :/
I am curious about what you are going for here :D
You say the tilemap data is series of numbers, so is it 0000 for four tiles or 00000000 for four tiles? And is zero the first tile or no tile at all? And do I need to convert the hex to token? I plan to store everything in appvars.
Hmm, tilemap data is a series of bytes. So however you want to think of bytes is how tiles are stored. If you think of them as two hexadecimal digits smushed together, then 00000000. If you think of them as just solitary bytes, they can be 0000.

0 is the first tile, indeed. And there is no need to write hex or tokens as you can just do something like int(Z,0. However, if you have the data sitting somewhere you can copy it using the solve(1 command. It might be a bit tricky, though.

To save space, how can I have no tiles at a position, without having a blank sprite in the tileset? Or do I need to do that, have the blank sprite as the first sprite?
You will need a blank tile in the set :/ it does not need to be the first sprite, technically, but I normally do that. If you make it the second sprite, for example, then to write a blank tile, you would use tile 1 instead of tile 0.

2166
News / Re: Site Updates and New Managment
« on: March 11, 2012, 11:53:58 pm »
Awesome, congrats, guys!

2167
Other Calculators / Re: History of the TI community
« on: March 11, 2012, 08:44:09 pm »
I've never seen that one, but his Uncle Worm is probably one of the best-known TI-83 Plus games of all time. And from the links on his TI|BD page, I found out that he's ported it to Android.
I've heard of it but never played it O.O
That's funny—a famous calculator game getting ported to a phone XD
Imagine that being said back in 1990 XD First, a game being made for a graphing calculator. Second, the same game being made for a phone.

And yeah, there is so much stuff that isn't known by us newer folks. That is why I am glad this has been started. I learned that this had been made for the calc a long while ago before I made Grammer:
http://tift.tuxfamily.org/projects/fastrpl
I mean, look at these screenies:

O.O

I think that is fairly awesome.
EDIT: The first is called gravity pong, the second is minesweeper, and the the third is a snake game. I am pretty sure that is all at 6MHz, too, as it was designed for the TI-83+.

EDIT2: I learned about this from deeph-- a member of the TIFT team and one of the organizers of last years zContest. The team is a french team, I believe.

2168
Grammer / Re: Grammer Q&A
« on: March 11, 2012, 05:29:38 pm »
Indeed it will :) That is the exact code I use in the editor, so feel free to change it up as you need and use your own variables. The tiles are stored row by row, so an offset of 2 into the tilemap data will change the tile on the top row, 3rd from the left. (the first tile is 0). So if you wanted to change the tile below that and the map had a width of 20, you would change byte 22.

EDIT: Also, I am looking at your code, and your technique is quite good so far ! I will see if I can find things to be picky about >:D Still, I am glad you search for the labels outside of the loop, that is good coding practice for Grammer :)

Hmm, found stuff! lets see, if you want to optimise for size , you can remove ending parantheses and whatnot (Grammer ignores them, anyways). Also, doing If A means "If A is not equal to zero." That is a trick that is valid in Grammer and can save a few bytes. Also, If !A means "If A is equal to zero."

Also, you have If J>0, that can be shortened to If J

(I should make a document shortcuts and whatnot sometime)

EDIT2: Oh, I see... Grammer doesn't do much with signed numbers.  -1 is seen as 65535, so -1 is greater than 0 .___.

2169
Grammer / Re: Grammer Q&A
« on: March 11, 2012, 05:01:18 pm »
I am now officially back from vacation, so here goes (be prepared). First off, though, O.O I like your game!
I completely forgot to add in a description of how maps are stores, so I will try to do it properly here :) First, each tile is stored as a single byte. The byte tells which tile to draw using the tile set you define. You can use the program I gave to make the tile set, too (it will be in the proper format for tilemaps). Tilemaps can be variable sized as long as it is big enough to fit the screen (8 down, 12 across). To edit the tilemap, I used this code in my map editor:
Code: [Select]
If getKey(9
int(G+C+X+W*Y+B/8,F

err, sorry, I accidentally clicked to submit the post. Continuing:

G points to the map data
C is the x-offset into the current region displayed
X is the x-offset into the map data
W is the width in tiles of the map
Y is the y-offset into the map
B is the y-offset (in pixels!!) into the current region displayed
F is the tile number to write

So if you want to use a 128x128 tilemap, you would need 16384 bytes of RAM free. I hope this helps a bit more?
EDIT: Also, I have been playing with GramCrft and I like it! You should post a new topic about it sometime!

2170
News / Re: Another PRIZM contest: Make a BASIC game or tool in 2 days!
« on: March 11, 2012, 10:28:41 am »
Hmm, odd. I too, cannot access it. Not just the link, but the site itself.

2171
Other Calculators / Re: History of the TI community
« on: March 10, 2012, 09:27:38 pm »
Burr has done some great work so far with documenting since February: http://tibasicdev.wikidot.com/ti:home

I have already learned of some amazing things I never knew. For example, I wonder how many of the new folks are familiar with this TI-83+/84+ game? Check out the page on the programmer Badja :)

2172
I registered under Axe and z80 BASIC .___. I do not think I will have time for most of it, though, but I can try !

2173
Axe / Re: Seeding the Random Number Generator
« on: March 10, 2012, 11:52:42 am »
You could also write a sub routine to generate pseudo-random numbers that can be seeded >.>

2174
Grammer / Re: Grammer Q&A
« on: March 10, 2012, 11:49:18 am »
Hmm, well to get the amount of free RAM, you would need to use assembly. You can use the AsmPrgm command to do it:
AsmPrgmEFE542444DC9

You will probably need to remove about 17 from that if you are going to create a var with all the RAM. As for drawing tilemaps, there is actually a built in command for that. Use Pt-Change( and it will let you draw a tilemap using 8x8 tiles on the screen. I made two tools to help you here, too. One of them will help you create the tileset, easily, the other is a tilemap editor that will let you make very large tilemaps:

Map Editor
Sprite Editor
The screenies look like this:

If you need help on how to change those programs to output to a specific variable or use a certain size, let me know :) I also tend to put the editable stuff at the beginning of the program using vars like W and H for Width and Height.

Also, you can draw the tilemap each frame and then just draw the character after that so you won't have to put the character in the tilemap data itself.

EDIT: Fixed a typo

2175
News / Re: Juju discovers NSFW material in Illusiat TI-81 Remake
« on: March 10, 2012, 08:44:20 am »
Also, great post, DJ_O XD

Pages: 1 ... 143 144 [145] 146 147 ... 317