Jump to content
IGNORED

HOKEY demo


batari

Recommended Posts

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.

Link to comment
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.  

  • Like 1
Link to comment
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
Link to comment
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
Link to comment
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
Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
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 13
Link to comment
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 5
Link to comment
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 6
  • Thanks 1
Link to comment
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 8
Link to comment
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
Link to comment
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
Link to comment
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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
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.

 

 

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 months later...

It's about time for an update on HOKEY!

 

I have all parts to built thousands of HOKEYs now.


HOKEY was intended as a POKEY replacement for Atari 7800 homebrews but has evolved into a low-cost sound chip for Atari 7800 games. It is the only POKEY replacement with a form factor that is essentially the same as a real POKEY. It's also the lowest-cost POKEY replacement chip by a wide margin.


HOKEY will be available in several versions at several price points. The prices in this post should be considered introductory pricing, though I will make all efforts to maintain this pricing. I have made an obscene investment in parts to both to get the unit cost down and to ensure there will be enough HOKEYs for everyone in these uncertain times. I have enough parts to make thousands of HOKEYs.

 

HOKEY is also not just updateable and programmable, but it is also user-programmable. An API will be available that allows custom sound code.

 

The following versions are for 7800 applications and are sound only:

  • Basic HOKEY is the entry-level version. At $10 for one, or as low as $7.50/ea (in quantities of 100), it's intended to be soldered to a PCB for a homebrew game, though it can be ordered with gold-plated pins for use on flashcarts or other socketed applications ($12). Dual POKEY is possible through bank-switching the 16 POKEY registers. Resources are available on this device for future sound drivers and its firmware can be updated; and a YM2151 driver is planned as well as an ADPCM driver that is capable of Soundblaster-level quality. Even this low-cost version is capable of superior output compared to a real POKEY. It can output 54 dB of dynamic range, while the POKEY is capable of roughly 28.5 dB.
  • Standard HOKEY is a more capable version. At $19, you get better-quality output and more powerful hardware than Basic HOKEY. It comes with gold-plated pins that are sized for easy insertion into a socket. This version is capable of 60 dB of dynamic range, and uses true analog output that is filtered and amplified to improve the experience. It has external A4 and A5 address lines needed for directly addressing Quad-POKEY. If any homebrew games will need the capabilities of Standard HOKEY, a solderable version may be purchased for $17 or in quantity for as low as $14.00/ea for 100.
  • AtariAge homebrew HOKEY boards: Though the Basic and Standard HOKEY work with traditional homebrew POKEY boards, there will be at least two homebrew boards with a built-in HOKEY. With these you can once again get your POKEY-enabled games through the AtariAge store. My current understanding with Albert is that the premium for POKEY-enabled homebrews should match or beat the cost of the HOKEYs themselves, i.e. no more than $10 more for games using a Basic HOKEY, or $15 for games using a Standard HOKEY.

        Non-bankswitch board: Supports 16k-48k games needing POKEY sound. Uses a Basic HOKEY.
        Bankswitch board: Supports games up to 512k+16k RAM, using a Basic or Standard HOKEY, as needed.

 

There may be other AtariAge homebrew boards available in the future, and it's possible AtariAge will sell unpopulated versions of the above boards to homebrewers.

  • Concerto: Boards with built-in HOKEYs are here now! The finishing touches of the HOKEY code is still being worked on, so these will not be available at least until January 2022. A socketed version will still be available for a limited time for those wishing the flexibility, though if demand for a socketed Concerto continues, it will not be discontinued.

Although HOKEY was conceived for Atari 7800 homebrew games, a few specialty HOKEY devices are also in development for Arcade games:

  • Arcade HOKEY is designed specifically for arcade games. At $21, it's designed to be the lowest-cost entry in the Arcade POKEY market. It supports POKEY sound plus the pot ports needed for some arcade games. It uses gold-plated pins for easy insertion into a socket. Like the Standard HOKEY, it uses true analog output and is capable of 60 db of dynamic range.
  • Arcade Quad HOKEY: This is a standalone, custom device similar to Arcade HOKEY, except it is set up as a pin-compatible, drop-in replacement for the 40-pin quad POKEY chip. It will be the only quad POKEY replacement that is the same size and form factor to a real, unobtainium Quad POKEY chip. Like a real quad POKEY, it has four distinct outputs, one for each of the POKEYs, and supports the pot ports. Perfect for your Major Havoc, I Robot, Firefox, or Return of the Jedi game, this all-in-one, drop-in quad POKEY replacement will cost just $27.

