[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use MMX or SSE for Apple II
"mdj" <mdj.mdj@gmail.com> wrote in message
1163130131.190937.272550@f16g2000cwb.googlegroups.com">news:1163130131.190937.272550@f16g2000cwb.googlegroups.com...
>
> Bryan Parkoff wrote:
>> Do you have thought to emulate video? Byte by Byte sequence can be
>> slow. Put 7 bytes into register and process them in parallel using MMX
>> or
>> SSE of x86. It may speed up. It helps when emulated MPU is in process
>> in
>> serial and then in turn to process video in parallel. What do you think?
>
> I think it's a better approach to use library routines to do video
> blitting. Most of the time such libraries will have an optimised
> version for the current architecture, be that x86, x86_64 etc.
Matt,
I am aware that x86_64 does not support MMX. First of all, you will
need MMX to process 7 bytes into register. Seven bytes have duplicated from
one video byte. Then 7 bytes with 8 bits are converted "8 to 1" bit
ignoring 8th through 2nd bits. First byte has 1st bit, second byte has 2nd
bit, through seventh byte has 7th bit. Each data in byte field shows "0" or
"1" can be converted to low nibble ("0" through "F"). Low nibble data is
used for 16 color pixels and can use RGB table to pick RGB16 or RGB24 or
RGB30 (10 bit channel) data. It is all done using MMX before complete video
data can use any display library such as DirectX. It is what I call "7
bytes in a block" so each block can be processing faster.
I agree that MMX is not worth to work with other machine and lose
portability. I have thought to use alignment memory without depending the
use of MMX. Let say for an example. The number of bytes are stored in
memory array. This array is used for full 8 bits only. I can use 32 or 64
bit register of x86_32 or x86_64 to have a pointer to 8 bit size array and
capture 8 bytes from array memory into two 32-bit registers or one 64-bit
register. Each byte size in this register can be processed in parallel by
using AND, OR, XOR, ADD and SUB instructions. It is faster than MMX and
SSE. It may work on other machines.
Do you know what my intention is to process video byte into a block (7
bytes) and do conversion for pixel data in my own code before process using
display library? What do you think?
Bryan Parkoff