Jump to content
IGNORED

Pokeymax v4 bring up thread


Recommended Posts

19 minutes ago, foft said:

For manual assembly it’s harder since any rework is between the legs.

True, but that's not the point.

 

I realise that rerouting the board and probably conveniently assigning pins in the FPGA requires effort and changes to the core configuration.

 

The only benefit: the cool look ;)

Link to comment
Share on other sites

15 hours ago, madness77 said:

@ScreamingAtTheRadio I know it's just an aesthetic thing, but since the components fit, what would you say about putting all the electronics underneath?

 

Like SIDKickPico or ARMSID?

 

(by the way, soldering the legs will be easier, 0402 components are so close to the pads)

I've considered it, and decided against it for no strong reason except easier diagnostics. Soldering the legs won't be an issue, I'm going to mount the boards on precision headers that will be soldered from the bottom (it'll be clearer when I have the boards).

 

15 hours ago, foft said:

Yes, that and the ability to save any settings with power off. Also the spdif logic might not fit though.

 

Surprised by the price difference. I was thinking it’d be about 1-2usd more. It is 8 vs 11 on DigiKey and I thought via jlcpcb it’d be less.


So for the low cost model probably makes sense to keep the 10M02.

Thanks. I should probably start playing with the vhdl and try to build a stereo + SPDIF minimal version. I guess we'll have to try and find out... If there's no way to make it fit, I'll remove the oscillator and pin from the board in a future revision. I'll make a first order of this revision for now.

  • Like 1
Link to comment
Share on other sites

19 hours ago, ScreamingAtTheRadio said:

I'm going to mount the boards on precision headers

Aren't precision headers much more difficult to insert and remove from standard sockets? Or it's not very important since most Atari motherboards are not socketed anyway?

  • Like 1
Link to comment
Share on other sites

17 hours ago, ScreamingAtTheRadio said:

Oh, the regular PokeyMax 4 I had ordered from @foft's original design (with just replaced networks) just arrived from JLCPCB:

image.thumb.jpeg.26cf430833f18fb8d691d6528c20fe1f.jpeg

Do I see a solder bridge on the left side of the right level shifter of the bottom board?

  • Like 1
Link to comment
Share on other sites

23 hours ago, ijor said:

Aren't precision headers much more difficult to insert and remove from standard sockets? Or it's not very important since most Atari motherboards are not socketed anyway?

In my experience not really, no, I'm just very careful about alignment and you can still mount regular headers if you prefer. I like the precision header solution because it makes the whole assembly very thin, which is important for example in a 600XL where there's almost no clearance between the chips and the keyboard. But yeah, most of my machines were unsocketed when I got them, so since I have to remove the chips and mount my own socket, I just use precision ones and all's good.

 

21 hours ago, woj said:

Do I see a solder bridge on the left side of the right level shifter of the bottom board?

You have a really good eye. There was something but it wasn't a bridge, it was a speck of dust. In all those years using JLCPCB, I've never seen a bridge from their stuff. One or two misaligned discrete components, minor stuff like that. I've had defective PCBs but those were my design mistakes :D

Link to comment
Share on other sites

I'll have to generate new sof files for the specific MAX10 versions that I put on both boards, and I'm a little lost between the various repos I had access to, and the links present in this topic. @foft would you mind giving me some pointers about where I should get the authoritative files needed, and maybe if you have time a quick summary of how to configure and build for the various options (I'll need to make minimal stereo and maxed out versions for 10M02SCU169I7G and 10M16SAU169I7G)? I'll make sure to write that down in a readme so that information is available to all on my repo.

Link to comment
Share on other sites

This is the current prerelease core for the 10M02:

http://www.64kib.com/pokeymax_files/1.27_20230327_complete/v4_prerelease/build_10M02_v4_stereo/output_files/pokeymax.pof

For the full one:

http://www.64kib.com/pokeymax_files/1.27_20230327_complete/v4_prerelease/build_10M16_fullv4_quad/output_files/pokeymax.pof
 

I’ve not tried the 10M02 one, might need more tuning.

 

I’ll soon make an ‘official’ 1.28 release, just need to fix some sidmax problems first. It’s for some reason silent except when I include signaltap!

  • Like 4
  • Thanks 2
Link to comment
Share on other sites

I posted an alpha of 1.28 cores here:

http://www.64kib.com/pokeymax_files/1.28_20240903_alpha/

 

So far I only tested sidmax to be honest, so please only try if you have a usb blaster.

 

I'll upload a final version of 1.28 at the end of the week.

 

Known issues so far:

i) Folder names have the name and version in twice!

 

Since the 1.27 based pre-release there are not many fixes, mostly a quartus upgrade and bumping the version code. This is just about doing an 'official' release that supports v4.

 

  • Like 1
