KevKelley Posted September 28 Share Posted September 28 I was playing around with some ideas but was having an issue with integrating the keypad code from this old thread. I am assuming that it isn't working properly because it is not set up for DPC+. Not sure if I was missing something or not. I had also considered using a paddle but thought trying to make a keypad game could be cool. TROMBONE_09_27_2024.bas 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted September 28 Share Posted September 28 My light are finally back on. Many things to do to get things back to normal (we probably lost most stuff in the refrigerator and freezer). In case I forget to come back to this thread, please PM me with the answer that you get so I can put it on the bB page. Thanks. 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted September 28 Author Share Posted September 28 36 minutes ago, Random Terrain said: My light are finally back on. Many things to do to get things back to normal (we probably lost most stuff in the refrigerator and freezer). In case I forget to come back to this thread, please PM me with the answer that you get so I can put it on the bB page. Thanks. Okay. Hope everything is okay (apart from the food). 1 Quote Link to comment Share on other sites More sharing options...
Prizrak Posted Sunday at 01:52 PM Share Posted Sunday at 01:52 PM 15 hours ago, Random Terrain said: My light are finally back on. Many things to do to get things back to normal (we probably lost most stuff in the refrigerator and freezer). In case I forget to come back to this thread, please PM me with the answer that you get so I can put it on the bB page. Thanks. You impacted by the hurricane too? 1 Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted Sunday at 02:16 PM Share Posted Sunday at 02:16 PM 11 minutes ago, Prizrak said: You impacted by the hurricane too? I think it was a tropical storm by the time it came through and blew over a bunch of trees and caused flooding in various areas. We kind of live on a hill semi-near Charlotte, NC, so we didn't have any flooding problems. 1 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted Monday at 01:00 PM Author Share Posted Monday at 01:00 PM So far nothing I came across online indicated some existing code for DPC+ Keypads or even Paddle reading. I am still interested in figuring out a way but I may redirect my time using a different method or make a standard kernel version. 1 Quote Link to comment Share on other sites More sharing options...
+Karl G Posted Monday at 06:29 PM Share Posted Monday at 06:29 PM On 9/28/2024 at 12:24 PM, KevKelley said: I was playing around with some ideas but was having an issue with integrating the keypad code from this old thread. I am assuming that it isn't working properly because it is not set up for DPC+. TL;DR I did some modifications, and the keypad demo code seems to be working with DPC+, at least via Stella. I didn't redraw the playfield that the existing demo uses for DPC+ because I was lazy, but the sprites move based on the detected button. Longer explanation: the demo runs most of the keypad code in the vblank time interval, probably because the standard kernel has a decent number of free cycles in vblank. vblank is all but unusable in the DPC+ kernel due to lack of cycles, and because the bank where it would need to go (bank 1) is almost completely filled. I tried to solve issue #2 by switching to another bank from the vblank routine, but this caused problems, probably because of issue #1. I then moved the inline statement to a bB routine which is called right before drawscreen. This appears to work in Stella at least. The downside is that it reduces your available per-frame cycles. How much? I'm not sure. It may or may not be practical for a DPC+ game (but I'm interested to hear either way). Let me know how well this works for you. Edit: I forgot to mention that this requires the ASM files included in this package: https://forums.atariage.com/applications/core/interface/file/attachment.php?id=135272 keydpc.bas keydpc.bas.bin 2 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted Tuesday at 12:13 AM Author Share Posted Tuesday at 12:13 AM 5 hours ago, Karl G said: I'm not sure. It may or may not be practical for a DPC+ game (but I'm interested to hear either way). Let me know how well Thanks! I will check it out. Basically my son has taken up trombone. I was a woodwind so I thought it would be fun to learn a bass brass instrument with no keys by making a kind of program to learn slide positions and notes. That is where the keypads came into play. I was gonna make him a program that would have the notes scroll across the bar and have the player use keypads to choose slide position and octave. I don’t think I would need nanosecond precision. If I couldn’t figure this one out I was gonna try a paddle to have the trombone slide go in or out and if that didn’t work just use the joystick. 2 Quote Link to comment Share on other sites More sharing options...
KevKelley Posted Wednesday at 07:20 PM Author Share Posted Wednesday at 07:20 PM Everything works out perfectly! I had played around with some of the code before and played with it outside of the vblank and in different banks but didn't dig too deep. With this template you fixed up I can plug in the data for my trombone program and I'm sure others might be able to find this useful too. Thanks! 2 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.