jetsetdanny Posted August 20, 2025 Report Share Posted August 20, 2025 17 hours ago, Jet Set Willie said: You got me wrong, I wasn´t asking for any changes to the great music!😄 I was just asking if they were done with the "Caveman way" as I think the multi-channel ingame tune was too long to ever fit in if it was tried to be made the "Caveman way". 🙂 That long single channel tune might fit. 🙂 Not sure, though. OK, I wasn't quite sure what you meant by "the Caveman way", but Lemmy has explained it to me since. For those who may still fail to grasp the meaning: Lemmy called creating a JSW128/JSW64 music file using a text editor and decimal-to-hex converter "the Caveman way", as he felt it was not an efficient way of doing it. All right, so I coded the title-screen and in-game music for Herve's Welcome to Willy’s Fun Park! also in a very "primitive" way, pretty much inputting a value after value into the Hex editor, after figuring out what they should be by using piano keys and a reference table. A possible improvement was that I didn't use a decimal-to-hex converter but rather a ready-made reference table with Hex value that correspond to specific music notes. I will include that table in the text I'm going to write about coding the 128K music. Now, regarding this bit: "I think the multi-channel ingame tune was too long to ever fit in if it was tried to be made the "Caveman way"" - I believe this is misleading or at least not logical in that it doesn't matter how you code the music - "the Caveman way" or any other way - it will either fit into the spaces allowed by the JSW128/JSW64 game engine or not. In other words, whether it will fit or not doesn't depend on what way you code it, but rather how long the resulting tune will be (how many bytes it will occupy). As John Elliott explains, the title-screen tune can occupy up to 2774 bytes (that's all three channels plus 6 bytes of header) and the in-game tunes can occupy up to 256 bytes (again, three channels plus the header). I would say it's actually too much for the title-screen tune - who would want to listen to the initial music for a few minutes before hitting ENTER to start playing the game and, in fact, before being able to see the scrolling message? (the scrolly kicks in once the title-screen tune has stopped playing). Conversely, 256 bytes is too little for the in-game tune. I mean, you can fit a decent tune into this space, but one would wish to have more room, especially taking into account the fact that the title-screen tune has so much space that is not really needed. I *think* (please correct me if I'm wrong) that the reason for this imbalance is the fact that the space for the title-screen tune is located in contested memory, which can be used safely before the game starts but not while it's running. You are certainly right that it will be easier for an in-game tune to fit into the 256 bytes of space it has allocated if only has one channel than if it has more than one channel. That is, of course, if the data for each channel is to be different. If you wanted to have a tune that would play the same music over two or even three channels, the length of space needed for it would be the same as the length of space needed for a tune that plays over only one channel and has silence in the other two channels*. That's because in the header you still need to indicate where each channel starts, and so you can indicate for two or even three channels to start at the same spot, and in case you want to have silence over one or two channels, you still need to point to the address where the data for each channel starts. I'll explain it better when I write the post about coding the music I've promised. 17 hours ago, Jet Set Willie said: hank you in advance for intending to write a post about how to make the music using JSWED64/128 format! 🙂 I am not familiar with it at all. Not yet at least. 🙂 Yes, I am very interested to read about that, whenever you will write that in the future. 🫡 OK, I'll do my best to do it sooner than I had planned, but I don't want to promise any specific ETA - I'll just do it when circumstances permit 🙂 . * As I think about it now, to be precise, I believe that in this hypothetical case you would *theoretically* need one byte less for the same music over three channels than for music over a single channel and silence in the other two. That's because in the case of the latter you would need to sacrifice one byte to hold a value of FF to let the program know, concerning the two silent channels, that they are supposed to be silent. You wouldn't need this in case of all three channels playing the same tune. However, that's theoretical, because I guess you could point to the FF value anywhere else in the code and so spare yourself the one byte. Jet Set Willie and Spider 1 1 Quote Link to comment Share on other sites More sharing options...
Jet Set Willie Posted August 21, 2025 Report Share Posted August 21, 2025 On 8/20/2025 at 5:57 AM, jetsetdanny said: Now, regarding this bit: "I think the multi-channel ingame tune was too long to ever fit in if it was tried to be made the "Caveman way"" - I believe this is misleading or at least not logical in that it doesn't matter how you code the music - "the Caveman way" or any other way - it will either fit into the spaces allowed by the JSW128/JSW64 game engine or not. In other words, whether it will fit or not doesn't depend on what way you code it, but rather how long the resulting tune will be (how many bytes it will occupy). I think I was the one what was misleading, sorry for that. 🙂 I just meant that I felt that long 2- or 3-channel ingame tune like the Fun Park´s Itsy Bitsy Teenie Weenie might not fit in 256 bytes. 🙂 On 8/20/2025 at 5:57 AM, jetsetdanny said: I would say it's actually too much for the title-screen tune - who would want to listen to the initial music for a few minutes before hitting ENTER to start playing the game and, in fact, before being able to see the scrolling message? Me, in example, if I like the tune! 🙂 By the way, I have wanted to know, isn´t it possible (or is it?) to be able to run that scrolling message during the AY tune is playing? I think I had read about that from somewhere. Or am I dreaming? 🫠If it isn´t possible yet, maybe someone should modify JSWED /JSW code "a bit". 😋😍 On 8/20/2025 at 5:57 AM, jetsetdanny said: I *think* (please correct me if I'm wrong) that the reason for this imbalance is the fact that the space for the title-screen tune is located in contested memory, which can be used safely before the game starts but not while it's running. I have thought the same, but it´s of course just my thought. And yours, of course! 🙂 On 8/20/2025 at 5:57 AM, jetsetdanny said: You are certainly right that it will be easier for an in-game tune to fit into the 256 bytes of space it has allocated if only has one channel than if it has more than one channel. That is, of course, if the data for each channel is to be different. If you wanted to have a tune that would play the same music over two or even three channels, the length of space needed for it would be the same as the length of space needed for a tune that plays over only one channel and has silence in the other two channels*. That's because in the header you still need to indicate where each channel starts, and so you can indicate for two or even three channels to start at the same spot, and in case you want to have silence over one or two channels, you still need to point to the address where the data for each channel starts. I'll explain it better when I write the post about coding the music I've promised. I had thought that should be possible by putting some piece of code to that text file, but the real solution was much simpler! Thank you!🙂 On 8/20/2025 at 5:57 AM, jetsetdanny said: OK, I'll do my best to do it sooner than I had planned, but I don't want to promise any specific ETA - I'll just do it when circumstances permit 🙂 . Thank you! 🙂 No problem, of course, if you can´t make that sooner. 🙂 On 8/20/2025 at 5:57 AM, jetsetdanny said: * As I think about it now, to be precise, I believe that in this hypothetical case you would *theoretically* need one byte less for the same music over three channels than for music over a single channel and silence in the other two. That's because in the case of the latter you would need to sacrifice one byte to hold a value of FF to let the program know, concerning the two silent channels, that they are supposed to be silent. You wouldn't need this in case of all three channels playing the same tune. However, that's theoretical, because I guess you could point to the FF value anywhere else in the code and so spare yourself the one byte. Thank you again! 🙂 jetsetdanny and Spider 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.