uze6666 wrote:I'm afraid yes. All mode 3 games uses a mix of ROM tiles *and* dynamically generated tiles (ramtiles) to pre-blit the sprites during VSYNC. Some games like Bomberman and LodeRunner also uses them for other things like fake parallax effect.But, is there any application which has to use Tiles/Fonts from RAM ? For example dynamically generated tiles? This would be problem and then all tiles and fonts have to be in RAM to be consistent.
vaclavpe wrote:Hello,uze6666 wrote:I'm afraid yes. All mode 3 games uses a mix of ROM tiles *and* dynamically generated tiles (ramtiles) to pre-blit the sprites during VSYNC. Some games like Bomberman and LodeRunner also uses them for other things like fake parallax effect.But, is there any application which has to use Tiles/Fonts from RAM ? For example dynamically generated tiles? This would be problem and then all tiles and fonts have to be in RAM to be consistent.
This really bad news is in fact stopping point for STM32F1 architecture (time delay inconsistency between RAM and FLASH). In this case, line renderer must always take tiles from RAM. I have on mind three scenarios:
- all tiles in RAM - but what about RAM consumption ? Does anybody have a clue how many tiles are used as a maximum?
- tiles in RAM just for single microline - this is better. But the preparation for renderer must be done during HSync pulse. Transfer of 240 bytes is not possible in such time. Or to prepare the whole line ( 8 microlines) and interleave two buffers. This takes 3840Bytes. Which still can be ok, but I am not sure, if it if doable this way.
- microline is still in RAM but transfer is done with DMA. And again maybe with interleaving.
Fourth really theoretic scenario is to choose CPU frequency the way to have the same timing for both RAM and FLASH access. But who wants to play ?![]()
Does anybody have any other idea? I got quite disappointed with power of STM32F1 for such exact timing applications...
Struct {
RamTile tile;
float average;
} Struct BufferedTile;
BufferedTile VramArray[64];
BufferedTile* PtVramArray[64];
//Somewhere in code body whenever a tile is used.
VramArray[location].average++;
//And this would be done on each tile after every 8 scan lines so imagine a for loop around it
VramArray[i].average /= 2;
//When you go to load a unique ram tile just replace the one with the lowest average but not any that are 0.0
Return to Uzebox Derivatives & open source consoles
Users browsing this forum: No registered users and 1 guest