FX CAST Atari ST core

https://github.com/MiSTer-devel/Main_MiSTer/wiki

Moderators: Mug UK, Zorro 2, spiny, Greenious, Sorgelig, Moderator Team

Locked
User avatar
SmokeMonster
Atari nerd
Atari nerd
Posts: 46
Joined: Wed Oct 03, 2018 2:26 pm
Contact:

Re: FX CAST Atari ST core

Post by SmokeMonster »

Congrats ijor and thank you for the spectacular work. I filmed a video about this for my YouTube channel for Thursday. I also wrote a news article for RetroRGB.com and it will probably be in the Weekly Roundup next week.

I will be holding a live fundraiser for the MiSTer project this Saturday at 9PM (Eastern) to raise funds for Sorgelig. Is there somewhere people can contribute to you as well, ijor?
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Post by ijor »

SmokeMonster wrote:I will be holding a live fundraiser for the MiSTer project this Saturday at 9PM (Eastern) to raise funds for Sorgelig. Is there somewhere people can contribute to you as well, ijor?
I appreciate it, but there is no need to contribute with funds for me.
Fx Cast: Atari St cycle accurate fpga core
JimDrew
Atari Super Hero
Atari Super Hero
Posts: 865
Joined: Mon Nov 04, 2013 5:23 pm

Re: FX CAST Atari ST core

Post by JimDrew »

Loading SCP images might take considerable time. Those are huge images that sometimes might fill most of the available RAM.
Since SCP image files are easily parsed, it seems that you should only have to load the flux data for each track as requested. That would reduce the RAM requirements. You can simulate the rotation of the disk by using the current flux pointer as the start of the data from the SCP flux and then wrap around. This is what a couple other emulations do to maintain the proper rotational time domain.

Let me know if you need anything on my end for SCP help. I don't know if you have looked at the image format when it comes to writing .scp images. There is a flag that indicates an image is writeable or not, and if it is, the space for the flux data is the same (125,000 bitcells) for each track. You specify the length like normal, and the rest of the space is just padding.

If you have enough processing power on the ARM/USB side of things you could always use the SCP to read/write actual disks using simple commands. There are a couple of people that are working on this. I designed the .scp image file format to be very easy to integrate, and I am happy to see it supported by a lot of emulators and tools - great to see it added for MiSTer. Nice job, Ijor! :)

If you need some help testing, I happen to have thousands of Atari ST disks (all of which have been dumped as images). :)
I am the flux ninja
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Post by ijor »

JimDrew wrote:Since SCP image files are easily parsed, it seems that you should only have to load the flux data for each track as requested. That would reduce the RAM requirements.
That would be possible but it would be risky because there is no guaranteed latency at the Linux side. Emulators can afford to wait if the disk operation is delayed for some reason by the OS or by the hardware. The FPGA logic cannot, the data must be available right at the very same cycle that it's required.

And even when indeed SCP files are quite easy to parse, some pre processing is still needed. Also syncing the current disk angular position across different tracks takes some time. There is no much time left to afford to load the track from physical media. At least not without risking that sometimes it might take too much time.
Fx Cast: Atari St cycle accurate fpga core
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: FX CAST Atari ST core

Post by BBond007 »

Ijor,

I would also like to congratulate you on releasing a flagship core for the MiSTer platform. Now the "ST" in MiSTer is true :)

I have read about techniques Atari ST Demo programmers employ to push hardware to its limits in areas such as overscan and increasing palette, yet compatibility is truly amazing. FX CAST runs everything I throw at it...

Does your future roadmap for this project include MIDI support?

Maybe via a USB MIDI device like Roland UM-ONE.
User avatar
alien
Atari maniac
Atari maniac
Posts: 99
Joined: Sat May 01, 2004 4:01 am
Location: USA
Contact:

Re: FX CAST Atari ST core

Post by alien »

Hi Ijor, this sounds quite amazing! :D

I'm curious: does it also emulate the 6301? (For example, does the Froggies over the Fence 6301 code I wrote run on it?). And does 4 bit hardscroll work on it? I'm guessing it does, but could you confirm? What about sound (full YM emulation?). And how does it do wakestates? Yes, I know, I'm thinking of edge cases, but I find the fact you got Closure to work on it truly impressive!
Alien / ST-Connexion
breiztiger
Captain Atari
Captain Atari
Posts: 267
Joined: Sun Sep 20, 2009 6:54 am
Location: FRANCE

Re: FX CAST Atari ST core

Post by breiztiger »

Hi

Just to tell your excellent core doesn’t have sound thru hdmi on my Samsung 34se790c (PC monitor) but ok on analog

