i can't, i use nasm for it.
But i stoped my 3D engine, cause to those memory managment, make me crazy ^^
Maybe i will read all Intel® 64 and IA-32 Architectures Software Developer’s Manual Combined Volumes: 1, 2A, 2B, 2C, 3A, 3B, and 3C for found if there is an hack for avoid it.
And you probably right, i create my cube with it:
mov esi, Cube2_game
call voxel_cube
mov [end_scene], esi
%define cote_voxel_cube 105
voxel_cube:
mov edx, 0xFF0000FF
mov eax, cote_voxel_cube
fill_cube_volume:
mov ebx, cote_voxel_cube
fill_cube_surface:
mov ecx, cote_voxel_cube
fill_cube_line:
mov [esi + 0], eax ; x
mov [esi + 4], ebx ; y
mov [esi + 8], ecx ; z
movdqu xmm0, [esi]
cvtdq2ps xmm0, xmm0 ; Convert coord.entier in float
movdqu [esi], xmm0
mov [esi + 12], edx ; color_pixel
add esi, 16
sub ecx, 7
cmp ecx, -cote_voxel_cube
jnle fill_cube_line
sub ebx, 7
cmp ebx, -cote_voxel_cube
jnle fill_cube_surface
sub eax, 7
cmp eax, -cote_voxel_cube
jnle fill_cube_volume
ret
;=====================
; / void voxel_cube ()
;=====================
This label "Cube2_game:" is located at the end of my kernel.asm, it's a little bit like malloc, and erase all data after kernel's location: [ORG 0x1000] for put my voxel cube, i know BIOS like to put some random data's location, so i guess it's cause to that.
end_scene dd 0
Cube2_game:
I can link my bootloader and kernel here, but some comment is french, i can translate if you want (! approximate eng !).
Finnaly can you explain me, how work aligned/unligned data ?
Before i put movdqa instead movdqu in this function:
;=============
; void clear_screen (void)
; Clearing the screen
; Input : esi - name of object to erase
; Output: Ecran
; Destroyed: ecx - edi
;=============
clear_screen:
mov edi, [PhysBasePtr]
mov ecx, (WIDTH*LENGTH*4)/16 ; mov ecx, (WIDTH*LENGTH)/8
xorps xmm0, xmm0 ; vxorps ymm1, ymm1 ; 256 bit instruction !
clear_s:
movdqu [edi], xmm0 ; vmovapd [edi], ymm1 ; 256 bit instruction !
add edi, 16 ; add edi, 32
loop clear_s
ret
;===============
; / clear_screen
;===============
And it was more slow than movdqu, i don't get it, in my mind this instruction copy just the source: xmm0 to destination: [edi].
Strange, and yes even if movdqu is faster, it's still low: i mean i see the execution of this function on screen.
And what about buffer you will say me, well i don't think, don't need this. Because the linear frame buffer is a already a buffer, and if i have problem of display with one buffer, i didn't imagine if i draw with 3 buffer.
Ps: Can you add a new tag code for assembly ? thanks
And i use a pointer on VESA LFB for draw pixel.
Another question, i don't think understand what is the gpu into cpu intel core, i have this processor: http://ark.intel.com/products/53464/intel-core-i7-2640m-processor-4m-cac....
And have AMD Radeon HD 6470M like graphics card, so can i theoricaly switch gpu ? if yes how do it ^-^.
Cuz i can't do it throung software: Windows Xp :(
Finnaly i want talk about mutlitasking method, i know modern OS use pagination memory for do it, but honnestly i hate this fragmentation of memory (RAM), so can i use my 2nd processor like a selector of code.
I mean this 2nd processor can have a personal memory who is fill by physical address of my program/task into RAM ? and every each sec for exemple, this 2nd processor jump to the next taks's address, and for execute it, he tell to main processor to jump in the address.
I know, if it's possible i would need a personal memory in RAM, so i will delimit at ADDR_TASK_END and ADDR_TASK_START like "segmentation" do it, but i think is more understandable and easier to learn multitasking and don't use all segmentation technologie ^-^.
I want to be master of all my RAM :p
What do you think, is it possible ?