Physical Device Test!

by | August 10, 2026

You know what this is?

If you answered with noise again you’d be … Semi-correct! But this time.. It’s noise inside a VRAM 8×8 tile being blitted to the Framebuffer from the Tile Mapper … ON THE ACTUAL DEVICE! Sure it’s noise for tiles, but that could easily be grass or clouds or anything else!

How did I do it? .. Well, at first it kinda worked as I was using Texture Buffers, but they are limited to 64K which also means my palette would’ve been cut off at later offsets because I have the system supporting 64K palettes BUT .. Each palette index is RGBX 8 .. So that’s 4 bytes per palette and 64K x 4 = 262144 ! .. Which is over the 65536 byte limit. Let alone the ‘work’ layers which on higher resolutions are definitely over 64KB.

It worked great on the Console Emulator which well, my NVidia card was happily accepting huge Texture Buffer sizes but.. Not so on the device! .. So this led me to think and research.. How can I still have direct access to the memory, because on mobile architecture (like Mali) it uses a Unified Memory, not like the Desktop GPU which has separate memory. Because Desktop it’s much much faster, so I can just do the usual flush perhaps, maybe there’s a better option but at the small resolutions, the Desktop Emulator version won’t even bat an eye anyway.

For the device, there’s something called a dma-buf. This was a great start, I’m like, okay I can use the ‘Generic Buffer Mangement’ (GBM) to create a Buffer that the GPU can access, and also the CPU. Remember: We want to be as fast as possible for the Tile Mapper and Sprites to blit to that area and then have the GPU access it.

Without going into too much detail, there were some hiccups, because when doing this low level there’s bound to be pain points. So test after test after test, FINALLY I got a combination that worked! Even without the mask layer optimizations, it still is 60fps (no sprites yet), 4 tile maps at all but the highest resolution! But note, that resolution is basically for what’s used in classic games to display higher res layer ‘text’ for example, not the whole game. But hey, nothing stops a gamedev from minimizing layer usage and using high res and somehow getting that 60fps or maybe they want the 30fps. I can only imagine what gamedev’s could think up!

The goal is to create a small demo so I can show off the early stages. Maybe a mario style clone or something, we’ll see! Anyway, hope you had fun reading or skimming (hey no shame in that).

See you soon with more updates!

Leave a Reply

Your email address will not be published. Required fields are marked *