:shrug:
gratte
Atarian
Atarian
Posts: 3
Joined: Tue Oct 23, 2018 11:53 am

Re: FX CAST Atari ST core

Post by gratte »

thanks ijor and atari st core creator
nice job
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: FX CAST Atari ST core

Post by BBond007 »

alien wrote: I'm curious: does it also emulate the 6301? (For example, does the Froggies over the Fence 6301 code I wrote run on it?). And does 4 bit hardscroll work on it? I'm guessing it does, but could you confirm? What about sound (full YM emulation?). And how does it do wakestates? Yes, I know, I'm thinking of edge cases, but I find the fact you got Closure to work on it truly impressive!
Alien,

I decided to give it a try so that you could evaluate the results yourself. I had initially tried to run the demo in sequence but It failed to return to the menu after running Disk #2 (ST Macrolazeas Conexis) and requesting Disk #1 again. Had the same problem with the version from http://www.pouet.net/prod.php?which=8936 (.MSA) as well as a the TOSEC(.ST format) - So I saved that for portion last. I must say I am very impressed with your demo. Sorry if I rushed through and missed anything. Hopefully I was able to capture the effects you asking about. I also Included a link to Closure running on MiSTer/FX CAST...

DEMO : Froggies over the fence by Overlanders - MiSTer FPGA - FX CAST - Atari ST

https://www.youtube.com/watch?v=Xj06KVKicds

DEMO : Closure by Sync - MiSTer FPGA - FX CAST - Atari ST

https://www.youtube.com/watch?v=LUEsgcTHlDI
Last edited by BBond007 on Wed Oct 24, 2018 7:10 am, edited 1 time in total.
BBond007
Captain Atari
Captain Atari
Posts: 466
Joined: Wed Feb 28, 2018 3:23 am

Re: FX CAST Atari ST core

Post by BBond007 »

breiztiger wrote:Hi

Just to tell your excellent core doesn’t have sound thru hdmi on my Samsung 34se790c (PC monitor) but ok on analog

:shrug:
I noticed the same thing but only on my Elgato video capture device but not with my Samsung monitor. I figured it was the Elgato which is totally buggy...

Juas as a test, try booting into another core which has working HDMI sound and run something that makes sounds then switch to the FX CAST core (while sounds are playing) and maybe then you'll have sound. Just switch cores - no hard reset. That usually works for me.
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Post by ijor »

BBond007 wrote:Does your future roadmap for this project include MIDI support? Maybe via a USB MIDI device like Roland UM-ONE.
I didn't consider supporting MIDI so far. Using an USB device is of course, possible, but quite complicated. It would need a special driver and/or a server program on the Linux side. It would be much easier if somebody would make a MIDI extension board.
breiztiger wrote:Just to tell your excellent core doesn’t have sound thru hdmi on my Samsung 34se790c (PC monitor) but ok on analog
Oh, sorry. Do you have 48KHz sound enabled on MiSTer.ini? This is currently not supported, I honestly forgot about that. I assumed, probably wrongly, that every monitor supports 96KHz sound.
Fx Cast: Atari St cycle accurate fpga core
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Post by ijor »

Hi Alien,
alien wrote:does it also emulate the 6301? (For example, does the Froggies over the Fence 6301 code I wrote run on it?).
Yes.
And does 4 bit hardscroll work on it? I'm guessing it does, but could you confirm?
Yes. Your demo runs fine :)
What about sound (full YM emulation?).
Every PSG feature is implemented. Both envelope based sound and digitized samples should work. There might be room to improve the sound quality though. I'm not the best person to make that kind of judgement, but I've been told sound is quite good.
And how does it do wakestates?
Yes, both GLUE and SHIFTER wakestates are implemented. But currently there is no user interface to select the wakestate.
Fx Cast: Atari St cycle accurate fpga core
User avatar
BitsNStuff
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 122
Joined: Tue Oct 16, 2018 7:55 am
Contact:

Re: FX CAST Atari ST core

Post by BitsNStuff »

Fantastic work, I've not tried it yet but hopefully I'll get a little time over the weekend to play with it.
Indcsion
Atari nerd
Atari nerd
Posts: 44
Joined: Fri Oct 12, 2018 11:48 am

Re: FX CAST Atari ST core

Post by Indcsion »

Thanks for the core. I got a few games to run but I havent been able to get sound. My sound receiver says 96k on it when I use core.
User avatar
witchmaster
Captain Atari
Captain Atari
Posts: 150
Joined: Wed Jun 15, 2011 10:50 am

Re: FX CAST Atari ST core

Post by witchmaster »

