Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    455
  • comments
    639
  • views
    424264

Victory is mine!

Sign in to follow this  
_the_phantom_

104 views

Yes, in the immortal words of Stuie Griffin, Victory is mine!

After a rethink of my approch and some realisations about how the arc. works I realised that my method of just mallocing memory was doomed to fail.

This is because the gfx hardware requires a real physical address to read from, not a virtual address as I'd get, as such while I could reserve the memory the final image was.. well.. garbage [grin]

So, as I got into the shower it hit me, mmap!
The idea was so simple it was genius, simply mmap a section of physical memory into my address space, I can write to it and the hardware can read from it.. ahah!

So, a quick look at the memory map shows that the framebuffer space is infact large enuff to take a 24bbp framebuffer, so we ask the fb devices for their physical memory location and then mmap them so they are big enuff for the 24bbp display to fit, clear and blit away.

rock on!
damn i'm happy about that, heh

Practical upshot; I now have a way of drawing to a 24bpp framebuffer [grin]
As its a physical address it can even be accessed from the 2nd CPU, huzzah!

Now, to work on other more cunning stuff and to understand the potential 'issues' with my method and normal new/malloc operations...
Sign in to follow this  


2 Comments


Recommended Comments

I'd amaze you with a screen shot but I dont have any screen grabbing code as yet and I havent worked out how to get pictures off my phone as yet, heh

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!