fix the return value of LdrLoadImage, make use of __declspec(dllexport), speed up blitting, add dummy TEB, redesign the syscall interface, fix stack alignent so movaps doesn't crash, implement a shitload of win32, implement a simple shell, add bink as video.exe 😎, minor kmain.c cleanup, HAL now supports power-off events, implemented \b in hal_screen.c, fix many deadlocks, add wait for exit event for processes, completely new error codes, small readme changes.
This commit is contained in:
1 parent
c13dd99150
commit
7f4052f41c
33 files changed
+6396
-735
No files matched your search
@@ -0,0 +1,86 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <intrin.h>
|
||||
#include "bink.h"
|
||||
|
||||
void OutputDebugStringA(const char* s);
|
||||
_Noreturn void ExitProcess(unsigned int code);
|
||||
void* HeapAlloc(void* heap, unsigned long flags, size_t size);
|
||||
void BitBlt(int x, int y, int w, int h, const uint32_t* pixels);
|
||||
void* CreateFileA(const char* name, unsigned long access,
|
||||
unsigned long share, void* sa,
|
||||
unsigned long disp, unsigned long flags,
|
||||
void* templ);
|
||||
unsigned long GetFileSize(void* handle, unsigned long* high);
|
||||
int ReadFile(void* handle, void* buf, unsigned long toRead,
|
||||
unsigned long* read, void* overlapped);
|
||||
|
||||
int main() {
|
||||
OutputDebugStringA("video: starting\n");
|
||||
|
||||
// void* f = CreateFileA("video.bk2", 0, 0, 0, 3, 0, 0);
|
||||
// if (!f) {
|
||||
// OutputDebugStringA("video: failed to open video.bk2\n");
|
||||
// ExitProcess(1);
|
||||
// }
|
||||
|
||||
// unsigned long s = GetFileSize(f, 0);
|
||||
// void* buf = HeapAlloc(0, 0, s);
|
||||
// if (!buf) {
|
||||
// OutputDebugStringA("video: HeapAlloc failed\n");
|
||||
// ExitProcess(1);
|
||||
// }
|
||||
|
||||
// int r = ReadFile(f, buf, s, 0, 0);
|
||||
// if (!r) {
|
||||
// OutputDebugStringA("video: ReadFile failed\n");
|
||||
// ExitProcess(1);
|
||||
// }
|
||||
// OutputDebugStringA("video: video.bk2 loaded\n");
|
||||
|
||||
// HBINK bink = BinkOpen(buf, BINKFROMMEMORY);
|
||||
// if (!bink) {
|
||||
// OutputDebugStringA("video: BinkOpen failed: ");
|
||||
// OutputDebugStringA(BinkGetError());
|
||||
// OutputDebugStringA("\n");
|
||||
// ExitProcess(1);
|
||||
// }
|
||||
|
||||
// uint32_t width = bink->Width;
|
||||
// uint32_t height = bink->Height;
|
||||
|
||||
// uint32_t* fb = HeapAlloc(0, 0, width * height * sizeof(uint32_t));
|
||||
// if (!fb) {
|
||||
// OutputDebugStringA("video: framebuffer alloc failed\n");
|
||||
// ExitProcess(1);
|
||||
// }
|
||||
|
||||
// while (1) {
|
||||
// if (BinkWait(bink)) {
|
||||
// _mm_pause();
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// BinkDoFrame(bink);
|
||||
|
||||
// if (BinkShouldSkip(bink)) {
|
||||
// BinkNextFrame(bink);
|
||||
// BinkDoFrame(bink);
|
||||
// continue;
|
||||
// }
|
||||
|
||||
// BinkCopyToBuffer(bink, fb, width * 4, height, 0, 0, BINKSURFACE32);
|
||||
// BitBlt(0, 0, width, height, fb);
|
||||
|
||||
// if (bink->FrameNum == bink->Frames)
|
||||
// break;
|
||||
|
||||
// BinkNextFrame(bink);
|
||||
// }
|
||||
|
||||
// BinkClose(bink);
|
||||
for (int i = 0; i < 10000000; i++) _mm_pause();
|
||||
OutputDebugStringA("video: done\n");
|
||||
ExitProcess(0);
|
||||
}
|
||||
Reference in new issue
Block a user