write nbg map

vbt

Staff member
I'd like to improve the speed of my way to write a nbg map, actually, I write it on the fly to VRAM(A0,A1,B0,B1) directly like this :

ss_map2 =(Uint16 *)SCL_VDP2_VRAM_A1;

ss_map2[x] = Colour;

ss_map2[x+1] = Code;

would there be another way? and i'd like something faster. If I don't write data to ss_mp2, I get 5-7fps more.
 
I would assume the fastest way would be to fill in your tilemap in workram-H and then copy it to VDP2 RAM during VBLANK using SCU DMA.
 
antime said:
I would assume the fastest way would be to fill in your tilemap in workram-H and then copy it to VDP2 RAM during VBLANK using SCU DMA.

I tried this with low success, I don't see any speed improvement. Maybe I don't use SCU DMA correctly.
 
Well, if you're seeing a huge speed difference just from disabling the two rows in your original post, the problem is likely somewhere else. What performance do you get if you place ss_map2 in workram? Try measuring the performance of the different part of your code, and look out for places where you're inadvertently waiting on the hardware.
 
Back
Top