ijor wrote:
BBond007 wrote:Does your future roadmap for this project include MIDI support? Maybe via a USB MIDI device like Roland UM-ONE.
I didn't consider supporting MIDI so far. Using an USB device is of course, possible, but quite complicated. It would need a special driver and/or a server program on the Linux side. It would be much easier if somebody would make a MIDI extension board.
Is there a UART available for the cores? MIDI is just serial data (no flow control) at 31250b/s speed. It would be easy to create the hardware for a MIDI interface that way, just a few components would be needed and implementation of MIDI support in the core wouldn't be too hard then I guess (I don't have any experience with FPGA development)?
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Post by ijor »

Indcsion wrote:Thanks for the core. I got a few games to run but I havent been able to get sound. My sound receiver says 96k on it when I use core.
What happens when you use other cores? Do you get sounds correctly? What does your sound receiver say for the other cores?
witchmaster wrote:Is there a UART available for the cores? MIDI is just serial data (no flow control) at 31250b/s speed. It would be easy to create the hardware for a MIDI interface that way, just a few components would be needed and implementation of MIDI support in the core wouldn't be too hard then I guess (I don't have any experience with FPGA development)?
The ST has a built-in MIDI Uart. It is currently disabled on the core, but it's trivial to enable it. We just need to agree which pins would be connected to the serial input and output. That might be better to coordinate with Sorgelig. It might be possible to (re) use some pins on the I/O board.

Once the Uart is connected to external pins, anybody would be able to make a MIDI expansion. The hardware required is minimal and it's not much more than the connectors.
Fx Cast: Atari St cycle accurate fpga core
User avatar
witchmaster
Captain Atari
Captain Atari
Posts: 150
Joined: Wed Jun 15, 2011 10:50 am

Re: FX CAST Atari ST core

Post by witchmaster »

ijor wrote:The ST has a built-in MIDI Uart. It is currently disabled on the core, but it's trivial to enable it. We just need to agree which pins would be connected to the serial input and output. That might be better to coordinate with Sorgelig. It might be possible to (re) use some pins on the I/O board.

Once the Uart is connected to external pins, anybody would be able to make a MIDI expansion. The hardware required is minimal and it's not much more than the connectors.
Cool, that sounds perfect! MIDI is a splendid feature of the ST so it would be very nice to have! @Sorgelig, which two pins would be suitable for this do you reckon?
Sorgelig
Ultimate Atarian
Ultimate Atarian
Posts: 6348
Joined: Mon Dec 14, 2015 10:51 am
Location: Russia/Taiwan

Re: FX CAST Atari ST core

Post by Sorgelig »

ijor wrote:The ST has a built-in MIDI Uart. It is currently disabled on the core, but it's trivial to enable it. We just need to agree which pins would be connected to the serial input and output. That might be better to coordinate with Sorgelig. It might be possible to (re) use some pins on the I/O board.
I/O Board 5.5 has definition for Serial I/O with pins defined for RX and TX with 4 AUX pins with output to USB 3.0 connector. RX/TX definition is of course core specific, but i strongly suggest to use this definition as other cores also may use serial connection so extensions must use the same directions so they won't collide between cores.
I/O boards before v5.5 still can use the same pins taken from Arduino header.

In both cases, signals are bare FPGA pins with 3.3V, so conversion circuit with appropriate TTL levels is required.
Indcsion
Atari nerd
Atari nerd
Posts: 44
Joined: Fri Oct 12, 2018 11:48 am

Re: FX CAST Atari ST core

Post by Indcsion »

ijor wrote:
Indcsion wrote:Thanks for the core. I got a few games to run but I havent been able to get sound. My sound receiver says 96k on it when I use core.
What happens when you use other cores? Do you get sounds correctly? What does your sound receiver say for the other cores?


Normally it just says direct and dvd for the input im using but it switches to direct96k dvd.
OzOnE
Atarian
Atarian
Posts: 7
Joined: Mon Oct 22, 2018 5:28 pm

Re: FX CAST Atari ST core

Post by OzOnE »

Hi, all,

This is my first post here. (I go by the name "ElectronAsh" on YouTube an Twitter).

I just wanted to also say congrats and thanks for the new Atari ST core. It looks great. :)

The 68000 core will be perfect for other cores, too.


@ijor - I was just wondering what your methodology was for confirming the accuracy of your 68000?

Did it involve decapping of original chips, output pin comparison, or some other method?

OzOnE.
JimDrew
Atari Super Hero
Atari Super Hero
Posts: 865
Joined: Mon Nov 04, 2013 5:23 pm

Re: FX CAST Atari ST core

Post by JimDrew »