Link to comment
Share on other sites

Some notes on the build process:

i) The build.sh perl script wraps the quartus command line tools. I have only tried it under Linux.

    a) Before running it you need an appropriate version of Quartus Lite from Intel installed with the max10 device support (I'm using 23.1 now)

    b) Quartus should be added to the path.

    c) ./build_tools should be run to compile some small tools

    d) ./makehexfiles should be run to generate some static data

ii) The script essentially copies the vhdl/verilog files to a sub directory then runs quartus_sh with --flow compile to synthesise it and make a .sof file (can be programmed to the MAX10 to run until power off).

iii) After making the .sof file, it manually runs quartus_cpf to put that .sof along with some static data into a .pof file (for storing to the FPGA).

     a) The .sof is compressed and set up to be stored into the CFM (config flash memory).

     b) The static data is set up to be stored in the UFM (user flash memory).

v) I need to store some Sid wave data for the mixed waves. This is too big to fit into UFM, so I patch it into the CFM. 

     a) Convert the .pof to a .svf (standard flash format) so I can extract the CFM and UFM data

     b) Find the offset of the CFM and UFM data in the .pof, so I can work out where to patch it

     c) Patch in the Sid wave data

     d) Generate a new checksum using rehashr and pop it on the end

vi) Generate the core.bin for flashing

     a) Convert the patched .pof to a .svf

     b) Extract the CFM and UFM data

     c) Cat them together to make core.bin

     d) Write the version code to the start of core.bin

 

There are a lot of settings and variants that the script can be run for. I put them all in a dictionary at the top of the file. They set some generic options which change how the vidl is synthesized.

The first dict key specifies $boardtype_$version, where $boardtype is pokeymax or sidmax.

Then follows a human readable description.

Inside the hash are some settings:

fpga: Which FPGA to build for. I always build for the slowest version C8G. There are four sizes of fpga 02, 04, 08 and 16. After the very earliest we started using 04 and up since it has room for the flash controller. 

ext_bits: How many extra io pins there are. This is actually a board setting so should be put somewhere else...

a*_bit: Which pin is used for the address. If not set then the address line is fed to the core as low.

gtia_audio_bit: Digital input from gtia to mix in gtia audio.

cs1_bit: Disconnects chip select 1, so that the io pin can be used for something else. Then the io pin is available as ext pin 19! 

fancy_switch_bit: Allow switching to mono/full featured.

ps2clk_bit/ps2dat_bit: For PS2 keyboard

spdif_bit: For spdif output (Only recommended on models with a 49.152MHz crystal)

irq_bit (sidmax only): IRQ_N output (Sid has no irq line)

flash_addr_bits: Set to 17 on 10M16 size fpga

sid_wave_base: Where Sid data starts. Set to 79872 on 10M16 size fpga

pokeys: How many pokey chips: 1-4

enable_auto_stereo: If a4 never toggles run in mono mode. You should have this on usually.

enable_sid: Use 2 sids if set to 1

enable_psg: Use 2 psg if set to 1

enable_covox: Enable 4 channel covox dac if set to 1

enable_sample: Use block ram for sound samples with dma engine to write them to the covox dac. Supports ADPCM compression.

enable_flash: Allow saving settings and upgrading the core in software. 

enable_audout2: Save space if not using the 2nd channel

enable_adc: sio audio in for pokeymax 4

enable_config: Enable configuration region

paddle_lvds/paddle_comp/enable_iox: Settings for keyboard and paddle input - board specific.

pll_v2: Disable for v3 and v4 t use external oscillator instead of internal oscillator

detect_right_on_by_default: Turn off automatic single channel->both speaker support if 0

optimisearea: Try harder to make it fit

saturate_on_by_default: Use linear mixing for pokey

 

Happy to answer questions on any of these...

 

So you can make a fair number of combinations. e.g. you could possibly turn off flash to fit everything in a 10M08 etc. I like to turn it all on with a 10M16 on a v4 🙂

 

 

Edited by foft
  • Thanks 1
Link to comment
Share on other sites

Regarding the tools:

init.c ->

    Write some static data and default configuration

    0x0  : Config

    0x80: ADPCM compression step table

    0x400: PSG volume tables (ym2149, ay3, official ym2149 from data sheet, linear)

    0x600: Pokey volume table (non-linear mixing, linear)

    0x800: sid q table - part of filter (8580/6581)

    0x1000: sid frequency tables - part of filter (8580/6581)

    Two files are written, just to scale down volume when Sid is used (due to saturation issues on output)

sidwavedata.c ->

    Mixed waves (e.g. pulse + triangle etc)  (8580/6581)

find_offset.c ->

    Find location of a chunk of one file in another. Used for patching .pof

