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

Pages: 1 ... 7 8 [9] 10 11 ... 24
121
ASM / Re: Interrupt question
« on: April 11, 2018, 07:34:28 pm »
I believe there is a way to set an interrupt on a certain number of cpu cycles having elapsed. I haven't ever used it, though.
http://wikiti.brandonw.net/index.php?title=83Plus:Ports:30
From what I understand about the timers, you could set the counter to 15, and the on/off port to 0x80 to get interrupts every 15 ticks.

That does help. However, it is too niche a solution to make the effort worthwhile. I would only be able to have a 2% speed gain in a ti84 that used an interrupt to display a non-greyscale image. That isn't really a common case, and isn't really worth the effort. It was a fun thought experiment though.

122
ASM / Re: Interrupt question
« on: April 06, 2018, 03:37:41 pm »
Depends on the model! On the models with crystal timers yes, On the models with out sadly no.
My knowledge is somewhat... lacking... in crystal timers. Can it be accomplished in > ~20 clock cycles?
In generalized pseudocode is to:
Code: [Select]
Interrupt:
exx
64 loop for y
ld i,(breakSave) // change the interrupt location (I know you can't just set I)
12 loop for x
set interrupt to trigger in ~25 clock ticks (15 for next 2 instructions and 10 for after)
exx
ret
//go and execute 1 or 2 instructions while we wait for the lcd to be ready
breakSave: //when the interrupt triggers it will jump to right here
exx
out ($10),a // write to the lcd
endXLoop:
endyLoop:
ld i,(Interrupt) // restore the interrupt location
exx
ret
I'm not sure if all the code is correctly formatted. Ignore any incorrect syntax. I'm sure you get the idea of what my goal is. I want to spend time executing useful code while I wait for the lcd to be ready for another write. It only works if the function is in an interrupt of course. I don't think that it will help with greyscale display since they have less waisted time waiting for the lcd to be ready. I can't create the method since I don't know how to use crystal timers. Some code showing me how to use them would be nice.

123
ASM / Interrupt question
« on: April 05, 2018, 11:36:27 am »
Quick question: Is there anyway to set an interrupt to trigger in X clock ticks? I was looking at some code and think I found a way to shave ~600-1800 clock ticks off of fastCopy (the lcd routine) if there is.

124
The Axe Parser Project / Re: GDB vs Pic
« on: March 26, 2018, 07:12:58 pm »
That's a good explanation of it, thanks for doing my job. :P
Are there positions open there?  ^-^

125
The Axe Parser Project / Re: GDB vs Pic
« on: March 25, 2018, 06:40:36 pm »
The o means that what follows is the memory location not the variable. {oA}r is exactly the same as A. It lets you make custom variables.

:L5->oVariableName
:25->VariableName
:Disp VariableName>Dec

In fact, VariableName can be anything you want! It can be as long as you want and contin numbers and lowercase letters as long as it doesn't start with a lowercase letter or number. You can also make as many as you want! (There is tecnically a limit but you will never hit it) These custom named variables can be used in ANY situation you could have used an Alpha variable. Note that each one takes up two bytes so if you place one at L5 then the next one should be placed at L5+2 and so on. There is no reason not to use them. They are just as fast as Alpha variables. In fact, the only difference between a custom named variable and the Alpha variables is the space they take up in the source code.

The o can be used for data also.

:"Im a string!"->oVariableName
:Disp oVariableName

Is the exact same as

:"Im a string!"->Str1
:Disp Str1

Notice that you need the o when it points to data. The symbol means that you want to use it as a constant and not a variable just like GDB or Str. It is useful for constants also. If you need map width and height in your program but don't need them to change while it is running make them constants. That way if you need to change the dimensions of the map, all you have to do is change the one line where they are declared.

Sorry I'm a bit late to the party... :P

