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 - calc84maniac
Pages: 1 ... 150 151 [152] 153 154 ... 197
2266
« on: March 21, 2010, 04:37:18 pm »
true, but does Mirage use any of the same safe areas that Axe uses?
I think StatVars holds Mirage's interrupt vector. To disable this, you might want to put Asm(ED56) after the header to make it use the TI-OS interrupt instead.
2267
« on: March 21, 2010, 12:24:18 pm »
Let me see if i understand the concept behind the global data concept. When the program is run, it is copied to RAM somewhere safe where the TiOS can run it. After it is finished executing, it is NOT copied back, making the program effectively write protected . So all we need to do is write a little bit of code to find out where the program acualy located (the first hex code) and store it in a safe place (L4) until the end of the program where we use it. Once we get to the end, we merely copy the program right back to where it started again, so that any changes we made are permanent. We are not using any of the L1-L6 variables for anything more than a 4 byte address storage during the program execution, so there is no possibility that we could run out of memory due to large programs.
(did i get that correctly?)
Well actually, it is a 9-byte storage of the program name. But you've got the idea
2268
« on: March 20, 2010, 02:23:14 pm »
It will actually download the OS for you automatically if you don't already have a copy
2269
« on: March 19, 2010, 10:05:16 pm »
Can I see the assembly for that write-back hex code? And does it work when the program is archived? And if so does it re-archive the program when it copies back?
The code is back a ways in terms of posts. I'm going to modify it a little later on so that it works with archived programs.
Hold up, you can't even run no-stub ASM programs when they are archived, so this shouldn't be necessary.
2270
« on: March 19, 2010, 12:37:56 pm »
Actually, looking at your hex codes, it seems like you are mixing up B and C when loading the size of the program. It is stored as little-endian. Also, since you are skipping the BB,6D bytes you may want to decrease BC twice to make sure there is not an overflow.
2271
« on: March 18, 2010, 10:43:36 pm »
I added Paragoombas, Parakoopas, Koopas, and Koopa shells.  The Koopa shells don't hurt anything other than Mario yet, though.
2272
« on: March 18, 2010, 10:18:40 pm »
And as I noted in SAX, only input numbers from 0 to 39 to that Asm routine. Other inputs might cause weird things like the blue lines of death
2273
« on: March 18, 2010, 09:34:27 pm »
You can just do C:Asm(hexcodehere) and the value of the C variable will be in HL.  You can also return values from Asm() by putting them in HL.
2274
« on: March 18, 2010, 06:13:56 pm »
Holy crap really? Also, how do you retrieve them?
:{L1+1}*256+{L1}
2275
« on: March 18, 2010, 06:08:27 pm »
Hey does anyone know how to store signed numbers in a list? Like storing 9001 to {L1}? I've been struggling to get the physics to work with small numbers.
Do you mean 16-bit numbers? You can do that by storing to two consecutive bytes. (Quigibo said he was going to make a shortcut command for this later) :A->{L1} :A/256->{L1+1}
2276
« on: March 17, 2010, 10:10:41 pm »
2277
« on: March 17, 2010, 09:38:49 pm »
I'm almost positive that you can detect as many keys at one as you need. I don't think there are actually any limits by the nature of the commands.
What is the effect of this though? xor a out (1),a I've never seen this used. I thought it only works when a in binary is a combination of all ones and a single zero.
getkey(0) is a good idea, but isn't getkey=/=0 basically the same thing? I was actually planning on making getkey(0) detect the [on] button.
EDIT: wait nevermind, you were requesting an indefinite return. Regular getkey only is true once and then gets reset back to zero. I'll have to add that command.
If you set more than one bit to 0, you can select more than one key group. All the pressed keys in the groups are ANDed together. Thus, you can test for the "any key" quite easily this way.
2278
« on: March 17, 2010, 10:50:44 am »
Updates: More collision detection bugs fixed Hitting a coin block plays a coin animation Stompable goombas, running around at various speeds A walking platform, which appears as an upside-down goomba (for test purposes) Objects can be programmed to stop or turn around when they reach an edge The screenshot framerate should be friendly to all browsers now:
2279
« on: March 17, 2010, 07:36:46 am »
That reminds me, how many keypresses at once can we use in an Axe game? I noticed some games detects like 3 at once, like the shooter example. I could move diagonally and shoot at the sane time. In BASIC only one is possible at once and in xLIB two (only arrows, others = 1 keypress) and Celtic III a bit more than arrows
The limit is the same as in ASM, which is the limit of the keyboard itself. Just remember that if you press 3 keys that are the corners of a rectangle, the 4th corner of the rectangle will be detected pressed as well.
2280
« on: March 16, 2010, 11:55:36 pm »
I think getKey(0) should tell whether any keys at all are pressed. Here is an example of how you could do it (feel free to write your own though): xor a out (1),a ld h,a ld l,a in a,(1) inc a ret nz inc l ret
Edit: I modified it so the output would make more sense considering how the rest of the getKey() operations work. Now it returns 1 if no keys are pressed, 0 if keys are pressed.
Pages: 1 ... 150 151 [152] 153 154 ... 197
|