Uint64 DrvUtil_Video_2DStream(void *Ent, void *Buffer, int Length,
tDrvUtil_Video_2DHandlers *Handlers, int SizeofHandlers)
{
- Uint8 *stream = Buffer;
+ void *stream = Buffer;
int rem = Length;
int op;
while( rem )
{
rem --;
- op = *stream++;
+ op = *(Uint8*)stream;
+ stream = (void*)((tVAddr)stream + 1);
if(op > NUM_VIDEO_2DOPS) {
Log_Warning("DrvUtil", "DrvUtil_Video_2DStream: Unknown"
Handlers->Fill(
Ent,
- *(Uint16*)(&stream[0]), *(Uint16*)(&stream[2]),
- *(Uint16*)(&stream[4]), *(Uint16*)(&stream[6]),
- *(Uint32*)(&stream[8])
+ ((Uint16*)stream)[0], ((Uint16*)stream)[1],
+ ((Uint16*)stream)[2], ((Uint16*)stream)[3],
+ ((Uint32*)stream)[4]
);
rem -= 12;
- stream += 12;
+ stream = (void*)((tVAddr)stream + 12);
break;
case VIDEO_2DOP_BLIT:
- if(rem < 12) return Length-rem;
+ if(rem < 16) return Length-rem;
if(!Handlers->Blit) {
Log_Warning("DrvUtil", "DrvUtil_Video_2DStream: Driver"
return Length-rem;
}
- //Log("Handlers->Blit{%}}(%p, %i,%i, %i,%i, %i,%i)",
- // Handlers->Blit, Ent,
- // *(Uint16*)(&stream[0]), *(Uint16*)(&stream[2]),
- // *(Uint16*)(&stream[4]), *(Uint16*)(&stream[6]),
- // *(Uint16*)(&stream[8]), *(Uint16*)(&stream[10])
- // );
Handlers->Blit(
Ent,
- *(Uint16*)(&stream[0]), *(Uint16*)(&stream[2]),
- *(Uint16*)(&stream[4]), *(Uint16*)(&stream[6]),
- *(Uint16*)(&stream[8]), *(Uint16*)(&stream[10])
+ ((Uint16*)stream)[0], ((Uint16*)stream)[1],
+ ((Uint16*)stream)[2], ((Uint16*)stream)[3],
+ ((Uint16*)stream)[4], ((Uint16*)stream)[5]
);
- rem -= 12;
- stream += 12;
+ rem -= 16;
+ stream = (void*)((tVAddr)stream + 16);
break;
}
// -- Core Thread --
// Only used for the core kernel
tThread gThreadZero = {
- Status: THREAD_STAT_ACTIVE, // Status
- ThreadName: (char*)"ThreadZero", // Name
- Quantum: DEFAULT_QUANTUM, // Default Quantum
- Remaining: DEFAULT_QUANTUM, // Current Quantum
- Priority: DEFAULT_PRIORITY // Number of tickets
+ .Status = THREAD_STAT_ACTIVE, // Status
+ .ThreadName = (char*)"ThreadZero", // Name
+ .Quantum = DEFAULT_QUANTUM, // Default Quantum
+ .Remaining = DEFAULT_QUANTUM, // Current Quantum
+ .Priority = DEFAULT_PRIORITY // Number of tickets
};
// -- Processes --
// --- Locks ---
include $(ACESSDIR)/Makefile.x86_64.cfg
+OBJDUMP := objdump -S
+
CC := $(SAVED_CC_)
LD := $(SAVED_LD_)
--- /dev/null
+
+ASFLAGS = -felf
ARCHDIR = x86_64
+ASFLAGS = -felf64
+
// === GLOBALS ===
//! Loopback (127.0.0.0/8, ::1) Pseudo-Interface
tInterface gIP_LoopInterface = {
- Node: {
- ImplPtr: &gIP_LoopInterface,
- Flags: VFS_FFLAG_DIRECTORY,
- Size: -1,
- NumACLs: 1,
- ACLs: &gVFS_ACL_EveryoneRX,
- ReadDir: IPStack_Iface_ReadDir,
- FindDir: IPStack_Iface_FindDir,
- IOCtl: IPStack_Iface_IOCtl
+ .Node = {
+ .ImplPtr = &gIP_LoopInterface,
+ .Flags = VFS_FFLAG_DIRECTORY,
+ .Size = -1,
+ .NumACLs = 1,
+ .ACLs = &gVFS_ACL_EveryoneRX,
+ .ReadDir = IPStack_Iface_ReadDir,
+ .FindDir = IPStack_Iface_FindDir,
+ .IOCtl = IPStack_Iface_IOCtl
},
- Adapter: NULL,
- Type: 0
+ .Adapter = NULL,
+ .Type = 0
};
tShortSpinlock glIP_Interfaces;
tInterface *gIP_Interfaces = NULL;
tSocketFile *gIP_FileTemplates;
tAdapter gIP_LoopAdapter = {
- DeviceLen: 8,
- Device: "LOOPBACK"
+ .DeviceLen = 8,
+ .Device = "LOOPBACK"
};
tMutex glIP_Adapters;
tAdapter *gIP_Adapters = NULL;
tRoute *gIP_Routes;
tRoute *gIP_RoutesEnd;
tVFS_Node gIP_RouteNode = {
- Flags: VFS_FFLAG_DIRECTORY,
- Size: -1,
- NumACLs: 1,
- ACLs: &gVFS_ACL_EveryoneRX,
- ReadDir: IPStack_RouteDir_ReadDir,
- FindDir: IPStack_RouteDir_FindDir,
- IOCtl: IPStack_RouteDir_IOCtl
+ .Flags = VFS_FFLAG_DIRECTORY,
+ .Size = -1,
+ .NumACLs = 1,
+ .ACLs = &gVFS_ACL_EveryoneRX,
+ .ReadDir = IPStack_RouteDir_ReadDir,
+ .FindDir = IPStack_RouteDir_FindDir,
+ .IOCtl = IPStack_RouteDir_IOCtl
};
// === CODE ===