Zardoz89 / dcpu_vm

Another DCPU-16 Virtual Machine
http://zardoz89.github.io/dcpu_vm/
MIT License
6 stars 2 forks source link

[Compatibility] Allow Monitor to take care of their own texture #6

Closed lamogui closed 11 years ago

lamogui commented 11 years ago

In ADDITION of providing sf:Image, i think we can add a sf::Texture to avoid texture.loadFromImage or If in the futur we need it.

Somes other ideas

I wait for discussions...

Zardoz89 commented 11 years ago

Copy&paste form the closed issue:

I think that a objetive should move out any sfml dependet code outside of the hardware device code, so we could do this :

lamogui commented 11 years ago
Zardoz89 commented 11 years ago

A typical checksum it's O(N) with a very fast internal operation. In pseudo-code:

uint16_t checksum = 0
for (i=0 to video_ram_size)
    checksum = (checksum +  videoram[i]) & 0xFFFF;

return checksum

Not have the same reliability that a hash function but can do the job enough well for this.

Zardoz89 commented 11 years ago

I will close this for the moment. We can open a new issue if we need to discuss about how make more efficient the monitor code.