126
Axe / Re: Advice for keeping up with data?
« on: March 21, 2018, 04:27:09 pm »
How much data are you using? Even 80 sprites can fit inside L1. If you have massive amounts, you can store the sprites in an appv and copy it to ram when the program runs. I have never run into trouble with the amount of sprites. I usually run out of ram.

127
Axe / Re: More dynamic variables?
« on: March 18, 2018, 07:28:02 pm »
I always use GetCalc(appvTEMP, size) for dynamic variables. (This creates an appvar called "TEMP" of the given size and returns a pointer to it.) Just remember to delete it later.
I'm pretty sure there's a type of variable that gets deleted automatically by the OS when you exit, it's called tmp and it replaces the w token (2nd+9).
Yea... that's right. I think. Pretty sure. You might have to start its name with a non-alphabetical character like '*' though.

128
Axe / Re: More dynamic variables?
« on: March 18, 2018, 07:03:43 pm »
There is a lot of free ram hanging around. Try using static locations if you can. (like L1-6 or special spots you can type in with the scientific E key) A large portion of 0x8000 - 0x9D93 is free to use. L1-6 are there but they only cover a small portion. If you need a lot of variables, use 0x966E. It is 128 bytes long. You will need to fill it with the space character when you are done or your homescreen will look wierd when you quit.
Also L5 is the only L1-6 variable that can't be used as 756 byte buffer.
L1 can be used whenever you want.
L2 is listed as 512 bytes long but it is closer to 800. Make sure to ClrDraw(L2) when you are done. I know that it says you can't use it with interrupts but that isn't true. I've written many programs with interrupts and used L2 in each one without any problems.
L3 is basically the same as L1. The only time you can't use it is when you are using greyscale.
L4 is listed as 256 bytes long but all L4-512 to L4+256 is free to use. Some values might change if you are are use Copy() with the Y0-9 archive variables.
L6 is the graph screen buffer. You probably know what that is used for.

If you really need more try:
https://www.omnimaga.org/index.php?page=ram

If you can't use any of that:

I would avoid using getCalc unless you need a very large amount of uninterrupted space. If you are trying to store a bunch of 2 byte variables there, it will be 2-4 times as slow as if you put those variables in L1-6. I'm not saying don't use getCalc for memory! I'm only saying that it will be a bit slower. (There are actually hacky advanced ways to get all the memory space of using getCalc and the speed of static locations...)

As for using Buff() for memory, that is up to you. Make a program that uses Buff(8000) and run it. If it takes a second to quit, don't use Buff. If not then feel free to use it as much as you want since your shell isn't writing it to archive.

If you know what you are doing, you can have a huge amount of memory at once. One of my programs had 25k of executable code and 28k of ram that I could write to at any time. (I didn't swap anything to archive)

129
ASM / Re: Simple ASM tasks
« on: March 02, 2018, 03:31:22 pm »



Those are good places to start if you want to learn asm. I’m going to try to persuade you to use Axe Parser for whatever it is you are trying to do.

I assume you don’t know much about assembler for a couple reasons. You listed drawing a shape as a simple task - it isn’t. Also, variables don’t work the way you think they do, there are only registers and memory.
If you aren’t very comfortable with the concept of pointers then I suggest you learn or stick with ti-basic since everything after it relies heavily on them.
Axe can do just about everything asm can and it is much easier to learn and code. I know Axe and assembler quite well and I still code mainly in Axe because it is easier to use and gets the job done. Something that I can create in minutes in Axe can take a half hour in asm

Let me say it again: Unless you are trying to do some REALLY crazy things or have other assembly programming experience I would go to Axe for whatever you are trying to create.

130
News / Re: Slack now also linked to IRC
« on: February 28, 2018, 08:37:28 pm »
That sounds neat! I'd use it if I had a phone... heh

131
Super Smash Bros. Open / Re: [Axe]How To make your own character
« on: February 07, 2018, 08:40:09 pm »
Unfortunately there is a lot of things wrong with your sprites.
First of all, they have color a ti84 has a black and white screen. They are way too high resolution the screen is 96x64 pixels. You need the sprites in hex format.
That would be a good place to start.

132
TI Z80 / Re: axe set (with AI)
« on: December 30, 2017, 04:06:45 pm »
If you want to draw text to a custom buffer, I made an axiom that lets you do just that! It also is twice as fast as standard Text( command. The tokens are under the matrix menu.

Spoiler For commands n' stuff:
Text()
Text(x,y,string) //Draws string to x,y to front buffer
Text(x,y,string,buffer) //Draws string to x,y at specified buffer
Text(string) //Draws string to the front buffer at current cursor position
Text(string,buffer) //Draws string to specified buffer at current cursor position

Dec()
Same as Text() but replace string with an unsigned int

Dec()r and Dec()rr
Same as Dec() but displays the number in hex or binary

Char()
Same as Text() but replace string with a character

Tok()
Same as Text() but replace string with a pointer to a 1 or 2 byte token

133
TI Z80 / Re: [AXE LIBRARY] GrayLib: (nearly) perfect grayscale
« on: December 30, 2017, 03:34:13 pm »
Doing a zoom compile with the °GIT set to 1 throws an ERROR: Undocumented on the "performs magic" line of GreyLib.

Why is this?
It is a bug with the compiler. There probably is a hacky solution, but I don't know what it would be. You just can't use zoom compile with it for now.

134
Axe / Re: how do i use the gdb
« on: November 25, 2017, 04:05:58 pm »
Wow! Thats a lot of questions. Ill try to answer them all.

1. Making a map that moves with the character and extends beyond the screen:
You dont say how the map is formatted. I assume you mean a tile map. Creating a tilemaping engine is not terribly hard, but creating a good one is. Runer112 has made a really good one called YAAM. There is really no reason not to use it. It is a bit confusing to learn but straightforward enough when you figure it out.

2. Rotate sprites:
Axe has sprite rotation commands built in. I don’t remember what they are exactly but you can find them in the ‘s’ section of the catalog. Remember that they use the same memory so copy or display the sprite before you use another rotation command. They are also sort of slow. Not a big deal if you are rotating one or 2 sprites a tick but can be a big problem if you rotate many each tick.

3.  GDB’s:
I don’t think you understand what a GDB is. Its nothing more than a pointer. All it does is tell the program to look in a specific spot for the data. Since all it does is point to the start of the data, the data can be of any size. If you wrote:
Code: [Select]
:Data(0,0,0,0,0) -> GDB1Then GDB1 would be 5 bytes long.
Code: [Select]
:Buff(NUMBER) -> GDB1Then GDB1 would be NUMBER bytes long. There is no limit to how big NUMBER can be as long as there is space in memory. It can point anywhere. If you did: L1 -> GDB1 then you could use GDB1 instead of L1.

I find that it is very helpful to program with a copy of the Axe Parser command list nearby. You might want to spend more time to become very familiar with pointers before you continue. Much of Axe requires you to have a solid grasp of them. (Plus you can do some really cool things with them when you become a better programmer)

135
The Axe Parser Project / Re: Convert Number to String
« on: November 25, 2017, 03:34:15 pm »
If you need the number as a string you can:
Code: [Select]
:ClrHome
:Disp NUMBER >Dec
:Copy(L5, L1, 5)
:ClrHome
:0 -> {L1 + 5}
That will save the number as a string in L1. It doesn't have to be L1 it can be any string. If the number is less than 5 digits long the string will start with space. So if the number was 354 the string would be "  354". Notice that the string has 2 spaces before the number.

The copy function can be used to take a "screenshot" of the homescreen. Copy(L5, POINTER, AMOUNT) would copy the AMOUNT of characters from the homescreen to POINTER. All the code does is display the number and copies the first 5 characters of the homescreen which happens to be the number that was displayed.

Pages: 1 ... 7 8 [9] 10 11 ... 24