Lets actually try Hybrid Emulation
-
- 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
Good luck!foft wrote: ↑Wed Apr 14, 2021 9:20 pm Tomorrow I’m going to try out Michal Schulz’s Emu68
https://github.com/michalsc/Emu68
Wish me luck!
You're creating history here, a lot of cores impossible now because of the lack of space (or frequencies too low) on the FPGA chip would become possible in this hybrid approach.
Some would call that heresy, I call that pushing boudaries and being smart! Congrats!
Remastering Classic Game Cinematics: My new Youtube fun, check it out
https://www.youtube.com/@neocaron87
- allyourbasekris
- Posts: 79
- Joined: Wed Sep 23, 2020 11:47 pm
- Has thanked: 31 times
- Been thanked: 45 times
Re: Lets actually try Hybrid Emulation
I just tried it out and got to Workbench and took you a nice screenshot.
-
- 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
allyourbasekris wrote: ↑Wed Apr 14, 2021 10:18 pmI just tried it out and got to Workbench and took you a nice screenshot.Screenshot (4).png
BEAUTIFUL
Remastering Classic Game Cinematics: My new Youtube fun, check it out
https://www.youtube.com/@neocaron87
-
- Posts: 111
- Joined: Sun Feb 14, 2021 6:29 pm
- Has thanked: 1 time
- Been thanked: 5 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
Can you please tell me how to use this - I dont know anything about ssh so where does the file go and how do I run it?
-
- Top Contributor
- Posts: 1911
- Joined: Wed May 27, 2020 1:59 pm
- Has thanked: 145 times
- Been thanked: 454 times
Re: Lets actually try Hybrid Emulation
I think it is better for you to wait until something more usable is posted. Right now it is a proof of concept, which is a huge step, but my guess is that you will be frustrated in no time.lordoftime79 wrote: ↑Wed Apr 14, 2021 11:15 pm Can you please tell me how to use this - I dont know anything about ssh so where does the file go and how do I run it?
-
- 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 just want to look i am excited if I had some instuctions i cud follow them.
Re: Lets actually try Hybrid Emulation
Download 7-zip
Extract the tar to get the two files
Download winscp
Connect to mister with winscp
- drag the musashi_68020_mister to /media/fat
- drag the core to /media/fat/_computer/ (with the other cores, I might have the name wrong)
Download putty or mobaxterm
Connect to mister with putty
cd /media/fat (then enter)
./musashi_68020_mister (then enter)
Worth a read:
https://www.jamesfmackenzie.com/2021/01 ... ing-files/
This will all be made simpler
Extract the tar to get the two files
Download winscp
Connect to mister with winscp
- drag the musashi_68020_mister to /media/fat
- drag the core to /media/fat/_computer/ (with the other cores, I might have the name wrong)
Download putty or mobaxterm
Connect to mister with putty
cd /media/fat (then enter)
./musashi_68020_mister (then enter)
Worth a read:
https://www.jamesfmackenzie.com/2021/01 ... ing-files/
This will all be made simpler
- allyourbasekris
- Posts: 79
- Joined: Wed Sep 23, 2020 11:47 pm
- Has thanked: 31 times
- Been thanked: 45 times
Re: Lets actually try Hybrid Emulation
https://schh.medium.com/ssh-for-dummies-ea168e6ff547lordoftime79 wrote: ↑Wed Apr 14, 2021 11:20 pm i just want to look i am excited if I had some instuctions i cud follow them.
Re: Lets actually try Hybrid Emulation
Absolutely amazing progress! It's hard to fathom that you have got this working in such a short time.
To me Buffee looks similar to this approach on ground level. They are claiming close to 100x performance target to what is achieved here currently. I do understand that it's still very very early days, but it got me wondering what is the theoretical performance level achievable with de10-nano cpu/fpga combo?
To me Buffee looks similar to this approach on ground level. They are claiming close to 100x performance target to what is achieved here currently. I do understand that it's still very very early days, but it got me wondering what is the theoretical performance level achievable with de10-nano cpu/fpga combo?
Re: Lets actually try Hybrid Emulation
Question for people who know Amiga JIT options... Which is best to try:
Aranym uat_cpu: https://github.com/aranym/aranym/tree/m ... rc/uae_cpu
Emu68: https://github.com/michalsc/Emu68
TomB's Pandora uae4arm: https://github.com/PandTomB/uae4arm
None of them are as well documented as musashi, but I'll have a go at figuring out how to use them.
I'm thinking the last one is the best option, since the gp32/gp2x/openpandora devs were super at doing arm optimisation.
I remember this one was used a lot, though its interpreted iirc and only 68000.
https://github.com/notaz/cyclone68000
One complication in all this is that the hps-fpga bridge is little endian, at least in how it automatically handles misaligned accesses. If all the accesses are aligned then I could put big endian format through it to avoid the conversion arm side (fpga side is basically 'free').
Aranym uat_cpu: https://github.com/aranym/aranym/tree/m ... rc/uae_cpu
Emu68: https://github.com/michalsc/Emu68
TomB's Pandora uae4arm: https://github.com/PandTomB/uae4arm
None of them are as well documented as musashi, but I'll have a go at figuring out how to use them.
I'm thinking the last one is the best option, since the gp32/gp2x/openpandora devs were super at doing arm optimisation.
I remember this one was used a lot, though its interpreted iirc and only 68000.
https://github.com/notaz/cyclone68000
One complication in all this is that the hps-fpga bridge is little endian, at least in how it automatically handles misaligned accesses. If all the accesses are aligned then I could put big endian format through it to avoid the conversion arm side (fpga side is basically 'free').
-
- Posts: 111
- Joined: Sun Feb 14, 2021 6:29 pm
- Has thanked: 1 time
- Been thanked: 5 times
Re: Lets actually try Hybrid Emulation
nice work. unfortunately even following your insturctions it wouldnt work for me, just got a blue and purple garbled screen.
Re: Lets actually try Hybrid Emulation
Yeah you need to start it in the right order.lordoftime79 wrote: ↑Thu Apr 15, 2021 9:34 am nice work. unfortunately even following your insturctions it wouldnt work for me, just got a blue and purple garbled screen.
e.g. set to 8MB fast ram, reset on the core. THEN start the cpu process.
Re: Lets actually try Hybrid Emulation
Their work is open so we'll be able to use their pjit when its working. Actually I think they expect their approach to be slower than standard jit, just with fewer 'jitters'.SpacemanX wrote: ↑Thu Apr 15, 2021 6:40 am Absolutely amazing progress! It's hard to fathom that you have got this working in such a short time.
To me Buffee looks similar to this approach on ground level. They are claiming close to 100x performance target to what is achieved here currently. I do understand that it's still very very early days, but it got me wondering what is the theoretical performance level achievable with de10-nano cpu/fpga combo?
Not sure how the Buffee CPU compares to the ARM Cortex A9 @800MHz here.
Edit: Looked it up: Octavo OSD335x-SM with ARM Cortex A8 AM335x @ 1GHz.
Should be pretty comparable I'd have thought, the A9 has a shorter pipeline.
Re: Lets actually try Hybrid Emulation
800MHz Arm A8 vs A9, so DE10-Nano should be faster in that regard.
https://octavosystems.com/octavo_products/osd335x-sm/
-
- Posts: 111
- Joined: Sun Feb 14, 2021 6:29 pm
- Has thanked: 1 time
- Been thanked: 5 times
Re: Lets actually try Hybrid Emulation
Finally got it working but I cant seem to get it to load hardrive images - I get a bus error?
Re: Lets actually try Hybrid Emulation
Thanks, good to know. I'll try one out just need to work out how to make one.lordoftime79 wrote: ↑Thu Apr 15, 2021 10:12 am Finally got it working but I cant seem to get it to load hardrive images - I get a bus error?
- allyourbasekris
- Posts: 79
- Joined: Wed Sep 23, 2020 11:47 pm
- Has thanked: 31 times
- Been thanked: 45 times
Re: Lets actually try Hybrid Emulation
I've had HD images load with no issues. It was a 3.14 installation, stock.foft wrote: ↑Thu Apr 15, 2021 10:58 amThanks, good to know. I'll try one out just need to work out how to make one.lordoftime79 wrote: ↑Thu Apr 15, 2021 10:12 am Finally got it working but I cant seem to get it to load hardrive images - I get a bus error?
-
- 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 tried a Coffin image and hst install thats from my CD32 both usually work on the minimig core.
I was able to boot from floppy to workbench but I dont have all the adfs so cant really test much more than that as all my stuff is on HDFS
I was able to boot from floppy to workbench but I dont have all the adfs so cant really test much more than that as all my stuff is on HDFS
Re: Lets actually try Hybrid Emulation
The bus error is 16-bit aligned 32-bit writes (at least the one I see)
Cortex a9 is supposed to support these.
https://developer.arm.com/documentation ... rt?lang=en
Perhaps this flag is set wrong.
Cortex a9 is supposed to support these.
https://developer.arm.com/documentation ... rt?lang=en
Perhaps this flag is set wrong.
- allyourbasekris
- Posts: 79
- Joined: Wed Sep 23, 2020 11:47 pm
- Has thanked: 31 times
- Been thanked: 45 times
Re: Lets actually try Hybrid Emulation
If you try to enable RTG then you also get a bus error. I'm not really surprised it didn't work with it being very early days. Exciting times. thanks Foft for the effort you're putting in, it's much appreciated.
Re: Lets actually try Hybrid Emulation
I spent the evening trying to figure out how to use one of these JITs.
I tried the uae4arm one. It was non-obvious how to rip it out. Since it seemed to be based on aranym anyway I decided to go direct to that.
Onto aranym: I managed to cross compile the whole thing fine. Then I tried to find the CPU interface - and couldn't! So I decided to rip out everything bit by bit until I got to just the CPU. I got pretty much there but am not confident I managed to remove everything + its still not obvious how to plumb in the memory. It has funky custom SIGSEGV handling and memory offsets. So now I have something that might be pretty close to ... the raw 68k jit ... but not sure. It seems that aranym has really nice clean code, but then bits and pieces of custom stuff leaked into the cpu jit part. I've just signed up to their mailing list to see if one of their developers can give me a hand a ripping it out.
Which leaves Emu68. I checked it out from git and didn't really see how to use it standalone.
So... little bit stuck here. Hoping the aranym devs can help me out.
Help!
I tried the uae4arm one. It was non-obvious how to rip it out. Since it seemed to be based on aranym anyway I decided to go direct to that.
Onto aranym: I managed to cross compile the whole thing fine. Then I tried to find the CPU interface - and couldn't! So I decided to rip out everything bit by bit until I got to just the CPU. I got pretty much there but am not confident I managed to remove everything + its still not obvious how to plumb in the memory. It has funky custom SIGSEGV handling and memory offsets. So now I have something that might be pretty close to ... the raw 68k jit ... but not sure. It seems that aranym has really nice clean code, but then bits and pieces of custom stuff leaked into the cpu jit part. I've just signed up to their mailing list to see if one of their developers can give me a hand a ripping it out.
Which leaves Emu68. I checked it out from git and didn't really see how to use it standalone.
So... little bit stuck here. Hoping the aranym devs can help me out.
Help!
Re: Lets actually try Hybrid Emulation
Regarding bus errors: try this cpu.
It only fixed up 16-bit misaligned 32-bit writes, but that sorted a bunch of stuff.
It only fixed up 16-bit misaligned 32-bit writes, but that sorted a bunch of stuff.
- Attachments
-
- musashi_68020_mister.gz
- (1.23 MiB) Downloaded 192 times
Re: Lets actually try Hybrid Emulation
Another option for the cpu is qemu.
It has had 68k support for a few years now and ... has documentation and a load store and memory api.
Might give that a try.
Edit: another advantage of qemu: It also has powerpc support.
Edit2: https://stackoverflow.com/questions/370 ... emory-maps
edit3: + I can try a native 68k dhrystones on the existing machines first to see how fast it is
It has had 68k support for a few years now and ... has documentation and a load store and memory api.
Might give that a try.
Edit: another advantage of qemu: It also has powerpc support.
Edit2: https://stackoverflow.com/questions/370 ... emory-maps
edit3: + I can try a native 68k dhrystones on the existing machines first to see how fast it is
-
- Posts: 130
- Joined: Fri Jun 19, 2020 8:54 pm
- Has thanked: 13 times
- Been thanked: 58 times
Re: Lets actually try Hybrid Emulation
That would be a good idea. Also yet another option is Cyclone 68000 - https://notaz.gp2x.de/cyclone.php - apparently not JIT-based, but the Buffee blog described it as one of the fastest interpretive 68000 emulators. I think only covers the base 68000 instruction set though.
PPC is an interesting Pandora's Box to open, though. It's also occurred to me a number of times that with so many different ARM-based solutions appearing, some kind of PowerUP / WarpOS solution for running native ARM code from within AmigaOS would be very interesting, much like how Amiga PPC applications were handled back in the day.
Re: Lets actually try Hybrid Emulation
m68k:
/media/fat# LD_LIBRARY_PATH=./libs/lib/arm-linux-gnueabihf/ ./libs/lib/ld-linux-armhf.so.3 ./qemu-m68k ./dhrystone_m68k -l 10
duration: 0 seconds
number of threads: 1
number of loops: 10000000
delay between starting threads: 0 seconds
Dhrystone(1.1) time for 10000000 passes = 19.0
This machine benchmarks at 526624 dhrystones/second
300 DMIPS
Total dhrystone run time: 19.020809 seconds.
---
ppc:
Run failed. Did not crash but results printed out are garbage.
Took 16 seconds.
---
arm (native):
/media/fat# ./dhrystone_arm -l 10
duration: 0 seconds
number of threads: 1
number of loops: 10000000
delay between starting threads: 0 seconds
Dhrystone(1.1) time for 10000000 passes = 2.3
This machine benchmarks at 4442697 dhrystones/second
2529 DMIPS
Total dhrystone run time: 2.252560 seconds.
/media/fat# LD_LIBRARY_PATH=./libs/lib/arm-linux-gnueabihf/ ./libs/lib/ld-linux-armhf.so.3 ./qemu-m68k ./dhrystone_m68k -l 10
duration: 0 seconds
number of threads: 1
number of loops: 10000000
delay between starting threads: 0 seconds
Dhrystone(1.1) time for 10000000 passes = 19.0
This machine benchmarks at 526624 dhrystones/second
300 DMIPS
Total dhrystone run time: 19.020809 seconds.
---
ppc:
Run failed. Did not crash but results printed out are garbage.
Took 16 seconds.
---
arm (native):
/media/fat# ./dhrystone_arm -l 10
duration: 0 seconds
number of threads: 1
number of loops: 10000000
delay between starting threads: 0 seconds
Dhrystone(1.1) time for 10000000 passes = 2.3
This machine benchmarks at 4442697 dhrystones/second
2529 DMIPS
Total dhrystone run time: 2.252560 seconds.