Login
Back to forumSee the full topicGo to last reply

Posted By

Giuseppe
on 2010-11-09
16:43:23
 Re: Assembly and interrupts: my first attempt. Help needed!

Thank you Rybags for your time and reply! I found it very useful, so I'd like to comment your points.

> 1. Trigger your "VBlank" IRQ via a Raster Int request for a scanline near the bottom of the display window portion of the screen. That means you'll get maximum non-display time to do screen changes.

Yes, it is a good idea, but I threw it away because I thought I still will have short time for calculations. I don't mind if I have to spend two or three frames for them, I just want to avoid flickering.
Anyway, I tried to calculate how much time there is between the last visible scanline (that I think is scanline nr. 250, more or less) and the first visible scanline (nr. ~50). Approximately it should be 1/150 seconds: is that correct?



> 2. "Double-buffering" - if you're moving lots of stuff around it can be more beneficial sometimes to just have 2 screens.

Do you mean using TED register $FF14? Yes, definitely that is a very good idea! I thought about it also, but I didn't use it because I had the feeling that to keep things fast, I had to write each routine two times, one for the first buffer, one for the second. But I'll give it a try happy



> 3. Pre-Shifted sprites. Bigger memory cost, but much quicker to put to screen than having an object that you have to run through shift/rotate instructions.

I think you are talking about pixel-by-pixel sprite movements, right? I still have not reached that step (it will be the next one), but surely I'll keep in mind your suggestion.



> 4. The Brute-Force approach. Can cost a lot of memory, but the fastest way to do software sprites. Rather than reading from definitions by instructions like LDA (Sprite_ptr),Y - use immediate mode instructions to read the sprite data.

Hehe, OK, I guess I got it. I don't like it very much, but it can be indeed fast!



> Additional to that, there's a method we call the "Stripe Method" where you just have a huge block of instructions. [...]

I must admit that I understood very little of this point, but maybe I'll understand it better in the future. Anyway, you gave me a very naughty suggestion: the code that self-modify a JSR! Haha, it is tremendous, you made my (few) hairs stand on end, but I understand that with such low power available, this method could save the day! Yeah, thank you!!!



Back to top


Copyright © Plus/4 World Team, 2001-2024