glurk Posted March 15, 2022 Share Posted March 15, 2022 So, the latest thing I've been working on. Don't know if I'll be able to complete or not, so please don't call it a WIP yet. I wanted to keep at it, but I've hit a snag. What I have is "playable" if you're like Luke Skywalker, and use the force, or your imagination. There is no map, no stars, no sprites, because I haven't got that far yet, and a kernel must be written. The problem is the sound, specifically "hyper-warp." I'm using @phaeron's sound driver, and this game is not working well with it. I had this issue with 'Freeway' a little bit, but with this one it's awful. It's hitting some combinations of freq/distortion (MOD 3/5 ??) that sound terrible. And I have no idea how to fix it. To hear what I mean: 1) Load sm.bin into Altirra 2) Press F2 to start 3) Press F4 to goto Map (it won't be shown) 4) Press Left Arrow (to move to a base) 5) Press CTRL (to hyperwarp there) You should hear what should be the hyperwarp sound, but it's messed up. Open to ideas on how to fix/avoid this. If I can ascertain exactly "which" values are the messed up ones, maybe I can change only those. It's not music after all, just "noise." If I can get some help to solve this one, maybe (maybe) I can get the whole game working... sm.bin 3 Quote Link to comment Share on other sites More sharing options...
FifthPlayer Posted March 16, 2022 Share Posted March 16, 2022 (edited) Considering that Starmaster is heavily inspired by Star Raiders, there should be a way to get a good hyperwarp sound going! FWIW, I tried following the instructions and I couldn't get a hyperwarp sound, even a broken one. Good luck with the port. I really like Starmaster in its own right, so it will be great to have an A8 version. Edited March 16, 2022 by FifthPlayer 1 Quote Link to comment Share on other sites More sharing options...
glurk Posted March 16, 2022 Author Share Posted March 16, 2022 Well, I KNOW the 8bits can make a good sound, but I'm not doing a conversion here, I'm porting the original 2600 code, sound routines and all. And if I start re-writing the original code, it's no longer a true port. That's not what I want to do. Anyway, the sound driver uses all 4 channels, (2x 16-bit) and works fine for nearly everything else. With all the people on the forum that know everything about polynomial counters, fine-tuning POKEY, etc. I figured that SOMEONE would offer some assistance. I'd hate to quit on this one, I've got a lot done. Here's one with a working "map" or "galactic chart" so it's easier to hyperwarp wherever, and hear the sound problem it has: sm.bin Quote Link to comment Share on other sites More sharing options...
FifthPlayer Posted March 16, 2022 Share Posted March 16, 2022 Ah, with the galactic chart screen it was easy to sort out my issue. It was a configuration issue with Altirra. Yes, the hyperwarp sound has a couple of clunky "engine motor" sounds but it's not completely unacceptable - it sounds like a detail to fine-tune after everything else falls into place. Quote Link to comment Share on other sites More sharing options...
Synthpopalooza Posted March 16, 2022 Share Posted March 16, 2022 (edited) One quick fix: set bit 1 of AUDCTL and put POKEY into 15 khz mode, this disables mod 3 artifacting in C distortion. You only then have to skip the mod 5 frequencies. Otherwise, look for my POKEY table on the 7800 forum, it's got documentation on the mod 3 settings. Edited March 16, 2022 by Synthpopalooza 1 Quote Link to comment Share on other sites More sharing options...
VinsCool Posted March 16, 2022 Share Posted March 16, 2022 Disable bit 7 (Poly9), and set the channels AUDC to $8x (Poly17), this will sound smooth with no unwanted tones. Quote Link to comment Share on other sites More sharing options...
Rybags Posted March 16, 2022 Share Posted March 16, 2022 (edited) Some of the poly stuff on 2600 vs computer is very different - there are notes that would likely be completely not reproducable. Also I'm fairly sure all the 2600 notes are "stable" in that you get a constant predictable result regardless of when the stores occur vs the computer where esp distortion C can vary and even be silent depending on when you store in relation to the AUDF counter cycle. I've been meaning to produce a driver which has various emulation levels - for the stuff we can't do in hardware, it can be done by Pokey Timers in software - ie forced volume toggling between 0 and your desired volume setting to produce those unreproducable poly sounds. Generally the stuff that's hard would be low-mid frequencies anyway, the high frequency stuff you could probably kludge it and barely notice the difference. But what I have lacking is the knowledge of how the polys work exactly - it's all shifting and XOR I'm fairly sure but not sure on how to do it properly. Edited March 16, 2022 by Rybags 3 Quote Link to comment Share on other sites More sharing options...
phaeron Posted March 16, 2022 Share Posted March 16, 2022 The poly9 counter has a period of 511 cycles, while the TIA timer periods are spaced by 57 cycles. The prime factors of 511 are 7 and 73, so the divisors that are going to give you problems are the ones divisible by 7 (after taking the -1 into account in the register value). For the poly4 counter, I fixed this by changing the POKEY divisors to always be N*15+1, so it was guaranteed to sample the poly9 counter one value ahead in the sequence each time like the TIA does. That probably isn't viable here since you'd need to round the period to a multiple of 511, which is a much bigger pitch change. Probably just applying a +/-1 to the table entries for the TIA divisor values of 6, 13, and 20 is enough to get comparable timbre. 3 Quote Link to comment Share on other sites More sharing options...
glurk Posted March 17, 2022 Author Share Posted March 17, 2022 (edited) Well, I ended up just changing AUDCTL from $F8 to $78 which worked well enough, I guess. But I jumped into the DEEP END with this port, and I'm not sure I can really get it done. Although, it mostly is done? Kinda crazy, I know. If someone wants to try, I've got a "playable" yet incomplete, glitchy version. With no stars, lasers, meteors, or (visible) explosions. But it's playable, and you can win, or lose. After the first play, it locks up and has to be reset. It's a mess, probably the hackiest coded thing I've ever done. I'm quite frustrated with it. Maybe I'll step back and come back with a clearer head on it. It has pseudo sprite Z-ordering that's got me rattled, among other problems... All that said, someone give it a try and tell me if it's "somewhat" correct. Any feedback, good or bad, I don't care. sm.bin EDIT: Don't hit SELECT before START. Or it will lock immediately. Just hit START. It's a bug I need to find... Edited March 17, 2022 by glurk 3 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.