Closed iz2rpn closed 5 months ago
You need to call SYS_doVBlankProcess() instead of VDP_waitVSync(). I guess you used an outdated tutorial. Better to start out from available samples (sample folder) to avoid that kind of issues ;-)
I'm sorry, I hadn't seen the wiki, I tried it and it works great, it was my emotion, my goal of creating a cartridge is getting closer and closer. thanks for what you do and sorry again
I am testing a project on Windows 11 that uses SGDK to compile a controller pad for the Sega Genesis. The ROM runs, but the keyboard inputs are not being recognized. The only way to detect a pad button press is to perform a hard reset and press a button, which gets recognized only once. Here is the code I am using:
include
// Function declarations static void handleInput(); static void debugInput(u16 value);
// Global variable for the frame counter static u32 frameCounter = 0;
int main() { // Initialize SGDK VDP_drawText("Initializing...", 6, 2); JOY_init(); VDP_drawText("SGDK Initialized", 6, 4);
}
static void handleInput() { // Variable to store the pad input u16 value = JOY_readJoypad(JOY_1);
}
// Function to show the input value for debugging static void debugInput(u16 value) { char str[20]; sprintf(str, "Input: %04X", value); VDP_drawText(str, 2, 26); }