Jump to content
batari

HOKEY demo

Recommended Posts

16 hours ago, CPUWIZ said:

 

I am confident in saying that hasn't been tested yet.  Correct me if I am wrong, Fred.

I am sending a HOKEY to Albert, with the hope that he has time to try one out in one of his arcade cabs.

  • Like 5

Share this post


Link to post
Share on other sites
1 hour ago, batari said:

Millie and Molly does not sound right yet. Some of the channels do sound good to me one of them is definitely not correct. What AUDCTL and SKCTL settings are being used for this errant channel, or is there something else going on?

No special SKCTL settings.

 

From memory, here's what's being used:

 

Have You Played Atari Today? - AUDCTL=$50.  The first two channels are joined using 16-bit and clocked at 1.79 mhz, using $Cx saw wave distortion, mod 3 frequencies 

 

Title music:  AUDCTL=$70.  16-bit again using $Ax square wave, third channel at 1.79 using $Cx distortion 

 

Area 1 theme:  AUDCTL=$71 ... 16-bIT channel again at $Cx distortion, 3rd channel $Cx at 1.79, and square wave $Ax at 15 khz (bass frequencies)

 

Area 2 - AUDCTL=$70 ... same as title except using $2x distortion on channel 2

 

Area 3:  AUDCTL=$71 ... same as 1 except third channel is distortion $0x percussion

 

Area 4 - AUDCTL=$10, Reverse 16-bit (play 1 silence 2) all $Ax distortion

 

Area 5:  Can't remember offhand, but it uses hi pass filter and 15khz 

 

The rest I will need to look up ... if I could hear audio recordings I can nail down what is happening.

Share this post


Link to post
Share on other sites

The other test case:  Bently Bear.  This one uses only $Ax distortions.  In this case we want to test the title and level complete music here, as these use 16-bit.

Share this post


Link to post
Share on other sites

The other point to keep in mind:  current emulations (Prosystem, JS780O, A7800) are fine in cases where either the standard 64khz clock is used (AUDCTL=$00, all distortions), 16-bit plus 1.79 on $Ax distortion, or when using 15khz clock on $Ax distortion  (bit 1 of AUDCTL).  Other settings cause issues, of differing results depending on emulator.  

Share this post


Link to post
Share on other sites

I'm late to the party, but this is fantastic news, Fred!

 

6 hours ago, Synthpopalooza said:

No special SKCTL settings.

 

From memory, here's what's being used:

[...]

 

It would be best to send the player @mksmith put together for these tunes to Fred in PM, along with your notes on what Pokey settings were used. The M+M demo Fred is using didn't have all the areas, and the player will make it more convenient to check any one song.

  • Like 2

Share this post


Link to post
Share on other sites
31 minutes ago, RevEng said:

I'm late to the party, but this is fantastic news, Fred!

 

 

It would be best to send the player @mksmith put together for these tunes to Fred in PM, along with your notes on what Pokey settings were used. The M+M demo Fred is using didn't have all the areas, and the player will make it more convenient to check any one song.

PM sent.  

  • Like 2
  • Thanks 1

Share this post


Link to post
Share on other sites

The music seems to sound as expected when I force AUDCTL values to what they should be.

 

Does changing an AUDCTL value take immediate effect on all channels that are already playing, or does it only take effect only on the next store of a channel's frequency value, or something?

  • Like 2

Share this post


Link to post
Share on other sites
On 6/13/2021 at 11:41 PM, Synthpopalooza said:

The other test case:  Bently Bear.  This one uses only $Ax distortions.  In this case we want to test the title and level complete music here, as these use 16-bit.

Here is another demo, this time, Bentley Bear, not on a Concerto but on a homebrew PCB with conventional hardware (EPROM, PLD.)

 

Any day now Albert should have the first HOKEYs I sent him for use in homebrew games. Note, the HOKEYs that Albert has are "Basic" HOKEYs which are intended to be used on homebrew PCBs, and are not currently sold individually. It will be a couple of months before HOKEYs intended for other uses (such as for Concerto) are available.

  • Like 12

Share this post


Link to post
Share on other sites

@batari Will HOKEY units be available for developers to buy for testing purposes? I have a bunch of POKEY's and POKEYMAX's but I have no way to test compatibility with HOKEY.

 

Danger Zone (complete and coming to the store soon) and EXO (90% complete, expected in the store later in the year) - both use Pokey and EXO uses some rather unusual settings.

 

HOKEY is perfect for the AA store homebrews that use POKEY and I'd like to be able to test my games and give them a clean bill of health as compatible. Danger Zone is pretty vanilla in terms of settings and I'm not too concerned there, but EXO is a whole different beast as it uses some of the more unusual settings and techniques in the music dept (like Milly and Molly) and I'm not sure it will work currently as intended with HOKEY. If HOKEY doesn't work with EXO then I think it would be good to understand that now so that we can plan accordingly for alternatives, rather than later.

 

Equally, downloadable ROMs from the store are a matter of "when" and not "if".

 

I will definitely be making my complete ROMs available through the AA store when that is launched and I want to be able to state my games are compatible with HOKEY (irrespective of whether the base card is Dragonfly or Concerto). I know you are planning to update Concerto to support bigger ROMS like EXO and that's also superb news. 

 

Danger Zone uses a 48KB ROM with POKEY. Concerto doesn't support that currently. Can you update on whether that will be possible in the near term? I think you said before it was a firmware issue that needed updating and I appreciate that you have been busy with projects. Again I'm thinking ahead to a Danger Zone ROM being available in the store and I'd like to be able to state that yes, Danger Zone will work with Concerto with Pokey in it's full musical glory :) 

 

 

 

  • Like 4

Share this post


Link to post
Share on other sites
8 hours ago, Muddyfunster said:

@batari Will HOKEY units be available for developers to buy for testing purposes? I have a bunch of POKEY's and POKEYMAX's but I have no way to test compatibility with HOKEY.

 

Danger Zone (complete and coming to the store soon) and EXO (90% complete, expected in the store later in the year) - both use Pokey and EXO uses some rather unusual settings.

 

HOKEY is perfect for the AA store homebrews that use POKEY and I'd like to be able to test my games and give them a clean bill of health as compatible. Danger Zone is pretty vanilla in terms of settings and I'm not too concerned there, but EXO is a whole different beast as it uses some of the more unusual settings and techniques in the music dept (like Milly and Molly) and I'm not sure it will work currently as intended with HOKEY. If HOKEY doesn't work with EXO then I think it would be good to understand that now so that we can plan accordingly for alternatives, rather than later.

 

Equally, downloadable ROMs from the store are a matter of "when" and not "if".

 

I will definitely be making my complete ROMs available through the AA store when that is launched and I want to be able to state my games are compatible with HOKEY (irrespective of whether the base card is Dragonfly or Concerto). I know you are planning to update Concerto to support bigger ROMS like EXO and that's also superb news. 

 

Danger Zone uses a 48KB ROM with POKEY. Concerto doesn't support that currently. Can you update on whether that will be possible in the near term? I think you said before it was a firmware issue that needed updating and I appreciate that you have been busy with projects. Again I'm thinking ahead to a Danger Zone ROM being available in the store and I'd like to be able to state that yes, Danger Zone will work with Concerto with Pokey in it's full musical glory :)

Yes, 48k/POKEY support is 100% in firmware, and in my spare time (ha!) I am working on a major firmware update to address this and other issues. The major firmware update will be out before HOKEY as it has other improvements to Concerto's POKEY support code.

 

But, I can probably do an interim release that just fixes the 48k+POKEY issue, and I probably should so I can test Danger Zone.

 

HOKEY will be available for developers as soon as I get the in-circuit, user-programmability working so that people can update firmware and install new sound drivers as they are developed. Right now the only way to reprogram a HOKEY is via proprietary tools. It will probably take me a few weeks to get this sorted out.

 

HOKEY does not yet support EXO as I have not yet figured out how the weird two-tone modes work, but the documentation is there and schematics exist so I expect it's just a matter of time. I do intend to make HOKEY work with all of the weird POKEY modes. Depending on when you release EXO, I may or may not have things figured out by then.

 

 

  • Like 5
  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, Synthpopalooza said:

Altirra (an 8-bit emulator) has a very excellent POKEY emulation and is a good reference point should you need it.

