Jump to content
IGNORED

Fx ANTIC. An ANTIC chip replacement on FPGA


ijor

Recommended Posts

Some technical considerations

 

The core doesn't operate fully synchronously to the system. The computer's clock signals, at least in the computers I tried, are too glitchy for a modern device and can't reliably clock the FPGA logic directly. Being much faster than the system, the FPGA can operate in its own clock domain in a semi synchronous way. I will elaborate the details if it's interesting. It might be possible to condition the computer clock signals somehow, though. I didn't try that. The FPGA needs a faster core anyway. In other similar cases the FPGA can just multiply the system clock. These modern FPGA devices have a very powerful PLL built-in. But in this case, it is not possible because the system clock is lower than the minimum spec required by the PLL.

 

The GTIA and POKEY functionality is obviously “write only” and implemented by snooping the CPU bus. The core doesn't respond to read cycles from these devices. Both chips are still needed.

 

The POKEY sound implementation misses the exact sound characteristic related to the SIO port. The characteristic SIO sound when reading from a device depends on the actual external SIO activity, which the core doesn't have access. And the tape audio channel is of course, also missing. By watching POKEY and CPU activity, something we can do since we have access to the full CPU bus, it might be possible to infer indirectly the SIO activity and produce a reasonably accurate SIO sound track. While that might be and interesting idea, it's something I didn't attempt to implement. Reproducing the tape audio channel would require hooking to the system audio logic in any case.

 

Having a powerful FPGA controlling the ANTIC interface brings a lot of new and exciting possibilities. Some ideas that come to mind are, e.g., all sort of improvements to the DMA system. It is possible to implement digitized sound DMA, DMA to the internal memory that would increase the bandwidth from the CPU significantly, caching ANTIC display data, etc.  But most of these features would require special software that I was too lazy to implement, and not motivated enough when I'm not sure this will ever be used by anyone else besides me. Maybe I'll continue the development at some point, may be somebody else, don't know.

 

Edited by ijor
  • Like 9
Link to comment
Share on other sites

Looks good.

Another improvement I'd like to see would be higher bandwidth graphics modes, ie bitmap modes that utilize 80 DMA cycles of graphics per scanline.

Though of course such a thing would add another non-legacy compatible improvement to the architecture that only a few could use.

 

But insofar as preservation of original hardware - it would be great to have a plugin board that could handle all the chipset functions.

 

  • Like 3
Link to comment
Share on other sites

So for digital video+audio and vbxe did you change anything on the board @ijor? I’d have thought hdmi would need a real clock rather than the internal oscillator. For vbxe I’d have thought you’d need external ram + maybe a larger fpga.

 

Here is a picture of my 600xl with these boards in, I took it to silly venture in 2018 with the plan of showing it replacing all the custom chips. I never completed the antic port, my fpga core timing is such that it couldn’t trivially fit on the real bus.

 

 

96BE623D-F964-4294-9622-DDA62F0ECCE1.jpeg

  • Like 6
Link to comment
Share on other sites

It's in there, last parts of the first post.

 

What FPGA is in use though?  I don't think it could be the Intel 10M02  - the description I found for that mentions only 2,000 logic elements.  I imagine to do what's going on here would need multiples of that at least.

Link to comment
Share on other sites

On 4/10/2023 at 8:36 AM, foft said:

Impressive to fit all that in a 10M02 too!

 

As I said, the "basic" core fits comfortably in a 10M02. I don't have a core compiled without any debug stuff, but a "clean" core shouldn't take more than 60% utilization. Remember than only ANTIC is fully replaced. Both the original GTIA and POKEY chips are still there. Then we don't need to implement logic for SIO, Keyboard scanning, Paddles, Collision, etc; because all that stuff is still handled by the original chips.

 

The HDMI interface consumption depends on which type of hardware do you use. I used an HDMI transmitter that requires very little logic at the FPGA. Without an HDMI transmitter, or driving the HDMI interface directly as you do in the Eclaire XL, will likely require more FPGA resources. I assume an 10M04 would be required in the worst case.

 

VBXE functionality requires, of course, not only a bigger FPGA but also external RAM, or otherwise an FPGA big enough to fit the required RAM internally. A full featured video scaler with its own frame buffer also requires a bigger FPGA and/or external RAM. That was one of the reasons I added VBXE functionality. It made sense since both features had similar hardware requirements.

 

