mirror of
https://github.com/xemu-project/xemu-test.git
synced 2024-11-23 01:49:40 +00:00
44 lines
792 B
C
44 lines
792 B
C
#include <hal/debug.h>
|
|
|
|
#include <hal/video.h>
|
|
#include <windows.h>
|
|
#include <nxdk/mount.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
int main(void)
|
|
{
|
|
XVideoSetMode(640, 480, 32, REFRESH_DEFAULT);
|
|
|
|
for (int i = 0; i < 10; i++) {
|
|
debugPrint("Hello nxdk!\n");
|
|
Sleep(500);
|
|
}
|
|
|
|
BOOL ret = nxMountDrive('C', "\\Device\\Harddisk0\\Partition2\\");
|
|
if (!ret) {
|
|
debugPrint("Failed to mount C: drive!\n");
|
|
goto shutdown;
|
|
}
|
|
|
|
CreateDirectoryA("C:\\results", NULL);
|
|
|
|
FILE *f = fopen("C:\\results\\results.txt", "w");
|
|
if (!f) {
|
|
goto shutdown;
|
|
}
|
|
|
|
const char *buf = "Success";
|
|
fwrite(buf, strlen(buf), 1, f);
|
|
fclose(f);
|
|
|
|
|
|
shutdown:
|
|
HalInitiateShutdown();
|
|
while (1) {
|
|
Sleep(2000);
|
|
}
|
|
|
|
return 0;
|
|
}
|