As a personal challenge, HOKEY is 0% derivative. It was created entirely from scratch based only on public domain documents such as the datasheet and schematics. If I can't figure it out though, I will look at other people's source code :)

 

  • Like 7

Share this post


Link to post
Share on other sites
14 hours ago, batari said:

As a personal challenge, HOKEY is 0% derivative. It was created entirely from scratch based only on public domain documents such as the datasheet and schematics. If I can't figure it out though, I will look at other people's source code :)

 

Can’t say I don’t admire you for taking on the challenges, though I think @Synthpopalooza and probably a number of guys in the European demo scene have discovered a lot of undocumented or poorly-understood quirks of real silicon that can be exploited for fancier effects and music, “happy accidents’ of sorts that never would have been known or discussed in the original schematics and data sheets.

 

Altirra is open-source and Avery has worked VERY hard to get the emulator to behave like real hardware does, even when the original documentation is unclear or in some cases simply incorrect.


If you run into any walls, I don’t see any shame or failing in taking advantage of some of the last few decades’ of accumulated unofficial community knowledge, especially in the case of Altirra, which is explicitly open-source.

 

But as always, you do you. Your own contributions to the Atari community stand on their own and you don’t need my validation to know that. :) 

  • Like 1

Share this post


Link to post
Share on other sites
On 7/30/2021 at 5:59 AM, DrVenkman said:

Can’t say I don’t admire you for taking on the challenges, though I think @Synthpopalooza and probably a number of guys in the European demo scene have discovered a lot of undocumented or poorly-understood quirks of real silicon that can be exploited for fancier effects and music, “happy accidents’ of sorts that never would have been known or discussed in the original schematics and data sheets.

 

Altirra is open-source and Avery has worked VERY hard to get the emulator to behave like real hardware does, even when the original documentation is unclear or in some cases simply incorrect.


If you run into any walls, I don’t see any shame or failing in taking advantage of some of the last few decades’ of accumulated unofficial community knowledge, especially in the case of Altirra, which is explicitly open-source.

 

But as always, you do you. Your own contributions to the Atari community stand on their own and you don’t need my validation to know that. :) 

Many of these tricks, quirks and happy accidents, I think, are naturally emergent from a correct implementation. Just being off by 1 part in a 1000 (for instance) wouldn't be noticed with normal POKEY use but that might be enough to completely break the tricks. So if anything isn't working, an understanding how the tricks work will help point to where the problem lies.

 

I think I understand how a lot of the tricks work, and many seem related to exploiting the polynomial bitstreams, as by default the POKEY has 4, 5, 9, and 17-bit poly which correspond to repeating bitstreams of length 15, 31, 511 and 131071. As 31 and 131071 are prime numbers, there's nothing fancy that I can think of to do with them, but since 15 and 511 are not prime, with divisors you can shorten these to length 3 or 5, or length 7 or 73, and create new timbres.

 

I haven't even tried yet to do the two-tone mode, as I am still reading about it to understand the theory. Once I have a solid grasp of the theory I am sure an accurate implementation will follow.

  • Like 4

Share this post


Link to post
Share on other sites
On 7/22/2021 at 1:50 PM, garycimera1968 said:

I look forward to filling the empty socket in my Pre-Production Concerto with it!

Myself as well. But, so I don't inadvertently break the shell in my Concerto (also a Pre-Production unit) Can I possibly send my Concerto for @batari Fred to put in for me, and I'm willing to pay a fee to have him do it, so that that way I will have BOTH the latest firmware and also the best POKEY chip possible for the size of a 7800 cart.

 

Fred, I hope you can provide that service for those of us who are a (little) bit challenged when it comes to popping open our multicarts we so proudly own of yours, I just don't want mine to break, there would go almost vookoo $$$ we spent in both time and patience in waiting to not only get them, but also to acquire the software and ROMs for them as well.

 

The development of the Concerto last year lead me to get my 7800 (thanks to @CPUWIZ for loaning me out the $$$ needed to get one, he has since been paid back), how many of you can also claim the same??? I'm glad I waited and I am also proud to own all 4 1980s-era systems (2600 Jr., 5200, 7800, and XEGS), made both before (a 2600 Jr. - Short Rainbow, and a 5200 - 2-port w/ 4-port BIOS) and after (a 7800 and an XEGS) the infamous video game crash on 1984. Also all 4 are Atari Corp. (Jack Tramiel-era) units.

 

