Search found 217 matches

by qarnos
Fri 30 May, 2008 10:39 pm
Forum: Programming Help
Topic: [TI-ASM] Memory allocation and management
Replies: 27
Views: 20398

So then, allocate 1024+256 bytes, then have the Update routine just move the data, or should it just recalculate the data? I have it check where the memory was allocated and then it InsertMem's any required padding bytes. Moving/recalculating is trivial enough - this is not something which is time ...
by qarnos
Fri 30 May, 2008 8:50 pm
Forum: Programming Help
Topic: [TI-ASM] Memory allocation and management
Replies: 27
Views: 20398

Unfortunately, yes - it needs to be contiguous. Actually, it also needs to be 256 byte aligned, so 255 times out of 256 I'll have to allocate even more than that :P I might just add a routine the user can call to valid the ram if they muck around with vars, and it can update its internal pointers as...
by qarnos
Fri 30 May, 2008 9:07 am
Forum: Programming Help
Topic: [TI-ASM] Memory allocation and management
Replies: 27
Views: 20398

[TI-ASM] Memory allocation and management

I'm not too up to speed on the way TI-OS handles memory, so maybe one of the gurus can help me out with this one. I'm porting Aether to run as a flash library, and I'd like to be able to allocate the ~1kb I need for dynamically generated tables, etc, rather than forcing the program to do it to avoid...
by qarnos
Fri 30 May, 2008 8:39 am
Forum: Aether 3D
Topic: Progress Thread - New demo - Cobra Mk III (18-May-08)
Replies: 319
Views: 352562

I've just had my first success running the library as a flash library. All it did was load the identity matrix, but it worked :) The loading code is pretty small - the program has to look-up the application using _FindApp and then set the ROM page by outputting to port 6. It's about 40 bytes of &quo...
by qarnos
Thu 29 May, 2008 9:08 am
Forum: Programming Help
Topic: [TI ASM] Useful routines.
Replies: 50
Views: 56825

I found the reason why my routine is slow and the CoBB version is jerky - irandom is slow, slow, slooooooowww.

I'll play around with some other RNGs.
by qarnos
Wed 28 May, 2008 10:36 am
Forum: Programming Help
Topic: [TI ASM] Useful routines.
Replies: 50
Views: 56825

Wouldn’t it be more efficient to do it like this: It probably would be. The main motivation for this method is I want to avoid the possibility of "getting stuck" if we go through a few loops and are unlucky enough to keep getting bad random numbers. I might give that a try though a...
by qarnos
Wed 28 May, 2008 10:06 am
Forum: Programming Help
Topic: [TI ASM] Useful routines.
Replies: 50
Views: 56825

Here's a routine (well, a small set of routines) to perform a cross-fade between two images. It works by comparing the two images to see which bits need to be changed, and then randomly flips these bits until the image has been completed. It's not as fast as I would like - an image which needs every...
by qarnos
Sun 25 May, 2008 9:57 am
Forum: Programming Help
Topic: [ASM] Compare 16-bit registers?
Replies: 27
Views: 34972

Is using IXH and IXL worth the huge overhead? I haven't timed it, but is pushing and popping other registers faster? Surprisingly, no. In my situation, I need to preserve all registers except A (otherwise I wouldn't be using IX to begin with!). First, my code: ld a, ixl ; [8] cpl ; [4] add a, c ; [...
by qarnos
Sun 25 May, 2008 9:08 am
Forum: Super Mario - and the Elemental Crystal
Topic: Project Discussion
Replies: 35
Views: 81674

Those screenies are awesome! I especially love the water effect.

You are the master of greyscale.
by qarnos
Sun 25 May, 2008 7:04 am
Forum: Aether 3D
Topic: Progress Thread - New demo - Cobra Mk III (18-May-08)
Replies: 319
Views: 352562

This looks a lot more professional already than many old PC games. :) Screenshot - first half with stars on, second half with stars off How come stars cause such a performance hit? Partially because I'm lazy, and partially because there's still a lot work to do even just to display a point. There a...
by qarnos
Sun 25 May, 2008 6:28 am
Forum: Programming Help
Topic: [ASM] Compare 16-bit registers?
Replies: 27
Views: 34972

Sorry for the necropost, but I've stumbled on a cool trick for doing comparisons byte-by-byte. It doesn't work exactly like CP, but is very useful when you are short on registers. I came up with this for comparing against IX (which has no SBC instruction), but it can modified easily enough. ld a, ix...
by qarnos
Sun 25 May, 2008 2:29 am
Forum: Aether 3D
Topic: Progress Thread - New demo - Cobra Mk III (18-May-08)
Replies: 319
Views: 352562

I've added a "look at" routine for the matrices - it's now possible to track an object as it moves around. You can try it out for yourself here . The cobra starts off behind the camera. When you go into object control mode (press ENTER) the camera will start tracking the cobra. If you swit...
by qarnos
Sat 24 May, 2008 10:12 am
Forum: Aether 3D
Topic: Progress Thread - New demo - Cobra Mk III (18-May-08)
Replies: 319
Views: 352562

I was doing some work today and deleted some code I shouldn't have, but it did produce a pretty cool screenshot :) One of the techniques I am using to pick up some speed with sending data to the LCD is to keep two buffers - one for the current frame, and one for the last - and only send the bytes wh...
by qarnos
Fri 23 May, 2008 7:50 am
Forum: Aether 3D
Topic: Progress Thread - New demo - Cobra Mk III (18-May-08)
Replies: 319
Views: 352562

I just rotate the value right one place and mask out the two lowest bits to give a byte offset into the pattern array. Does it look worse if you don’t mask out the last two bits? I can imagine that a clever dither pattern could allow achieving finer shades that way. That's not a bad idea! Wh...
by qarnos
Fri 23 May, 2008 6:18 am
Forum: Off Topic
Topic: glitch??
Replies: 2
Views: 3993

What a coincidence - a few weeks ago it showed me logged in as you :P

When's it my turn to be tr1p1ea? :twisted: