2015-10-16 09:46:18 +00:00
|
|
|
#include <iostream>
|
|
|
|
#if GEKKO
|
|
|
|
#include <gccore.h>
|
|
|
|
#if HW_RVL
|
|
|
|
#include <wiiuse/wpad.h>
|
|
|
|
#endif
|
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
static void* xfb = nullptr;
|
2015-10-16 09:46:18 +00:00
|
|
|
static GXRModeObj* rmode = nullptr;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2016-03-04 23:00:12 +00:00
|
|
|
#include <athena/MemoryReader.hpp>
|
2015-10-16 09:46:18 +00:00
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
int main() {
|
2015-10-16 09:46:18 +00:00
|
|
|
#if GEKKO
|
2018-12-08 05:18:17 +00:00
|
|
|
VIDEO_Init();
|
2015-10-16 09:46:18 +00:00
|
|
|
#if HW_RVL
|
2018-12-08 05:18:17 +00:00
|
|
|
WPAD_Init();
|
2015-10-16 09:46:18 +00:00
|
|
|
#endif
|
2018-12-08 05:18:17 +00:00
|
|
|
PAD_Init();
|
2015-10-16 09:46:18 +00:00
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
rmode = VIDEO_GetPreferredMode(nullptr);
|
|
|
|
xfb = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
|
2015-10-16 09:46:18 +00:00
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
CON_Init(xfb, 20, 20, rmode->fbWidth, rmode->xfbHeight, rmode->fbWidth * VI_DISPLAY_PIX_SZ);
|
|
|
|
CON_EnableGecko(CARD_SLOTB, true);
|
2015-10-16 09:46:18 +00:00
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
VIDEO_Configure(rmode);
|
|
|
|
VIDEO_SetBlack(false);
|
2015-10-16 09:46:18 +00:00
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
VIDEO_Flush();
|
2015-10-16 09:46:18 +00:00
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
VIDEO_WaitVSync();
|
|
|
|
if (rmode->viTVMode & VI_NON_INTERLACE)
|
2015-10-16 09:46:18 +00:00
|
|
|
VIDEO_WaitVSync();
|
|
|
|
|
2018-12-08 05:18:17 +00:00
|
|
|
athena::io::MemoryCopyReader test("sd:/test.dat");
|
|
|
|
while (true) {
|
2015-10-16 09:46:18 +00:00
|
|
|
#if HW_RVL
|
2018-12-08 05:18:17 +00:00
|
|
|
WPAD_ScanPads();
|
2015-10-16 09:46:18 +00:00
|
|
|
#endif
|
2018-12-08 05:18:17 +00:00
|
|
|
PAD_ScanPads();
|
|
|
|
if (PAD_ButtonsDown(0) & PAD_BUTTON_START)
|
|
|
|
break;
|
2015-10-16 09:46:18 +00:00
|
|
|
|
|
|
|
#if HW_RVL
|
2018-12-08 05:18:17 +00:00
|
|
|
if (WPAD_ButtonsDown(0) & WPAD_BUTTON_HOME)
|
|
|
|
break;
|
2015-10-16 09:46:18 +00:00
|
|
|
#endif
|
2018-12-08 05:18:17 +00:00
|
|
|
VIDEO_WaitVSync();
|
|
|
|
}
|
2015-10-16 09:46:18 +00:00
|
|
|
#endif
|
2018-12-08 05:18:17 +00:00
|
|
|
return 0;
|
2015-10-16 09:46:18 +00:00
|
|
|
}
|