Lets actually try Hybrid Emulation
Re: Lets actually try Hybrid Emulation
Interesting. This is an advantage we have in the fpga, we can snoop Amiga dma writes.
On Amiga it sounds like data cache is disabled on chip ram - according to Gunnar here: http://www.apollo-core.com/knowledge.ph ... 5&z=-AGF3K
We already effectively have instruction cache since qemu compiles the instructions and caches them.
So.... back to the other questions, why is disk access slow? Interrupt latency? More data and code sharing pages?
Oh and what did I do wrong with rtg...
On Amiga it sounds like data cache is disabled on chip ram - according to Gunnar here: http://www.apollo-core.com/knowledge.ph ... 5&z=-AGF3K
We already effectively have instruction cache since qemu compiles the instructions and caches them.
So.... back to the other questions, why is disk access slow? Interrupt latency? More data and code sharing pages?
Oh and what did I do wrong with rtg...
Re: Lets actually try Hybrid Emulation
Confirmed that RTG doesn't work on a clean checkout. Perhaps because I'm using Quartus 20.1.1. So something else to look into before I try the hybrid one.
Actually I realize that I have 17.0 installed too, so will check with that!
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lets actually try Hybrid Emulation
I have Quartus installed as well, so I can help compile a core if needed, but I will have to check what version of Quartus it is I have installed. I think it might be 17.
Re: Lets actually try Hybrid Emulation
I built it with Quartus 17 and ... it didn't work. Then I went back to the core that worked before and it stopped working! So not sure what is going on, perhaps related to using VGA instead of HDMI. I'll plug in my HDMI monitor next time I take a look (probably a couple of weeks, busy with other stuff...).
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lets actually try Hybrid Emulation
I have been playing around with the Test 9 of this and it does seem more stable. Still cannot boot SysInfo 4.3 or 4.4 directly but I tried booting into AmigaOS 3.1.4 using the HDF you shared earlier, which I suppose has a better supported 040 library, and from there I could run SysInfo 4.4 directly. Shows the same score as Sysinfo 3.24, except now it shows MMU and FPU as being in use.
The speed also seems to be pretty much the same as the regular Minimig running with the 020 core. I tried running some games. I ran Dungeon Master, and it had some audio errors, but it ran at a pretty good speed, but eventually it crashed. Froze I think. I tried Scorched Earth 1.8 and it shows some of the first screens, then before reaching the main game screen it encounters an IO error. I tried Eye of the Beholder AGA, and the intro was pretty slow. The music and audio overall seemed to work well though. No missing sounds like in Castle Master. When the game was fully loaded it seemed to work. I could even load a game and save the game, I suspected maybe it had issues writing data to disk. But before I could exit the game it froze.
Given the Amiga system has pretty good performance in tests, but sometimes runs very slowly compared to even an Amiga 500, I suspect it has a bottleneck somewhere, possibly when sending data between QEMU and the MiSTer core on the FPGA? I hope its something that can be helped by increasing a cache somewhere or something.
But I am thinking maybe its best to first focus on an 020 CPU which seems less likely to run into FPU and MMU problems, and problems with being a 040 CPU needing 040 libraries when the core otherwise seems to expect an 020 CPU? The ultimate goal, would be to get support for MMU and FPU of course, but I think it would probably be easier to debug this solution and its performance and stability, with an 020 CPU, which would make it more directly comparable with the regular MiSTer core as well. Also if its the PiStorm QEMU software that is being used here, I hear they have only gotten a stable 020 core there as well.
Oh yeah, I also tried AmigaOS 3.2, it has a special disk with generic CPU libraries, but it did not seem to work. I have not tried the 040 libraries from the 3.1.4 HDF that can boot, but I figured I might as well wait and see if what the next release of this has to offer.
The speed also seems to be pretty much the same as the regular Minimig running with the 020 core. I tried running some games. I ran Dungeon Master, and it had some audio errors, but it ran at a pretty good speed, but eventually it crashed. Froze I think. I tried Scorched Earth 1.8 and it shows some of the first screens, then before reaching the main game screen it encounters an IO error. I tried Eye of the Beholder AGA, and the intro was pretty slow. The music and audio overall seemed to work well though. No missing sounds like in Castle Master. When the game was fully loaded it seemed to work. I could even load a game and save the game, I suspected maybe it had issues writing data to disk. But before I could exit the game it froze.
Given the Amiga system has pretty good performance in tests, but sometimes runs very slowly compared to even an Amiga 500, I suspect it has a bottleneck somewhere, possibly when sending data between QEMU and the MiSTer core on the FPGA? I hope its something that can be helped by increasing a cache somewhere or something.
But I am thinking maybe its best to first focus on an 020 CPU which seems less likely to run into FPU and MMU problems, and problems with being a 040 CPU needing 040 libraries when the core otherwise seems to expect an 020 CPU? The ultimate goal, would be to get support for MMU and FPU of course, but I think it would probably be easier to debug this solution and its performance and stability, with an 020 CPU, which would make it more directly comparable with the regular MiSTer core as well. Also if its the PiStorm QEMU software that is being used here, I hear they have only gotten a stable 020 core there as well.
Oh yeah, I also tried AmigaOS 3.2, it has a special disk with generic CPU libraries, but it did not seem to work. I have not tried the 040 libraries from the 3.1.4 HDF that can boot, but I figured I might as well wait and see if what the next release of this has to offer.
Re: Lets actually try Hybrid Emulation
I read in PiStorm updates about improved Musashi (20-30%)
I suspect the improvements are only in the pistorm git repo, and not gone upstream.
https://github.com/captain-amygdala/pis ... mmits/main
Did anyone build for Minimig_hybrid yet?
I suspect the improvements are only in the pistorm git repo, and not gone upstream.
https://github.com/captain-amygdala/pis ... mmits/main
Did anyone build for Minimig_hybrid yet?
Re: Lets actually try Hybrid Emulation
I did try the musashi from pistorm earlier in the thread, are there are more recent changes?
I should upload my last changes to the kernel module and stuff.
While I've been doing other projects, has anyone been trying to improve this? I'll be back to it in a few weeks I reckon.
I should upload my last changes to the kernel module and stuff.
While I've been doing other projects, has anyone been trying to improve this? I'll be back to it in a few weeks I reckon.
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
-
- Posts: 111
- Joined: Sun Feb 14, 2021 6:29 pm
- Has thanked: 1 time
- Been thanked: 5 times
Re: Lets actually try Hybrid Emulation
I am using the pistorm configured as 040 and its pretty fast - really would love to see this on mister too
-
- Top Contributor
- Posts: 375
- Joined: Sun Sep 27, 2020 10:16 am
- Has thanked: 209 times
- Been thanked: 87 times
Re: Lets actually try Hybrid Emulation
You're the one holding the keys to that fort I reckon. Can't wait to see you back at it!foft wrote: ↑Fri Jun 25, 2021 12:04 pm I did try the musashi from pistorm earlier in the thread, are there are more recent changes?
I should upload my last changes to the kernel module and stuff.
While I've been doing other projects, has anyone been trying to improve this? I'll be back to it in a few weeks I reckon.
Remastering Classic Game Cinematics: My new Youtube fun, check it out
https://www.youtube.com/@neocaron87
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
-
- Posts: 111
- Joined: Sun Feb 14, 2021 6:29 pm
- Has thanked: 1 time
- Been thanked: 5 times
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lets actually try Hybrid Emulation
Some PiStorm news, which is probably relevant for this project as PiStorm was the inspiriation:
https://www.patreon.com/posts/54448728
Turns out only patreons can see the post, I thought it was public.
Part of the article:
https://www.patreon.com/posts/54448728
Turns out only patreons can see the post, I thought it was public.
Part of the article:
So overall there should be a lot of promising progress with Emu68 and when its ready for PiStorm I am thinking it would work for the Hybrid Core as well.I have updated CMake file to include the PiStorm variant, hacked some of my sources here and there, removed MMU map of the RAM at the lowest 16 megabytes. Then I have adjusted page fault handler to catch this accesses and pass them through to the CPLD. I have put my RasPi4 on the PiStorm, started first bits and pieces of code, and nothing happened. Not a single sign of life.
Well, lesson learned was, PiStorm is not ready for RasPi4 yet. It will be, but right now the suggested hardware is Pi3. I took it then, double-checked everything and powered the A500 again. This time a bit more happened, but the serial console was not really readable. Pure trash. Well, my fault. I forgot how to talk with amiga hardware on low level. I was reading the SERDAT register but I was not allowed to. Instead, for all serial port shifter status I should have read SERDATR instead. Once I have fixed it, Emu68 started to talk! Think about it. Emu68, 64-bit big endian AARCH64 code running on RasPi3, talking through CPLD and writing to my Minicom terminal through A500 serial port. Isn't that cool? Isn't that mind-blowing? For me it was. Especially since the serial port transmission occurs at 115200 bps. On A500 board
Re: Lets actually try Hybrid Emulation
which you can only read if you become a patreon,, is this an advert for soliciting funds ?Caldor wrote: ↑Wed Aug 04, 2021 3:44 pm Some PiStorm news, which is probably relevant for this project as PiStorm was the inspiriation:
https://www.patreon.com/posts/54448728
- SuperBabyHix
- Posts: 152
- Joined: Sun May 24, 2020 8:26 pm
- Has thanked: 45 times
- Been thanked: 36 times
Re: Lets actually try Hybrid Emulation
Sounds more to me like they were simply citing a source that is behind a paywall, and explaining that it was behind a paywall.
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lets actually try Hybrid Emulation
Yes, sorry, I updated the post when I found it was not an overall open to post. I was not even sure I had supported this Patreon, but turns out I had.sardine wrote: ↑Wed Aug 04, 2021 3:53 pmwhich you can only read if you become a patreon,, is this an advert for soliciting funds ?Caldor wrote: ↑Wed Aug 04, 2021 3:44 pm Some PiStorm news, which is probably relevant for this project as PiStorm was the inspiriation:
https://www.patreon.com/posts/54448728
Re: Lets actually try Hybrid Emulation
Is this project still being worked on? The results that PiSTorm's new Emu68K ARM JIT is getting is very interesting (166Mips on RPI3 using 25% of single thread CPU). If software 68k emulation from PiSTorm evolves into Hybrid minimig for MiSTer it would be very cool.
Re: Lets actually try Hybrid Emulation
Emu68k runs on “bare metal” pi, how fit is it to become a process under Linux? The “ordinary” PiStorm emulator Musashi has also improved a lot, just updating the current variant for MiSTer could also be interesting. What was the git repo to this hybrid musashi again?
- LamerDeluxe
- Top Contributor
- Posts: 1239
- Joined: Sun May 24, 2020 10:25 pm
- Has thanked: 887 times
- Been thanked: 284 times
Re: Lets actually try Hybrid Emulation
Would be great if this project could get to a stable state, especially with those nice speed improvements.
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lets actually try Hybrid Emulation
Is it even using a special version? I think with the latest builds shared, you only need the source code for Mushashi, you used to need the compiled version, or at least it was just one file. I think that was to make it easier to test. I figured out how to get it to run, but I am a but unsure if it even works now, with how much the MiSTer got updated. The Linux part and such, and this uses a special version of the Minimig core, and... not sure if it also uses a special version of the MiSTer core itself? If that is the case, I guess you can still use it and you just have to use this special version of it, and other cores might not work while its being tested.kolla wrote: ↑Fri Sep 24, 2021 4:17 pm Emu68k runs on “bare metal” pi, how fit is it to become a process under Linux? The “ordinary” PiStorm emulator Musashi has also improved a lot, just updating the current variant for MiSTer could also be interesting. What was the git repo to this hybrid musashi again?
Its pretty fidgety though. Pretty sure you have to run the Mushashi emulation through a remote console while running the Amiga core on the MiSTer and it has to be done in the right order or something.
Re: Lets actually try Hybrid Emulation
All the cumbersome is ok for me, just asking for the source repo of musashi used by pistorm… because I doubt it is the upstream repo - https://github.com/kstenerud/Musashi
Re: Lets actually try Hybrid Emulation
Core? It’s software emulation, not FPGA with soft cores. musashi runs as a process under Linux and there’s other software on the Linux side that offers services like virtual scsi, networking and framebuffer for RTG. Emu68 is a different beast, it is a bare metal emulator, so no Linux and everything Linux offers. Instead everything must be done from within the emulator, meaning that hardware drivers and various support code needs to be written. For AmigaOS.
Re: Lets actually try Hybrid Emulation
Again they're just replacing Musashi's 68k implementation with Emu68k'skolla wrote: ↑Mon Oct 04, 2021 7:28 pm Core? It’s software emulation, not FPGA with soft cores. musashi runs as a process under Linux and there’s other software on the Linux side that offers services like virtual scsi, networking and framebuffer for RTG. Emu68 is a different beast, it is a bare metal emulator, so no Linux and everything Linux offers. Instead everything must be done from within the emulator, meaning that hardware drivers and various support code needs to be written. For AmigaOS.
Everything else stays the same.
Re: Lets actually try Hybrid Emulation
And with "they" you mean Michal and Claude?
You’d think I knew what I have "patreon" for over the years… but I guess not.
“A key point which I’ve made before is that this is a bare metal emulator as opposed to a Linux based one. Which means that all the extra goodies such as SCSI and RTG will need to be re-written to use the hardware.”
https://linuxjedi.co.uk/2021/09/26/this ... 021-09-26/
https://www.patreon.com/posts/boot-time-55019666
https://amigaworld.net/modules/newbb/vi ... =25#844885
You’d think I knew what I have "patreon" for over the years… but I guess not.
“A key point which I’ve made before is that this is a bare metal emulator as opposed to a Linux based one. Which means that all the extra goodies such as SCSI and RTG will need to be re-written to use the hardware.”
https://linuxjedi.co.uk/2021/09/26/this ... 021-09-26/
https://www.patreon.com/posts/boot-time-55019666
https://amigaworld.net/modules/newbb/vi ... =25#844885
- Caldor
- Top Contributor
- Posts: 930
- Joined: Sat Jul 25, 2020 11:20 am
- Has thanked: 112 times
- Been thanked: 111 times
Re: Lets actually try Hybrid Emulation
You are asking which repo was used to get it working with the MiSTer? I am not sure how it was compiled, but pretty sure it was an official release. I think I still have a few builds somewhere I can share, but I also think they are already in this thread. So far it has all been pretty unstable though. It can run SysInfo, but it cannot be trusted much since its not stable I think. It has several issues, crashes when trying to access drives a certain way, I do not think it can run any games without crashing and other things.kolla wrote: ↑Fri Oct 01, 2021 9:35 pm All the cumbersome is ok for me, just asking for the source repo of musashi used by pistorm… because I doubt it is the upstream repo - https://github.com/kstenerud/Musashi
I have not tried it for a long time. It uses a special build of the Main core for the MiSTer, or at least it can do so, and I am not sure it is compatible anymore, with the newest version of the Main core, the special Minimig core designed to be used with Mushashi.