Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 Everything looks correct. It's in your POKEY initialization most likely. Quote Link to comment Share on other sites More sharing options...
+darryl1970 Posted September 2, 2020 Author Share Posted September 2, 2020 (edited) 25 minutes ago, Synthpopalooza said: Everything looks correct. It's in your POKEY initialization most likely. How do I initialize Pokey? (I also tried SKCTL=$03) pokeybase[[PAUDCTL]]=0 pokeybase[[PSKCTL]]=$02 Edited September 2, 2020 by darryl1970 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 first off PSKCTL should be $03 .. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 Also, make sure this is present at the beginning of your code: set pokeysupport on Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 I think the register on 7800 may be called SKCTLS or PSKCTLS ... Quote Link to comment Share on other sites More sharing options...
+darryl1970 Posted September 2, 2020 Author Share Posted September 2, 2020 (edited) Maybe I need to wait to see if there is something broken in the Pokey routines? Edited September 2, 2020 by darryl1970 Quote Link to comment Share on other sites More sharing options...
+darryl1970 Posted September 2, 2020 Author Share Posted September 2, 2020 7 hours ago, darryl1970 said: Maybe I need to wait to see if there is something broken in the Pokey routines? @RevEng, do you have any insight on this? Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 2, 2020 Share Posted September 2, 2020 I'm not really a pokey guru, but the 7800basic code looks formatted correctly. Are we sure about the PSKCTL=3? Looking at the register breakdown, 3 would be keyb_debounce+enable_keyb_scan, which doesn't seem right. PSKCTL=8 (bit 3) would be serial-two tone mode, though I'm not sure if that's what you guys are after or not. Quote Link to comment Share on other sites More sharing options...
+darryl1970 Posted September 2, 2020 Author Share Posted September 2, 2020 (edited) 9 minutes ago, RevEng said: I'm not really a pokey guru, but the 7800basic code looks formatted correctly. Are we sure about the PSKCTL=3? Looking at the register breakdown, 3 would be keyboard debounce+enable_kb_scan. PSKCTL=8 (bit 3) would be serial-two tone mode. Not sure if that's your goal or not. I tried converting the regular "pokey.bas" demo to manually setting the PAUDF0, etc. I do not get any sound with that either. I also tried $08 without any change. I am trying to combine channels 3 & 4. Is it possible that the manual Pokey registers are not mapped correctly, or could the "psound" support be overwriting any manual entries. (I removed all of the psound calls). Edited September 2, 2020 by darryl1970 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 25 minutes ago, RevEng said: I'm not really a pokey guru, but the 7800basic code looks formatted correctly. Are we sure about the PSKCTL=3? Looking at the register breakdown, 3 would be keyb_debounce+enable_keyb_scan, which doesn't seem right. PSKCTL=8 (bit 3) would be serial-two tone mode, though I'm not sure if that's what you guys are after or not. $03 is the correct default. $8B is for two-tone mode. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 18 minutes ago, darryl1970 said: I tried converting the regular "pokey.bas" demo to manually setting the PAUDF0, etc. I do not get any sound with that either. I also tried $08 without any change. I am trying to combine channels 3 & 4. Is it possible that the manual Pokey registers are not mapped correctly, or could the "psound" support be overwriting any manual entries. (I removed all of the psound calls). Very possible. POKEY may either be at $4000 or $450 ... most homebrew games use $450 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 Should there not be variables set for these addresses? i.e. pokeyaddr=$450, audctl=pokeyaddr+$08, skctl=pokeyaddr+$0F, etc. 1 Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 2, 2020 Share Posted September 2, 2020 3 minutes ago, Synthpopalooza said: Should there not be variables set for these addresses? i.e. pokeyaddr=$450, audctl=pokeyaddr+$08, skctl=pokeyaddr+$0F, etc. No. 7800basic uses dynamic pokey locations, so one cart can support multiple locations. To do that, "pokeybase" is the indirect pointer to the pokey, and the definitions for PSKCTL and friends are just offsets for the particular register from the base, which get loaded into the y register. 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 Had a thought. Post up the .asm file generated from your compile. I'd like to look it over. 1 Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 2, 2020 Share Posted September 2, 2020 46 minutes ago, darryl1970 said: Is it possible that the manual Pokey registers are not mapped correctly, or could the "psound" support be overwriting any manual entries. (I removed all of the psound calls). It looks like 7800basic isn't treating the pokey constants as... constants. Try adding this to top of your game... const PAUDF0 = PAUDF0 const PAUDC0 = PAUDC0 const PAUDF1 = PAUDF1 const PAUDC1 = PAUDC1 const PAUDF2 = PAUDF2 const PAUDC2 = PAUDC2 const PAUDF3 = PAUDF3 const PAUDC3 = PAUDC3 const PAUDCTL = PAUDCTL const PRANDOM = PRANDOM const PSKCTL = PSKCTL I'll squash it for the next release. 2 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 2, 2020 Share Posted September 2, 2020 Also, there is another register ... PSTIMER ... it's located at POKEYADDR+$09. This is used as a system timer in my polycounter reset code. Quote Link to comment Share on other sites More sharing options...
RevEng Posted September 2, 2020 Share Posted September 2, 2020 It's not defined in my list, so for that one do "const PSTIMER = 9" Quote Link to comment Share on other sites More sharing options...
+darryl1970 Posted September 3, 2020 Author Share Posted September 3, 2020 16 minutes ago, Synthpopalooza said: Had a thought. Post up the .asm file generated from your compile. I'd like to look it over. Thank you. I got it to play using the constants. Is the assembler that text file that is generated. I can't seem to find an asm file? Might need some suggestions later on. 8 minutes ago, RevEng said: It looks like 7800basic isn't treating the constants as... constants. Try adding this to top of your game... const PAUDF0 = PAUDF0 const PAUDC0 = PAUDC0 const PAUDF1 = PAUDF1 const PAUDC1 = PAUDC1 const PAUDF2 = PAUDF2 const PAUDC2 = PAUDC2 const PAUDF3 = PAUDF3 const PAUDC3 = PAUDC3 const PAUDCTL = PAUDCTL const PRANDOM = PRANDOM const PSKCTL = PSKCTL I'll squash it for the next release. This was the key. It is playing. Just in time. I was walking the dog when all of the replies came through. Just came in to shut down and head to bed. I can rest better now! Thanks @RevEng and @Synthpopalooza for all of the help! It's a little rough, but I can worry about that now that it's working. ------------------------------------------------------------------------ Any suggestions on how I can play a Pokey cart bigger than 32K? My sacrificed Ballblazer can't hand this 48k game. If I have to use bank switching, I might need some advice too. I played with it in bAtari Basic, but have a feeling that this might be more complicated. Off to bed. Thanks again! Night. PopeyeMiniGame_beta3-2_EarlyPokey.a78 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 3, 2020 Share Posted September 3, 2020 7800basic generates a .asm file which is the .bas file rendered in assembly. Don't need it now, RevEng sorted it. One suggestion: Make sure your volume does not decrement below 0, or you will get popping, especially in 16-bit or any other settings requiring 2 channels with a $00 setting on one of them. 1 Quote Link to comment Share on other sites More sharing options...
+darryl1970 Posted September 3, 2020 Author Share Posted September 3, 2020 15 hours ago, Synthpopalooza said: 7800basic generates a .asm file which is the .bas file rendered in assembly. Don't need it now, RevEng sorted it. One suggestion: Make sure your volume does not decrement below 0, or you will get popping, especially in 16-bit or any other settings requiring 2 channels with a $00 setting on one of them. Thanks. I made sure to handle that. I can see where that would be an issue. I added the heart distress tune. I need to readjust the character frame rates, better mute Pokey during different times, etc. Here's a quick peek. 4 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted September 3, 2020 Share Posted September 3, 2020 I have to say that you progressed nicely with Popeye so far. Of course, you still have to properly implement the spinach theme. 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 3, 2020 Share Posted September 3, 2020 5 hours ago, SlidellMan said: I have to say that you progressed nicely with Popeye so far. Of course, you still have to properly implement the spinach theme. I have some ideas on that one ... give me a few 3 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 4, 2020 Share Posted September 4, 2020 One thing I suggest: Download Audacity. Then get the arcade Spinach music and load it in Audacity. Then use the change tempo to slow it down. I find this a great help when transcribing music from Arcade to POKEY. Quote Link to comment Share on other sites More sharing options...
Jinks Posted September 4, 2020 Share Posted September 4, 2020 Wow that looks great. Did I say that already? 1 Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted September 4, 2020 Share Posted September 4, 2020 So some thoughts... Listen closely... the bass drops out when the harmony plays. So this tune only uses a 16 and 8 bit channel. You can do it this way and have a POKEY for sfx ... or fully flesh out the bass line and keep game fx in TIA. Your choice. 3 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.