In my tests I used a proxy board since the the original board doesn't have any kind of HDMI interface. Even if I wanted to connect an HDMI transmitter directly, I wouldn't have enough pins exposed. So I am sending the HDMI data multiplexed over a a few wires and then de-multiplexing the data at the proxy board that has its own logic. These are just details of my particular implementation due to the limitations of the specific board I was using. Functionally it would be the same as if it was all integrated in just one board.

 

I guess that if the hardware would be produced, it would make sense to have at least two different versions. A "basic" version that would fit in a very small FPGA and should be very cheap. And another one using a more expensive FPGA and extra RAM.

 

Regarding the clock. You probably want to include an external oscillator in any case. Shouldn't add too much to the cost and it is recommended for reliability. The ANTIC timing is much more critical than POKEY or GTIA. ANTIC is a bus master and must drive the address bus and the DMA signals quite precisely.

 

Edited by ijor
  • Like 6
Link to comment
Share on other sites

This is an amazing project.  The day will come when a working ANTIC chip is impossible to find.  It appears this FPGA board can be used to replace the other LSI chips as well, too.  It looks like the same board could be used to replicate a POKEY, as well.  Is there any thought to having a 1-1 replacement project, using this board (or something similar), that could be programmed to emulate only the chip it is intended to replace?  Also, would this be sold or made available for others to replicate?

Link to comment
Share on other sites

1 hour ago, reifsnyderb said:

Is there any thought to having a 1-1 replacement project, using this board (or something similar), that could be programmed to emulate only the chip it is intended to replace?  Also, would this be sold or made available for others to replicate?

So I just got a DE10 Nano for reasons in line with your Antic observation. I might be able to answer some of your questions. I would also like a 1-1 replacement, but not sure if it will come with extraneous hardware emulations that will sit unused. Originally the project was using a board from Lotharek, but the DE10-Nano came along and had a couple of advantages/disadvantages: 1. Cores may be more advanced/stable on Lotharek's board(but that can change). 2. DE10 Nano is subsidized for educational purposes, so some costs are covered and 3. It will have a very wide user base because of 2, and sometimes you go where the support is.

 

I don't know the chronology, but other folks started developing cores for nes, gb, genesis, snes, etc. There is a project that will load up and keep those cores updated. Here is a good starting link on MiSTer in general with other links:

 

https://www.retrorgb.com/mister.html

 

So you just need to buy the de10-nano for a couple hundred bucks from Taiwan. Like a lot of things, you only need ~$250 for a basic setup, but will probably want/need to get expanded memory, premade expansion units, usb hub, wifi or bluetooth dongles, etc. The supporting software is free. There is an atariage thread with a lot of input from atariage user foft when the atari 800 core was being created, but I can't find it at the moment. Apologies for any misinfo. Hope this helps a bit!

 

ETA: I don't know about chip-by-chip replacement, which is what your original question was. I got this to do whole systems. As a non-hardware guy, maybe there are micro fpga boards that are small enough.

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

3 hours ago, reifsnyderb said:

The day will come when a working ANTIC chip is impossible to find.

Absolutely. That was my main motivation for the project in the first place.

 

3 hours ago, reifsnyderb said:

It appears this FPGA board can be used to replace the other LSI chips as well, too.  It looks like the same board could be used to replicate a POKEY, as well.  Is there any thought to having a 1-1 replacement project, using this board (or something similar), that could be programmed to emulate only the chip it is intended to replace?  Also, would this be sold or made available for others to replicate?

The board was designed by Mark, aka @foft. I would better let him elaborate :)

 

3 hours ago, Wrathchild said:

Would the basic core version therefore work with an existing VBXE board?

I'm not very familiar with the VBXE hardware, but yes, I suppose it should work.

 

When I mentioned a basic version I was thinking in one that perhaps would still include HDMI output, except that instead of using a full scaler, it would use a "simpler" scan doubler. When using a separate VBXE board you would need to use the VBXE video output though.

 

The truth is that you can get a much more powerful device if you combine and integrate both cores. But again, this would require developing specific software.

  • Like 5
Link to comment
Share on other sites

Big thumbs up from me for your awesome work @ijor and @foft, HDMI out with audio is a feature that I craved for for ages and which none of the other sophia / vbxe / ... upgrades supplied.

 

IMHO it would be fine to stick to standard  720x576p50 / 720x480p60 scandoubled HDMI video output (current TVs provide really good upscalers) for the standard version and leave all other upscaler features for extended versions (with probably higher specced FPGAs and additional RAM).

 

SD video output with sound is well enough for me.

 

Again, thanks a lot for your amazing work!

 

so long,

 

Hias

Edited by HiassofT
  • Like 1
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...