+Ryan Witmer Posted January 10, 2010 Share Posted January 10, 2010 Hello, amateur 5200 assembler here with some input problems. I'm currently trying to write a simple program that just places a sprite on the screen that can be manipulated with the joystick. I have this working perfectly via an emulator, but when I run my code on an actual console, I only get 0s from the joystick. After doing tons of research, I think I must be missing some sort of enabling bit somewhere that just isn't handled correctly in the emulator. I learned that I need to set bit 2 of CONSOL, and I've done this, but I must be missing something else. Are there any flags that need to be dealt with to get joystick input, and if so, what are they? Quote Link to comment Share on other sites More sharing options...
Rybags Posted January 10, 2010 Share Posted January 10, 2010 5200 uses the POTn registers on Pokey for the stick directions, so a POTGO sequence is needed each VBlank. I'm not sure if that's done automatically by the 5200 BIOS, but it should be documented somewhere. Quote Link to comment Share on other sites More sharing options...
+Ryan Witmer Posted January 10, 2010 Author Share Posted January 10, 2010 5200 uses the POTn registers on Pokey for the stick directions, so a POTGO sequence is needed each VBlank. I'm not sure if that's done automatically by the 5200 BIOS, but it should be documented somewhere. The documentation I found says that POTGO is fired by the default VBI routine, which I haven't changed. Just to be on the safe side, I tried doing it manually in my code, but to no avail. I can't seem to find any sample source that illustrates joystick input. I guess I just need to keep looking. Quote Link to comment Share on other sites More sharing options...
+Ryan Witmer Posted January 10, 2010 Author Share Posted January 10, 2010 I found the answer to this. I needed to enable bit 1 in the SKCTL register. Everything is happy now. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.