Revontuli Posted December 13, 2022 Author Share Posted December 13, 2022 (edited) 8 hours ago, Pat Brady said: With POKEY 8-bit channels, it's a lot easier to get good results than TIA, but you still have to be careful. For this Satie piece, that conversion doesn't sound bad at all, but there are a few different ways to do it, and I think with some experimentation you might find something you like better. Let me know if you'd like me to take a more detailed look or provide more specific suggestions. Feel free to PM if you'd prefer. I'll likely PM you later - thank you! I have some more open ended questions about making "insturments" and various POKEY settings, and already found the excellent Music Note->POKEY spreadsheet (the lynchpin of the MIDI conversion table), but I'm still largely playing with the simple square wave. There's a reason I picked Satie - the music is brilliant, but still technically (computer-wise) fairly simple, entirely piano, and kept within a few octaves, so I don't need to worry too much about harmonizing with a bass beat or trying to keep odd waveforms cooperating with each other. Anything more complicated is an absolute nightmare to try with the TIA, and still a concern with the POKEY. 6 hours ago, Karl G said: I personally love what you have done with the TIA, and I definitely don't think it would be a bad thing if you ended up deciding that adding POKEY wouldn't be justified for reasons of code size or cart cost. Thank you! As much as I harp on the TIA, I've gained quite a bit of affection for it. After a lot of work I've found I can give it a unique tone, and the 7800's resources can give it *some* musical chops. Even if I go POKEY, I'm planning on having it be optional and keeping the TIA soundtrack as a fallback (I worked too darn hard at making those tunes to just throw them out ) 5 hours ago, RevEng said: I know firsthand that midi conversions can take up a fair bit of rom, since it's "performance" data and missing pattern structure. You might consider switching from memcpy to using lz4 (de)compression at some point, if rom is tight. Given how I've scoped things, I might be able to get away without compression for *this* project, but lz4 and its kin will certainly be on my list of things to integrate if/when I start my RPG project. Even with a bigger ROM, music and text will expand to devour all space they can without some kind of managment. I think I have an approach that will work within 7800Basic, given all of your input and some further thought. Thank you for all your help and advice! I try not to @ too often, and I appreciate all the work you've done. This game would not exist without the code and knowledge base you've built! Here's a parting sample/comparison - Satie's Gnossiennes #4, used for the main labyrinth. I think I did a decent job arranging it in 2(ish) octaves and 1.5 channels (one channel is shared with the game sfx, and only really used if there's two notes played with different priorities): Gnoss4TIA.ogg This is the straight MIDI->Pokey conversion, with minimal cleanup or arranging. While I still like how the TIA version sounds, I'll admit it's hard for it to compete with 4 channels and 8 times the resolution Gnoss4Pokey.ogg Edited December 13, 2022 by Revontuli 5 Quote Link to comment Share on other sites More sharing options...
Ecernosoft Posted December 14, 2022 Share Posted December 14, 2022 (edited) 23 hours ago, Revontuli said: I'll likely PM you later - thank you! I have some more open ended questions about making "insturments" and various POKEY settings, and already found the excellent Music Note->POKEY spreadsheet (the lynchpin of the MIDI conversion table), but I'm still largely playing with the simple square wave. There's a reason I picked Satie - the music is brilliant, but still technically (computer-wise) fairly simple, entirely piano, and kept within a few octaves, so I don't need to worry too much about harmonizing with a bass beat or trying to keep odd waveforms cooperating with each other. Anything more complicated is an absolute nightmare to try with the TIA, and still a concern with the POKEY. Thank you! As much as I harp on the TIA, I've gained quite a bit of affection for it. After a lot of work I've found I can give it a unique tone, and the 7800's resources can give it *some* musical chops. Even if I go POKEY, I'm planning on having it be optional and keeping the TIA soundtrack as a fallback (I worked too darn hard at making those tunes to just throw them out ) Given how I've scoped things, I might be able to get away without compression for *this* project, but lz4 and its kin will certainly be on my list of things to integrate if/when I start my RPG project. Even with a bigger ROM, music and text will expand to devour all space they can without some kind of managment. I think I have an approach that will work within 7800Basic, given all of your input and some further thought. Thank you for all your help and advice! I try not to @ too often, and I appreciate all the work you've done. This game would not exist without the code and knowledge base you've built! Here's a parting sample/comparison - Satie's Gnossiennes #4, used for the main labyrinth. I think I did a decent job arranging it in 2(ish) octaves and 1.5 channels (one channel is shared with the game sfx, and only really used if there's two notes played with different priorities): Gnoss4TIA.ogg 480.65 kB · 1 download This is the straight MIDI->Pokey conversion, with minimal cleanup or arranging. While I still like how the TIA version sounds, I'll admit it's hard for it to compete with 4 channels and 8 times the resolution Gnoss4Pokey.ogg 2.16 MB · 1 download I Agree. Everything you do is AMAZING. I would love some POKEY support, but that's just me. Also, do you think this will get a boxed release? POKEY is very similar to the TIA in some ways, but it adds some extra features like some filters, 2-tone mode, and 16 bit mode. Edited December 14, 2022 by Ecernosoft Quote Link to comment Share on other sites More sharing options...
+saxmeister Posted December 18, 2022 Share Posted December 18, 2022 @Revontuli do you mind if I ask how you convert MIDI to POKEY? I'm just curious if a tool already exists for this. Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 18, 2022 Author Share Posted December 18, 2022 11 hours ago, saxmeister said: do you mind if I ask how you convert MIDI to POKEY? I'm just curious if a tool already exists for this. The core of how I'm doing it is a tool called MIDICSV - It takes a MIDI file and converts it into a text file that I can apply my own scripts to parse through and get the pitch and time data I need. I still need to filter out channels, etc. and be very careful about what notes are called, but it beats trying to tackle a MIDI file on its own. I imagine there might be similar pipelines for RMT - it sounds like some kind of RMT support is planned for 7800Basic (which seems like a good way to do it), although regardless it's not a push-button operation. I created my own custom "insturments" in 7800Basic, and wrote a simple tracker that's taking pitch and time. Anything simpler would sound very same-y and probably miss a lot of the POKEY's strengths, and anything more complicated would require a lot of parameters, some kind of compression, etc. 2 Quote Link to comment Share on other sites More sharing options...
Trebor Posted December 19, 2022 Share Posted December 19, 2022 I haven't had as much time as I was hoping to play Harpy's Quest. Though honestly, I went for a considerable amount of time with all four feathers, two flames, a few heart upgrades, but just one key. I did get around to acquiring two more keys, but that last key has got me feeling like... LastKeySearching.mp4 Once I get that elusive fourth (second?) key, I'm heading back to the four consecutive locks. Lord_of_Sipan perspective is appreciated, but do find myself wishing there was an "effects off" like there is a "music off" option due to, especially after a while of playing, needing the volume turned off completely, because of the jump/fly sound effect. As mentioned earlier, a wing flapping simulated sound effect would be much more pleasant. Nonetheless, really a great game. Love the difficulty balance, and the fact that I keep going back to it despite the lack of key discovery at times, and traversing the same areas a few times over, is a testimony to the variety encountered and fun I am having, along with how engaging the game experience has been for me. Love the numerous hidden spots and shortcuts. Plenty of save points which doubles as full health restoration. Though I actually want to lose health at times for the 'second try' harpy appearance, since the respective upgrade was acquired. It is pretty cool and pretty sweet looking... but will leave that as a surprise. Fantastic stuff! 1 1 Quote Link to comment Share on other sites More sharing options...
Trebor Posted December 19, 2022 Share Posted December 19, 2022 1 hour ago, Trebor said: Once I get that elusive fourth (second?) key, Had to stop playing for a moment to post... That key was practically in plain sight. Note: Not found in the above area, just stopped after acquiring it a short while ago, to post an update. 1 Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 19, 2022 Author Share Posted December 19, 2022 (edited) 3 hours ago, Trebor said: Love the difficulty balance, and the fact that I keep going back to it despite the lack of key discovery at times, and traversing the same areas a few times over, is a testimony to the variety encountered and fun I am having, along with how engaging the game experience has been for me. Thank you! Wonderful to hear, as trying to strike that balance is one of the trickiest things to get right, especially since it will be a little different for everyone. 3 hours ago, Trebor said: As mentioned earlier, a wing flapping simulated sound effect would be much more pleasant. I have another flap sound that is a little more subtle, I'll introduce it in the next test build and see what folks think. 3 hours ago, Trebor said: Once I get that elusive fourth (second?) key, I'm heading back to the four consecutive locks Remember where that place is - I've some plans that *aren't* in this current build... The keys themselves are generally meant to be shortcuts, at least for this version, and are probably the most "optional" of the items one can find. In this maze layout, very few powerups are actually needed to get something/somewhere, although they certainly help (beating the game with no powerups is *theoretically* possible but I've yet to see someone do it). As I've mentioned, I've a "2nd Quest" (kind of like Legend of Zelda, or perhaps the Japanese version of SMB2) where I take the gloves off, and might have more key/lock shenanigans along with some more deliberately challenging setups or regions where a specific powerup is, if not necessary, *highly advised*. I'm glad folks can get lost in the maze and still have fun - I was afraid it would still be too small (or too big) given that I give players flight right off the bat. I think I've mentioned speedrunning as a possibility, and it's interesting to see the dichotomy. To give some alternate examples, Legacy of the Wizard for the NES can be spedrun in about a half hour (and TASed in under 15), while Morrowind can be beaten in under 10, so a game can have a lot of potential play time while having a surprisingly small any% playtime. The 2nd quest should hopefully add a bit more of a challenge to those who learn this initial maze/ Thanks again for comments and updates! Edited December 19, 2022 by Revontuli 2 Quote Link to comment Share on other sites More sharing options...
Lord_of_Sipan Posted December 19, 2022 Share Posted December 19, 2022 Hmmm now that I know you can beat the game with no power ups... That sounds like a challenge, Revontuli! Next beta version I think that is my mission. 1 Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 20, 2022 Author Share Posted December 20, 2022 (edited) Busy with a few other things before the holidays kicked off, but did some more work with, well, not the POKEY music itself but the system to queue and wrangle the tracks - all stuff I was taking for granted with the TIA tracker Realized there were issues bankswitching within a subroutine to load a large amount of data (or just bank switching within a subroutine in general) but I got a decent system to work that can load in a large (i.e. a few kilobytes) chunk of memory to the extra 16K of RAM, and then have that data streamed as music. I'm using memcpy and peekchar, and the code looks a little like I'm scanning a graphical plotmap, since that's what the memcpy commands are normally used for, but it's pretty easy to use for general/abstract data. The previously unused bank of ROM also has enough space, even without compression (it's really only 4-5 tracks, and only 2-3 have any real length to them). Having a good sense of the space the music (and new music system) will take, I can finalize bringing in the other features I've sketched out and prototyped, and hopefully make more use of the ROM at my disposal. Now, though, I need to check a lot of edge cases for switching around music - the TIA system worked great, and fit within the universal bank, so I could keep it in one gosub I could call from anywhere. Moving a POKEY track that's stored in a separate bank to the expanded RAM needs to be done strategically, and I need to do it in more than one place (for instance, the gameplay banks vs. the menu bank) as I switch which music track should be played. A situation that's a good way to get spaghetti into your music player I'm tentatively keeping the TIA option in, mainly for sentimental reasons, or for those with an SD cart without a POKEY compatible chip. The game seems to work (and play music) fine on the DragonFly, although I'd like to have other folks give it a spin to see if there are any glitches or hitches in performance. While I have a Concerto, it doesn't have a POKEY chip, so I don't know if POKEY music will work with that layout (I know there's an ongoing potential $450/$4000/header conflict that can occur there). My priority, ultimately, is to get this all onto a cartridge for a full boxed release, so getting it to work on all emulators/SD carts is secondary to using such software and devices to see if it will run on hardware, at least for now. Edited December 20, 2022 by Revontuli 4 Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 23, 2022 Author Share Posted December 23, 2022 (edited) A new beta for Harpy's Curse (I'll post in OP and in the normal 7800 forum thread as well: HarpysCurse_12_22_2022.bas.a78 HarpysCurse_12_22_2022.bas.bin -First pass on the Pokey soundtrack. I want to test the system for cueing/queueing the music as much as the music itself (which I'll likely be tinkering with for a while anyway). The TIA option is there, and I tried it on my POKEY-less Concerto and it seemed to do fine (except for subtle graphical noise during bank switching that I thought I took care of in a more general sense) -Some new sounds! -A silly little effect that took way too much time to implement but I found fun nonetheless (try going in the water) -On the surface not too much has been added (besides the new music), but I've been preparing to add the 2nd quest and shifting stuff around to make sure I can fit it in properly. Those who have found the secret, I haven't expanded on it yet, I'll try and get something relevant to that next update Passwords already found should still be good. I'm still holding off on "turning on" the save option, since that does *not* play nice with certain emulators and settings, but I'll probably bring it in soon since that is one feature that I want working properly if/when it's in! I did some reshuffling of a lot of code and data to make space for current and future features, so (fingers crossed) I hope it still works normally - please enjoy!! Edited December 23, 2022 by Revontuli 6 Quote Link to comment Share on other sites More sharing options...
CrazyChris Posted December 23, 2022 Share Posted December 23, 2022 Can't get this to work in ProSystem Emulator? Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 23, 2022 Author Share Posted December 23, 2022 (edited) 5 hours ago, CrazyChris said: Can't get this to work in ProSystem Emulator? I've regretably had to stop supporting the Prosystem emulator - it has trouble rendering graphics a certain way, and seems to have issues with ROM sizes larger than 48K (at least when I build them) that otherwise run fine on hardware and other emulators. It hasn't been updated since 2015, and I try to keep compatibly more in line with more recent emulators: -BupSystem is the one I usually use when I'm testing features - it's quick and easy to use. -JS7800 can play the game in a browser (just turn off VSync in its settings if it's running slowly). -MAME A7800 is probably the most accurate (and supports things like save peripherals), and I use it as a "dress rehearsal" before testing a feature on hardware. I know Prosystem used to be the go-to 7800 emulator (still kind of is for some setups), but I haven't been able to use it to test 7800 games I've been developing for a while now, and I know others have had similar experiences. Edited December 23, 2022 by Revontuli 4 Quote Link to comment Share on other sites More sharing options...
Lord_of_Sipan Posted December 24, 2022 Share Posted December 24, 2022 Just tried the new rom in my concerto. I am getting the graphical garbage on transitions between menu pages and from menu to game like you mentioned. I am not getting any option to select pokey sound. I get either TIA or no music for the music selection with no pokey option. Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 24, 2022 Author Share Posted December 24, 2022 30 minutes ago, Lord_of_Sipan said: Just tried the new rom in my concerto. I am getting the graphical garbage on transitions between menu pages and from menu to game like you mentioned. I am not getting any option to select pokey sound. I get either TIA or no music for the music selection with no pokey option. 7800Basic on the Concerto seems to have some problems finding the POKEY chip - I know there's been some work on making the process more straightforward, but I'm not sure what the current process is (for a while you needed to change the header, or give it a different address location) - I also don't have a good way of checking if it works on my end as my Concerto lacks a POKEY compatible chip. Quote Link to comment Share on other sites More sharing options...
RevEng Posted December 24, 2022 Share Posted December 24, 2022 The pokey@450 in Concerto, is write-only, which messes with 7800basic's pokey auto-detection. You can bypass the auto-detection and force a pokey@450 by changing "set pokeysupport on" to "set pokeysupport $450", provided you're using a recent enough 7800basic build. 1 Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 24, 2022 Author Share Posted December 24, 2022 2 minutes ago, RevEng said: You can bypass the auto-detection and force a pokey@450 by changing "set pokeysupport on" to "set pokeysupport $450", provided you're using a recent enough 7800basic build OK - I might give this a try. I was holding off on updating to 7800Basic v.20 (updating compilers late in a development cycle is just asking for trouble - it even caused a bit of a speed bump in "Dragon's Havoc" when I had to redo the larger sprite rendering). Another reason I was holding off was I don't want to get into a state where I'm managing multiple ROMbuilds for different emulators (even having a "savekey"-less build was a pain and caused issues when trying to make a definitive build on previous games). What happens if the POKEY *isn't* at $450 (or anywhere)? The documentation implies that setting the address will have the ROM assume *something* is there... Quote Link to comment Share on other sites More sharing options...
RevEng Posted December 24, 2022 Share Posted December 24, 2022 It's up to you... certainly there's no pressure from me for you to do one thing or the other. If there is no pokey and you've enabled one at a specific address in the code, the game acts like pokey is there and writes will go to an address where there's no device listening. Nothing bad will happen, you'll just hear no pokey audio. 1 Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 24, 2022 Author Share Posted December 24, 2022 11 minutes ago, RevEng said: If there is no pokey and you've enabled one at a specific address in the code, the game acts like pokey is there and writes will go to an address where there's no device listening. Nothing bad will happen, you'll just hear no pokey audio. If it's benign, then that should be OK (it's the same amount of cycles either way, just a little confusing since I have Music Off/TIA/On, with "On" meaning "Pokey" as options) - thanks! Updated to 7800Basic v.2 (which seems to be fine once I remembered to add the pokeysound update from this thread) - I'll need to play more to make sure nothing has changed or glitched. @Lord_of_Sipan Here's a concerto build to try - with the warning that I don't know if this will *actually* work since I lack this specific hardware: HarpysCurse_12_23_2022_ConcertoPokey.bas.a78 HarpysCurse_12_23_2022_ConcertoPokey.bas.bin 2 Quote Link to comment Share on other sites More sharing options...
Lord_of_Sipan Posted December 24, 2022 Share Posted December 24, 2022 2 hours ago, Revontuli said: @Lord_of_Sipan Here's a concerto build to try - with the warning that I don't know if this will *actually* work since I lack this specific hardware: HarpysCurse_12_23_2022_ConcertoPokey.bas.a78 128.13 kB · 1 download HarpysCurse_12_23_2022_ConcertoPokey.bas.bin 128 kB · 1 download I’ll try this out tomorrow. 1 Quote Link to comment Share on other sites More sharing options...
Trebor Posted December 24, 2022 Share Posted December 24, 2022 11 hours ago, Revontuli said: Here's a concerto build to try - with the warning that I don't know if this will *actually* work since I lack this specific hardware: HarpysCurse_12_23_2022_ConcertoPokey.bas.a78 128.13 kB · 2 downloads HarpysCurse_12_23_2022_ConcertoPokey.bas.bin 128 kB · 1 download Game plays but no POKEY music. TIA music is present if "MUSIC TIA" is selected. This is not unique to Harpy's Curse though. Having the same experience with "Concerto fixed" builds of A.R.T.I. and Keystone Koppers, as mentioned recently to @Muddyfunster when tested. POKEY music remains absent in those titles too. 3 Quote Link to comment Share on other sites More sharing options...
MrBeefy Posted December 25, 2022 Share Posted December 25, 2022 This is looking really interesting! Keep up the good work! 1 Quote Link to comment Share on other sites More sharing options...
+playsoft Posted December 27, 2022 Share Posted December 27, 2022 When you have both ram@4000 and pokey@450 set in the header, when you run from Concerto you do not get any POKEY audio. However, if you set ram@4000 alone (i.e. without pokey@450) you appear to get pokey@450 for free! If you use 7800header to unset pokey@450 in the Concerto .a78 file you will hear the POKEY music (well, I do running the 0.96 firmware with a real POKEY). 1 1 Quote Link to comment Share on other sites More sharing options...
Revontuli Posted December 27, 2022 Author Share Posted December 27, 2022 7 hours ago, playsoft said: If you use 7800header to unset pokey@450 in the Concerto .a78 file you will hear the POKEY music (well, I do running the 0.96 firmware with a real POKEY). Thank you! I knew there were combinations of the extra RAM and POKEY addresses that didn't play nice on certain setups - I haven't actually done much header editing yet, so I'll see how it works out. I also need to see if those settings play nice with other emulators/sd carts/etc. I'm still trying to keep the variety of ROM builds to a minimum (ideally 1) until I have a "final" build, feature-wise. Then, the priority is getting a proper cartridge build - after that I'll worry about about more compatibility across the various 7800 setups. I'm glad the game at least seems playable on most modern emulators, POKEY addresses and Prosystem emulation notwithstanding. There's still a way for just about everyone to play it, even if it's JS7800. I'm pushing to get the last features in (one smaller secret leading to a much bigger one), hopefully having something a little after New Years! 1 Quote Link to comment Share on other sites More sharing options...
Trebor Posted December 27, 2022 Share Posted December 27, 2022 9 hours ago, playsoft said: When you have both ram@4000 and pokey@450 set in the header, when you run from Concerto you do not get any POKEY audio. However, if you set ram@4000 alone (i.e. without pokey@450) you appear to get pokey@450 for free! If you use 7800header to unset pokey@450 in the Concerto .a78 file you will hear the POKEY music (well, I do running the 0.96 firmware with a real POKEY). Results are inconsistent with that workaround unfortunately from my experience. Here are the current headers for the aforementioned 'Concerto fixed' ROMs: While removing pokey@450 did furnish POKEY sound to be heard under Concerto for Harpy's Curse, A.R.T.I. and Keystone Koppers still were lacking POKEY music. Something else may need to be in place or adjusted to 'guarantee' Concerto plays back POKEY in these instances. Really outside shot here... I believe all titles are built utilizing 7800basic. Maybe dependent on what version of 7800basic is being utilized will signify what Concerto needs 'tweaked' for POKEY to be heard as far as actual game code/commands are concerned (?) 1 Quote Link to comment Share on other sites More sharing options...
+playsoft Posted December 28, 2022 Share Posted December 28, 2022 13 hours ago, Trebor said: Results are inconsistent with that workaround unfortunately from my experience. Yes, unfortunately there is an unrealistic expectation that all programmers need to do is apply a simple "fix" to get POKEY audio on Concerto. None of us completely understand the Concerto firmware issues, so working around them is often a long process of trial and error. However I did want to share what has worked for me, in case it is useful for others. When I have ram@4000, I am able to get POKEY audio from Concerto by not setting pokey@450 in the header and initialising POKEY by simply setting all registers to 0 and then SKCTL to 3 - without doing any POKEY reads. 13 hours ago, Trebor said: Here are the current headers for the aforementioned 'Concerto fixed' ROMs: While removing pokey@450 did furnish POKEY sound to be heard under Concerto for Harpy's Curse, A.R.T.I. and Keystone Koppers still were lacking POKEY music. Something else may need to be in place or adjusted to 'guarantee' Concerto plays back POKEY in these instances. I checked ARTI in the A7800 debugger and it looks like it is doing POKEY discovery which involves POKEY reads. I'd try getting rid of that, just do a simple POKEY initialisation assuming it is present at $450 without any POKEY reads. No guarantees though. 1 1 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.