Also down the pike will be a fully-functional POKEY replacement that can be used anywhere a POKEY works. Can be used in arcade games, Atari 7800 applications and Atari 8-bits alike:

  • Advanced HOKEY is the ultimate HOKEY experience. Though this is the most expensive HOKEY version at $29, it is still a bargain for what you get. It supports four simultaneous POKEY cores, and has up to four separate outputs. This version uses the most powerful hardware with 2MB for program and wavetable storage, a dual-core CPU, and allows for true analog CD-quality stereo output through an included 3.5mm stereo plug. Capable of 96 db of dynamic range, this version is the one for the true audiophile! Advanced HOKEY is still being designed, but it's expected to support all POKEY functions such as serial I/O and keyboard scan.

HOKEY programming/firmware updates:


The Basic, Standard and Advanced versions of HOKEY are programmable with custom sound drivers, and firmware may be updated as improvements are made. The programing or updating is done by the end user, and is very simple to do: Simply run a special update utility, which is an Atari 7800 program that contains a user-friendly interface and the new firmware/sound chip driver(s). The utility works on any flashcart, or any POKEY homebrew board, for that matter, and starting the utility is just like starting a game. A barebones version of the update utility will also be available that can be adapted to run on different systems such as Atari 8-bits.


The AtariAge homebrew boards sold in games should never need firmware updates, so the programming is fixed at the time of release.


The Arcade versions should fully support all existing Arcade games using POKEY chips, and updates are not expected to be necessary. The firmware on these is not user-updateable, but should any important firmware updates be needed for Arcade versions of HOKEY, I am happy to update them for no charge.


Beyond POKEY:


HOKEY is meant to be much more than a POKEY replacement chip. Aside from being capable of simulating other sound chips, it is capable of high-quality PCM/ADPCM sample playback though a ring buffer, similar to how a the Sound Blaster series of sound cards worked in the late 1980s-1990s. This means it can produce any sound effect with a clarity unmatched by legacy sound chips. Plus, the ring buffer vastly eases the programming difficulty on the 7800 side over other options that require precisely-timed interrupts, which don't work well anyway on the 7800 due to Maria DMA.


HOKEY's implementation of POKEY is based on the public domain datasheet and schematics of POKEY. It's a completely original POKEY implementation without use of any existing source code. HOKEY is intended as a functional replication of POKEY sound capabilities and was never intended to be a 100% authentic reproduction of the chip at the gate level. However, I will make every effort to ensure HOKEY can faithfully produce the various distortions.


At this time, some undocumented modes (such as two-tone mode which was intended for the Atari 8-bit cassette port, not for sound generation) are not implemented, but may be in the future. As far as I know this only affects one game.


Release dates:

The first HOKEYs will hopefully be available in January 2022. The only thing left is to complete the in-circuit firmware update capabilities.

 

Limited numbers of AtariAge homebrew boards are already out there. Soon you will be able to once again purchase games in the store with the rockin' POKEY sound for just a little bit more than other games.


There will be many ways to get a HOKEY. If you want individual HOKEY(s) and nothing else, you can order directly from me. Shipping is fixed at $4.99 in the USA, $9.99 to Canada and $11.99 elsewhere, for as many HOKEYs as you want.

 

Concerto owners will get a discount on a HOKEY for a limited time. The details of that are being worked out.


Lastly, you can get HOKEYs from the AtariAge store. If you are ordering something anyway from the AtariAge store, HOKEY(s) may be added on to your existing order and due to their small size, will likely not incur additional shipping charges.

 

  • Like 19
  • Thanks 12
Link to comment
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...