ijor wrote:I didn't consider supporting MIDI so far. Using an USB device is of course, possible, but quite complicated. It would need a special driver and/or a server program on the Linux side.
Isn't there an auxillary board for the MiSTer that has 4 USB ports available on the FPGA side?
I am the flux ninja
User avatar
alien
Atari maniac
Atari maniac
Posts: 99
Joined: Sat May 01, 2004 4:01 am
Location: USA
Contact:

Re: FX CAST Atari ST core

Post by alien »

BBond007 wrote:
alien wrote: I'm curious: does it also emulate the 6301? (For example, does the Froggies over the Fence 6301 code I wrote run on it?). And does 4 bit hardscroll work on it? I'm guessing it does, but could you confirm? What about sound (full YM emulation?). And how does it do wakestates? Yes, I know, I'm thinking of edge cases, but I find the fact you got Closure to work on it truly impressive!
Alien,

I decided to give it a try so that you could evaluate the results yourself. I had initially tried to run the demo in sequence but It failed to return to the menu after running Disk #2 (ST Macrolazeas Conexis) and requesting Disk #1 again. Had the same problem with the version from http://www.pouet.net/prod.php?which=8936 (.MSA) as well as a the TOSEC(.ST format) - So I saved that for portion last. I must say I am very impressed with your demo. Sorry if I rushed through and missed anything. Hopefully I was able to capture the effects you asking about. I also Included a link to Closure running on MiSTer/FX CAST...

DEMO : Froggies over the fence by Overlanders - MiSTer FPGA - FX CAST - Atari ST

https://www.youtube.com/watch?v=Xj06KVKicds

DEMO : Closure by Sync - MiSTer FPGA - FX CAST - Atari ST

https://www.youtube.com/watch?v=LUEsgcTHlDI
Thanks for doing this! Yes it looks like it works well. I assume it's asking for disk 1 to reload the menu (it's been a while since I worked on it...)
Alien / ST-Connexion
User avatar
alien
Atari maniac
Atari maniac
Posts: 99
Joined: Sat May 01, 2004 4:01 am
Location: USA
Contact:

Re: FX CAST Atari ST core

Post by alien »

ijor wrote:Hi Alien,
alien wrote:does it also emulate the 6301? (For example, does the Froggies over the Fence 6301 code I wrote run on it?).
Yes.
And does 4 bit hardscroll work on it? I'm guessing it does, but could you confirm?
Yes. Your demo runs fine :)
What about sound (full YM emulation?).
Every PSG feature is implemented. Both envelope based sound and digitized samples should work. There might be room to improve the sound quality though. I'm not the best person to make that kind of judgement, but I've been told sound is quite good.
And how does it do wakestates?
Yes, both GLUE and SHIFTER wakestates are implemented. But currently there is no user interface to select the wakestate.

Wow. I'm really impressed! This is a monumental achievement. When you release the source code, I'll be very happy to look at it (hopefully it's in Verilog which I used to know). And I'll probably buy a MiSTer to run it on! If I ever get some free time, it might convince me to start coding 68000 again! :cheers:
Alien / ST-Connexion
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Post by ijor »

Hi ElectronAsh,
OzOnE wrote:@ijor - I was just wondering what your methodology was for confirming the accuracy of your 68000?
Did it involve decapping of original chips, output pin comparison, or some other method?
All the methods. I performed some extensive reverse engineering for years. I studied the Motorola patents. I decapped and analyzed the die layout. I performed some traces with a LA. And, of course, software testing.

The best confirmation comes from testing the ST core itself. Contrary to most other 68K platforms, many ST software requires cycle accuracy. We have know that long ago from the software emulators. Take for example the two screenshots I included in the original announcement. One is a demo, the other is a copy protected music application. Trust me, you can't reach those screens without extreme accuracy.

Of course, it is always possible that I missed something, or there is still a bug unexposed. So I can't say for sure that it is 100% cycle accurate. But so far it seems so. And for sure it is very close in the worst case.
Fx Cast: Atari St cycle accurate fpga core
ijor
Hardware Guru
Hardware Guru
Posts: 4012
Joined: Sat May 29, 2004 7:52 pm
Contact:

Re: FX CAST Atari ST core

Post by ijor »

Sorgelig wrote:I/O Board 5.5 has definition for Serial I/O with pins defined for RX and TX ...
Great! Will look into connecting the midi Uart in a future release.
alien wrote:Wow. I'm really impressed! This is a monumental achievement. When you release the source code, I'll be very happy to look at it (hopefully it's in Verilog which I used to know). And I'll probably buy a MiSTer to run it on! If I ever get some free time, it might convince me to start coding 68000 again! :cheers:
It is written in SystemVerilog. Most being plain Verilog anyway.
Fx Cast: Atari St cycle accurate fpga core
Locked

Return to “MiSTer”