Mode3 blitter boost

Topics related to the API, programming discussions & questions, coding tips, bugs, etc. should go here.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Mode3 blitter boost

Post by Artcfox »

Gotcha! It isn't a visibility flag, it's a hide flag, and you are correct in that I OR them together, so it should work.

I just tested the scrolling demo, and posted about the bug I found. I'll recompile Bugz next and see if that works.
User avatar
Artcfox
Posts: 1382
Joined: Thu Jun 04, 2015 5:35 pm
Contact:

Re: Mode3 blitter boost

Post by Artcfox »

Bugz seems to work fine in 32 wide mode still using the y value, or by using the new flag.
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Mode3 blitter boost

Post by nicksen782 »

Since we are on the topic of sprite flags.

We have: SPRITE_FLIP_X, SPRITE_FLIP_Y.

What about a SPRITE_ROT_90 for rotating a sprite?
User avatar
D3thAdd3r
Posts: 3292
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Mode3 blitter boost

Post by D3thAdd3r »

It could make some sense to have such an option. It would definitely be slower of course since you have to play with the pointer every time. I think the main consideration there, besides actually writing the asm itself, would be the extra code space required or else an extra makefile flag. I would guess it adds 50% to the size of BlitSprite(), versus the space of storing a couple rotated versions of a tile. There could be some game where large amounts of tile would need to be duplicated in rotated form without this feature, and then it would worth it if the speed loss was acceptable. I guess it doesn't exist yet because so far no game absolutely needed it.
User avatar
Jubatian
Posts: 1569
Joined: Thu Oct 01, 2015 9:44 pm
Location: Hungary
Contact:

Re: Mode3 blitter boost

Post by Jubatian »

I added RAM sprite support. You need to enable it using SPRITE_RAM_ENABLE, then adding the SPRITE_RAM flag will identify a RAM sprite. It uses User RAM tiles as source, so set up your RAM tiles accordingly. Enabling it won't have any side effect, I just added this so normally the extra code wouldn't be included in your build. I didn't test it either for now, only that enabling it doesn't do anything bad, everything keeps working as normal (it also should work, it isn't anything really complicated).
nicksen782 wrote: Wed Sep 13, 2017 2:53 amWhat about a SPRITE_ROT_90 for rotating a sprite?
This could indeed fit, the only problem is that I am going to tear all my hair out until I get this done. Such code paths like needed for this are hell, very difficult to program and verify whether they are correct. So it could work, and it wouldn't be slow either (the main blitting loop would be capable to blit such rotated sprites), it is just very difficult to get it right. So for now I would rather pass, if someone is really really short on ROM for his blockbuster idea, then maybe! :D
User avatar
nicksen782
Posts: 714
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Mode3 blitter boost

Post by nicksen782 »

I just tried RESOLUTION_EXT in my Makefile. Wow! No more cutting off half a tile on each side of the screen. Thanks!
Post Reply