minifix test.vsh
This commit is contained in:
parent
933c86b4b0
commit
2aae159782
@ -44,7 +44,7 @@ $(PROJECTNAME).bin: $(PROJECTNAME).elf
|
|||||||
|
|
||||||
$(PROJECTNAME).elf: $(SHBINFILES) $(OFILES)
|
$(PROJECTNAME).elf: $(SHBINFILES) $(OFILES)
|
||||||
# $(LINK) $(LDFLAGS) -o $(PROJECTNAME).elf $(filter-out build/crt0.o, $(OFILES)) -lctru -lc -lgcc
|
# $(LINK) $(LDFLAGS) -o $(PROJECTNAME).elf $(filter-out build/crt0.o, $(OFILES)) -lctru -lc -lgcc
|
||||||
$(LINK) $(LDFLAGS) -o $(PROJECTNAME).elf $(filter-out build/crt0.o, $(OFILES)) -g -lctru -lm -lc -lg
|
$(LINK) $(LDFLAGS) -o $(PROJECTNAME).elf $(filter-out build/crt0.o, $(OFILES)) -g -lctru -lm
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -f build/*.o build/*.d
|
@rm -f build/*.o build/*.d
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
|
; make sure you update aemstro_as for this (27/05/14)
|
||||||
|
|
||||||
; setup constants
|
; setup constants
|
||||||
.const 5, 0.0, 1.0, 2.0, 3.0
|
.const 5, 0.0, 0.0, -0.99, 1.0
|
||||||
|
|
||||||
; setup outmap
|
; setup outmap
|
||||||
.out o0, result.position
|
.out o0, result.position
|
||||||
@ -14,22 +16,28 @@
|
|||||||
|
|
||||||
;code
|
;code
|
||||||
main:
|
main:
|
||||||
; result.pos = mdlvMtx * in.pos
|
mov d1A, d00 (0x4)
|
||||||
dp4 d40, d40, d00 (0x0)
|
mov d1A, d25 (0x3)
|
||||||
dp4 d40, d41, d00 (0x1)
|
; tempreg = mdlvMtx * in.pos
|
||||||
dp4 d40, d42, d00 (0x2)
|
dp4 d10, d40, d1A (0x0)
|
||||||
mov d40, d25 (0x4)
|
dp4 d10, d41, d1A (0x1)
|
||||||
; result.pos = projMtx * in.pos
|
dp4 d10, d42, d1A (0x2)
|
||||||
dp4 d00, d44, d40 (0x0)
|
mov d10, d25 (0x3)
|
||||||
dp4 d00, d45, d40 (0x1)
|
; result.pos = projMtx * tempreg
|
||||||
dp4 d00, d46, d40 (0x2)
|
dp4 d00, d20, d10 (0x0)
|
||||||
dp4 d00, d47, d40 (0x3)
|
dp4 d00, d21, d10 (0x1)
|
||||||
; result.texcoord = const
|
dp4 d00, d22, d10 (0x2)
|
||||||
mov d08, d25 (0x5)
|
dp4 d00, d23, d10 (0x3)
|
||||||
mov d0C, d25 (0x5)
|
; result.texcoord = in.texcoord
|
||||||
mov d10, d25 (0x5)
|
mov d02, d01 (0x5)
|
||||||
; result.color = in.pos
|
mov d03, d25 (0x7)
|
||||||
mov d04, d00 (0x5)
|
mov d04, d25 (0x7)
|
||||||
|
; result.color = crappy lighting
|
||||||
|
dp3 d1A, d40, d02 (0x0)
|
||||||
|
dp3 d1A, d41, d02 (0x1)
|
||||||
|
dp3 d1A, d42, d02 (0x2)
|
||||||
|
dp4 d01, d00, d1A (0x6)
|
||||||
|
mov d01, d25 (0x3)
|
||||||
flush
|
flush
|
||||||
end
|
end
|
||||||
endmain:
|
endmain:
|
||||||
@ -39,8 +47,8 @@
|
|||||||
.opdesc _y__, xyzw, xyzw ; 0x1
|
.opdesc _y__, xyzw, xyzw ; 0x1
|
||||||
.opdesc __z_, xyzw, xyzw ; 0x2
|
.opdesc __z_, xyzw, xyzw ; 0x2
|
||||||
.opdesc ___w, xyzw, xyzw ; 0x3
|
.opdesc ___w, xyzw, xyzw ; 0x3
|
||||||
.opdesc ___w, wwww, wwww ; 0x4
|
.opdesc xyz_, xyzw, xyzw ; 0x4
|
||||||
.opdesc xyzw, xyzw, xyzw ; 0x5
|
.opdesc xyzw, xyzw, xyzw ; 0x5
|
||||||
.opdesc __z_, xyzw, xyzw ; 0x6
|
.opdesc xyz_, xyzw, xyzw ; 0x6
|
||||||
.opdesc ___w, xyzw, xyzw ; 0x7
|
.opdesc xyzw, yyyw, xyzw ; 0x7
|
||||||
.opdesc xyzw, xyzw, xyzw ; 0x8
|
.opdesc xyzw, wwww, wwww ; 0x8
|
||||||
|
@ -10,12 +10,14 @@ Result GSPGPU_AcquireRight(Handle *handle, u8 flags);
|
|||||||
Result GSPGPU_ReleaseRight(Handle *handle);
|
Result GSPGPU_ReleaseRight(Handle *handle);
|
||||||
Result GSPGPU_SetLcdForceBlack(Handle *handle, u8 flags);
|
Result GSPGPU_SetLcdForceBlack(Handle *handle, u8 flags);
|
||||||
Result GSPGPU_FlushDataCache(Handle *handle, u8* adr, u32 size);
|
Result GSPGPU_FlushDataCache(Handle *handle, u8* adr, u32 size);
|
||||||
|
Result GSPGPU_InvalidateDataCache(Handle* handle, u8* adr, u32 size);
|
||||||
Result GSPGPU_WriteHWRegs(Handle *handle, u32 regAddr, u32* data, u8 size);
|
Result GSPGPU_WriteHWRegs(Handle *handle, u32 regAddr, u32* data, u8 size);
|
||||||
Result GSPGPU_WriteHWRegsWithMask(Handle* handle, u32 regAddr, u32* data, u8 datasize, u32* maskdata, u8 masksize);
|
Result GSPGPU_WriteHWRegsWithMask(Handle* handle, u32 regAddr, u32* data, u8 datasize, u32* maskdata, u8 masksize);
|
||||||
Result GSPGPU_ReadHWRegs(Handle *handle, u32 regAddr, u32* data, u8 size);
|
Result GSPGPU_ReadHWRegs(Handle *handle, u32 regAddr, u32* data, u8 size);
|
||||||
Result GSPGPU_RegisterInterruptRelayQueue(Handle *handle, Handle eventHandle, u32 flags, Handle* outMemHandle, u8* threadID);
|
Result GSPGPU_RegisterInterruptRelayQueue(Handle *handle, Handle eventHandle, u32 flags, Handle* outMemHandle, u8* threadID);
|
||||||
Result GSPGPU_UnregisterInterruptRelayQueue(Handle* handle);
|
Result GSPGPU_UnregisterInterruptRelayQueue(Handle* handle);
|
||||||
Result GSPGPU_TriggerCmdReqQueue(Handle *handle);
|
Result GSPGPU_TriggerCmdReqQueue(Handle *handle);
|
||||||
|
|
||||||
Result GSPGPU_submitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle* handle);
|
Result GSPGPU_submitGxCommand(u32* sharedGspCmdBuf, u32 gxCommand[0x8], Handle* handle);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Result initSrv();
|
Result initSrv();
|
||||||
Result exitSrv();
|
Result exitSrv();
|
||||||
Result srv_Initialize(Handle* handleptr);
|
Result srv_RegisterClient(Handle* handleptr);
|
||||||
Result srv_getServiceHandle(Handle* handleptr, Handle* out, char* server);
|
Result srv_getServiceHandle(Handle* handleptr, Handle* out, char* server);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -78,6 +78,23 @@ Result GSPGPU_FlushDataCache(Handle* handle, u8* adr, u32 size)
|
|||||||
return cmdbuf[1];
|
return cmdbuf[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result GSPGPU_InvalidateDataCache(Handle* handle, u8* adr, u32 size)
|
||||||
|
{
|
||||||
|
if(!handle)handle=&gspGpuHandle;
|
||||||
|
|
||||||
|
u32* cmdbuf=getThreadCommandBuffer();
|
||||||
|
cmdbuf[0]=0x90082; //request header code
|
||||||
|
cmdbuf[1]=(u32)adr;
|
||||||
|
cmdbuf[2]=size;
|
||||||
|
cmdbuf[3]=0x0;
|
||||||
|
cmdbuf[4]=0xffff8001;
|
||||||
|
|
||||||
|
Result ret=0;
|
||||||
|
if((ret=svc_sendSyncRequest(*handle)))return ret;
|
||||||
|
|
||||||
|
return cmdbuf[1];
|
||||||
|
}
|
||||||
|
|
||||||
Result GSPGPU_WriteHWRegs(Handle* handle, u32 regAddr, u32* data, u8 size)
|
Result GSPGPU_WriteHWRegs(Handle* handle, u32 regAddr, u32* data, u8 size)
|
||||||
{
|
{
|
||||||
if(!handle)handle=&gspGpuHandle;
|
if(!handle)handle=&gspGpuHandle;
|
||||||
|
@ -11,7 +11,7 @@ Result initSrv()
|
|||||||
{
|
{
|
||||||
Result ret=0;
|
Result ret=0;
|
||||||
if(svc_connectToPort(&srvHandle, "srv:"))return ret;
|
if(svc_connectToPort(&srvHandle, "srv:"))return ret;
|
||||||
return srv_Initialize(&srvHandle);
|
return srv_RegisterClient(&srvHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result exitSrv()
|
Result exitSrv()
|
||||||
@ -19,7 +19,7 @@ Result exitSrv()
|
|||||||
if(srvHandle)svc_closeHandle(srvHandle);
|
if(srvHandle)svc_closeHandle(srvHandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
Result srv_Initialize(Handle* handleptr)
|
Result srv_RegisterClient(Handle* handleptr)
|
||||||
{
|
{
|
||||||
if(!handleptr)handleptr=&srvHandle;
|
if(!handleptr)handleptr=&srvHandle;
|
||||||
u32* cmdbuf=getThreadCommandBuffer();
|
u32* cmdbuf=getThreadCommandBuffer();
|
||||||
|
Loading…
Reference in New Issue
Block a user