DSC02008.thumb.JPG.15143452a8cd6532a019984249379583.JPGDSC02013.thumb.JPG.c1124ce2cb7ea8439bf857b6f8e823c5.JPG

Share this post


Link to post
Share on other sites
Posted (edited)
7 hours ago, batari said:

 

 

I think I understand how a lot of the tricks work, and many seem related to exploiting the polynomial bitstreams, as by default the POKEY has 4, 5, 9, and 17-bit poly which correspond to repeating bitstreams of length 15, 31, 511 and 131071. As 31 and 131071 are prime numbers, there's nothing fancy that I can think of to do with them, but since 15 and 511 are not prime, with divisors you can shorten these to length 3 or 5, or length 7 or 73, and create new timbres.

 

 

I am still learning this part myself, but one setting I have understood well (thanks to a document written by @pavros) is C distortion.  I won't go into technical details here too much, except for:

 

A 15-bit polynomial is sampled.  Because of how the polynomial is sampled, any of the following is generated:

 

Frequency divisible by 3:  Any of 3 timbres:  01011, 01100, 01000 ... these are random dependent on polycounters.  Smooth bass, or a high pitched NES type saw wave

Frequency divisible by 5:  Either 010 or a constant 1 sample (silence)

Frequency divisible by 15:  Always silence (constant 0 or 1)

None of these:   a 9 bit pattern, which produces a gritty bass, or a sharp bright wave when used in 16-bit mode  frequencies above C3 note.

 

The randomness of the mod 3 timbres also depends on which channel you play them in.  Resetting the polycounter before each note play stabilizes the timbres somewhat.  On channel 3 it's always the 01000 timbre, on the other channels, it is either 01011 or 01100 depending on even or odd numbered frequency.

 

In 15 khz mode (bit 1 AUDCTL), the phi clock is exactly divisible by 15, this means that all tones are of the mod 3.  Anything divisible by 5 is silence, otherwise, you get tones in this order:  1 - 2 - 2 - 1 - silence, as you go up the frequencies.  Again on channels 1, 2, and 4, the 1 and 2 tones will alternate between 01011 or 01100.  Channel 3 will always return a stable 01000.  If you use my 15khz C table and strategically place your notes across the first two channels, you can select the first two timbres at will. 

 

I don't remember the link to his thread but I am sure it's easy to find.  Hopefully this is of use.  Someone please correct, if my info is inaccurate.

Edited by Synthpopalooza
  • Like 2

Share this post


Link to post
Share on other sites

Also, in regards to Altirra:  The updated 3.90 version (from 3.20) seems to have broken one of my two-tone modes:  The one which uses $Ax distortion with 1.79 mhz, atop both the 15 and 64khz base clocks.  3.20 is perfect to real hardware, but 3.90 and up causes some high notes in the saw waveform to not play.  This same error seems to have found its way into the current version of PokeyMax as well (on the Dragonfly), and has caused the same issues with two tunes in E.X.O., the title music and the Area 3 music.  I have already contacted both phaeron (Altirra) and foft (PokeyMax) with a bug report, we will see what happens.  Meanwhile, 3.20 may be a better reference point for POKEY emulation in the meantime.

Share this post


Link to post
Share on other sites
7 hours ago, Synthpopalooza said:

This same error seems to have found its way into the current version of PokeyMax as well (on the Dragonfly), and has caused the same issues with two tunes in E.X.O., the title music and the Area 3 music.

I was wondering about this because some of the tones have always sounded a bit 'off' on EXO's music when I was testing, but not so much that I wasn't sure if it was intended or not. Now you have stated this isn't intended. However, in the case of the PokeyMAX, that would require the actual chips to have to be reprogrammed if a fix is found, but that isn't something that can be done through a FW update on the DF I don't believe. So for most of us, myself included, this error would have to remain.

 

 

Share this post


Link to post
Share on other sites

I was able to find a workaround for that setting, by adding 1 to the offending frequencies in first channel.   It will play on both PokeyMax and real POKEY, with a negligible decrease in volume on real POKEY.

  • Like 2

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...