swapbits.c ->

    pof files have low->high bits flipped and also are long word endian swapped. This tools flips them.

 

 

    

Link to comment
Share on other sites

On 9/3/2024 at 9:03 PM, foft said:

I posted an alpha of 1.28 cores here:

http://www.64kib.com/pokeymax_files/1.28_20240903_alpha/

Completely messed that up, in that none of the core options were passed to each build.

Uploading rc2 shortly...

http://www.64kib.com/pokeymax_files/1.28_20240904_alpha/

Edited by foft
Link to comment
Share on other sites

2 hours ago, foft said:

Doing more testing. Uff, lots of things to fix... more related to upgrades and changing build scripts than core changes.

 

Anyway another alpha incoming later!

I think I was signalling earlier that it is a bit of a mess 😉

Link to comment
Share on other sites

1 hour ago, woj said:

I think I was signalling earlier that it is a bit of a mess 😉

Yeah definitely needs a cleanup, better error handling etc.

 

Anywhere here is a newer build:

http://www.64kib.com/pokeymax_files/1.28_20240905_beta/

Changes:

i) Some names clashed which led to a bunch of missing builds, added another layer to build.sh maps to avoid that.

ii) Pad core.bin files to the standard length

iii) Slow the i2c clock on the pokeymax v1 iox mux, was getting some communication errors/spurious key presses.

iv) v4 full stereo build fits again

v) Corrected version code

vi) Only patch in sid wave data when we have sid

vii) If we do not have sid generate the pof with compression properly

viii) Between rc1 and rc2 (yesterday's): Generic parameters not set in qsf so all builds were with the defaults!

 

There is also a new version of the config tool:

http://www.64kib.com/pokeymax_files/pokeycfg_1_4.xex

Changes:

i) Remove write protection after each sector clear. On the 10M16 (only) it seems to reset the write protection!

ii) Clear sector 5 when doing a full refresh, in case the device has one.

iii) Make it handle sidmax as well as pokeymax (build flag)

@MADRAFi - Just checking you don't have the same bug in your tool as I had in (i)

 

Its a bank holiday here today, so I spent the rare work free, family free day for testing this a bit and fixing things up.

Edited by foft
  • Like 2
  • Thanks 4
Link to comment
Share on other sites

Ordered one from Retronics. I don’t mind paying the premium price in hopes that everyone involved gets a little piece of the profits. 
 

I’m busy enough as is with the project that the PokeyMax will be going into. A custom built “XE Book” laptop :) so plug ‘n play should help. I assume that the newly installed and firmware updated U1MB I have has the support for the PokeyMax v4 or will a plugin update be required?

 

Link to comment
Share on other sites

1 hour ago, sideburn said:

I assume that the newly installed and firmware updated U1MB I have has the support for the PokeyMax v4 or will a plugin update be required?

Plugin required. Go for whatever you need that includes the 'P2' (PokeyMAX 2) plugin, and contact me if you need a special plugin combo compiled and don't feel like attempting this yourself.

  • Like 1
Link to comment
Share on other sites

Is there a description of how the many different core designations are to be understood?

 

stereo_auto/
stereo_auto_linear/
stereo_u1mb_auto/
stereo_xel_auto/
no_right_detect/
etc.

 

The differences between mono, stereo, quad, sid and covox are understandable, but what are the differences between

"auto, linear, u1mb, xel and no_right-detect" ? 

 

Link to comment
Share on other sites

Look at this to see the settings:

http://www.64kib.com/atarixlfpga_svn/trunk/atari_800xl/atari_chips/pokeyv2/build.sh

 

Then look at this post which describes them:

Anyway iirc those others were special builds for:

u1mb: manual switch for before there was a plugin

xel: chip select changes since the xel has built in stereo logic and outputs.

Linear: No non linear mixing, ie just add pokey volumes 

No right detect: mono music plays on one channel only, no attempt to detect it and play on both.

Edited by foft
  • Like 1
Link to comment
Share on other sites

5 hours ago, sideburn said:

I assume that the newly installed and firmware updated U1MB I have has the support for the PokeyMax v4 or will a plugin update be required?

From a software perspective pokeymax 1-4 are the same. There are some flags to show which features are enabled. So the plugin will work on any of them I think.

Link to comment
Share on other sites

4 hours ago, flashjazzcat said:

Plugin required. Go for whatever you need that includes the 'P2' (PokeyMAX 2) plugin, and contact me if you need a special plugin combo compiled and don't feel like attempting this yourself.

Ok I’m still getting familiarized with all this. I’ve only got about 2 hours in with UM1B + Flashing it with Fujinet. Still lots to learn. Just discovered the PokeyMax a few days ago. Perfect timing. 

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...