Lets actually try Hybrid Emulation

foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

Re: Lets actually try Hybrid Emulation

Unread post by foft »

It was plain old vanilla musashi from head on GitHub. I also tried the pistorm version in case there were significant patches.

The mister side was a custom main which uses mmap to map the registers in etc. I think I posted it.

Now its getting colder again, be good to start on this again. Though I really don't want to do that without someone with serious amiga coding expertise. I'm not really so good at dealing with GB dumps of 68k code to debug... I only did a little 68k asm about 20 years back! Anyone keen?

I still think qemu is most promising.
foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

Re: Lets actually try Hybrid Emulation

Unread post by foft »

Regarding mister updates: Probably just the kernel module will need recompiling. I should update my mister and try.
kolla
Posts: 191
Joined: Sat Jun 13, 2020 7:56 am
Has thanked: 17 times
Been thanked: 33 times

Re: Lets actually try Hybrid Emulation

Unread post by kolla »

It’s the pistorm variant I didn’t find the repo for :)
foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

Re: Lets actually try Hybrid Emulation

Unread post by foft »

I got the mister upgraded to linux 5 and rebuilt the kernel module ok. Though the device tree overlays no longer seem to exist, so trying to work out how to apply them them!
foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

Re: Lets actually try Hybrid Emulation

Unread post by foft »

Found the solution I think: Need another module now since its not in mainline.
https://stackoverflow.com/questions/508 ... e-overlays
I'll include it in the release.
foft
Posts: 344
Joined: Thu Dec 03, 2020 11:05 am
Has thanked: 29 times
Been thanked: 125 times

Re: Lets actually try Hybrid Emulation

Unread post by foft »

The kernel module is working now on the latest mister (5.14.5)

I've uploaded the latest kernel module and also the latest qemu (6.10) here:
http://www.64kib.com/mister_hybrid_files/

This is all just getting it up to date and reminding myself where I'm up to, no fixes at this point.
Neocaron
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

Unread post by Neocaron »

Nice to see it's still something you want to do. Hopefuly you go back to it at some point. if it ends up working reliably It could be pretty huge for the entire Mister project!

Remastering Classic Game Cinematics: My new Youtube fun, check it out :D
https://www.youtube.com/@neocaron87

lordoftime79
Posts: 111
Joined: Sun Feb 14, 2021 6:29 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Lets actually try Hybrid Emulation

Unread post by lordoftime79 »

foft wrote: Tue Oct 12, 2021 8:46 pm The kernel module is working now on the latest mister (5.14.5)

I've uploaded the latest kernel module and also the latest qemu (6.10) here:
http://www.64kib.com/mister_hybrid_files/
How do I go about getting this to work? where do I put the files ect?
User avatar
thera34
Posts: 132
Joined: Fri Sep 11, 2020 7:51 am
Has thanked: 96 times
Been thanked: 89 times

Re: Lets actually try Hybrid Emulation

Unread post by thera34 »

I think the README files cover that:
"THE EASY WAY
Extract minimig_module_5.14_prebuilt.tar.gz into /media/fat
After each boot run: (yes best to add this to boot scripts...)
cd ./minimig_module
./setup"

I didn't try it yet, will do after I finish to polish my VHDs with 3.2 AmigaOS, most likely this weekend
User avatar
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

Unread post by Caldor »

Anyone tried this yet? I have not gotten around to it myself. I have tried it a few times before, I usually had to run the emulator part using Putty so I could control it from my computer when it was run, when it got restarted and such. Would be nice of the script would work, but have not worked for me so far, which should make it possible to just run the script or the core and it would run the emulation on boot.
dec_alpha
Posts: 7
Joined: Wed Jan 06, 2021 3:17 pm
Has thanked: 3 times

Re: Lets actually try Hybrid Emulation

Unread post by dec_alpha »

I'm a lurker here, but very interested in seeing this evolve into something useful.
For me, mostly to watch fairly old AGA demos, but would probably be nice to have a more powerful CPU in WB as well :)
chrisy
Posts: 27
Joined: Wed Oct 20, 2021 3:32 pm
Has thanked: 11 times

Re: Lets actually try Hybrid Emulation

Unread post by chrisy »

I wonder if this could be used to provide a PPC CPU as an accelerator board - make it possible to run WarpOS/PowerUp software or even OS4 Classic. Not sure if the ARM is fast enough to emulate PPC though?
rhester72
Top Contributor
Posts: 1321
Joined: Thu Jun 11, 2020 2:31 am
Has thanked: 15 times
Been thanked: 213 times

Re: Lets actually try Hybrid Emulation

Unread post by rhester72 »

chrisy wrote: Sun Nov 21, 2021 2:58 pm I wonder if this could be used to provide a PPC CPU as an accelerator board - make it possible to run WarpOS/PowerUp software or even OS4 Classic. Not sure if the ARM is fast enough to emulate PPC though?
That would be a hard no. x86 barely is.
throAU
Posts: 181
Joined: Fri Sep 11, 2020 1:06 am
Has thanked: 233 times
Been thanked: 27 times

Re: Lets actually try Hybrid Emulation

Unread post by throAU »

I think honestly the (long term) best thing to do re: "acceleration" would be to try and use native ARM as an accelerator.

This is probably WAY off on a tangent and out of scope of the MiSTer projec and not in line with any effort to emulate existing hardware; but rather than trying to emulate existing accelerators, providing an ARM accelerator would assist with transition of the Amiga to ARM. There's plenty of ARM hardware out there that would then eventually run the Amiga software library as it is ported across. E.g., UAE on Raspberry Pi would maybe be the ideal platform for this.

Again, out of scope of MiSTer, etc. but this is where I feel the Amiga community should be headed if they wish to keep the platform alive. Much like Apple did with their migration from 68k to PPC back in the day.
caffeinekid
Posts: 77
Joined: Wed Nov 04, 2020 10:03 am
Has thanked: 24 times
Been thanked: 16 times

Re: Lets actually try Hybrid Emulation

Unread post by caffeinekid »

throAU wrote: Mon Nov 22, 2021 12:10 am I think honestly the (long term) best thing to do re: "acceleration" would be to try and use native ARM as an accelerator.
Isn't that what this entire thread is about?
softtest9
Posts: 165
Joined: Thu May 28, 2020 7:13 pm
Has thanked: 3 times
Been thanked: 22 times

Re: Lets actually try Hybrid Emulation

Unread post by softtest9 »

It sounds like throAU wants an accelerator for running native ARM code on the DE10-nano's ARM part, whereas the thread is about using the ARM part to emulate an m68k CPU. Why the former would be desirable I have no idea.

Workbench is not open-source, so in order to transition Amiga to ARM, you would have to go with AROS. But AROS development right now is focused on the Vampire project and the Vampire guys most definitely are not interested in ARM. They want to resurrect the m68k.

Also, there is nothing special about ARM. ARM is not an open ISA, no Amiga applications exist for it so far, and you also have significantly less choices in form factor and so on compared to x86. I'd say, if you want to move the Amiga forward, it would make a lot more sense to improve the m68k (like the Vampire project) or transition to either x86 or RISC-V.
User avatar
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

Unread post by Caldor »

If there were more cores available it should be possible to do stuff that PiStorm and a PiMiga can do, passing through Linux apps to the Amiga UI. I think the Vampire accelerators might also do that for playing video and MP3s.

But the MiSTers DE10-Nano has two ARM cores. I think they are 800mhz and already one core is being used for graphics stuff, for scaling, filters and so on. The other core handles the Linux stuff afaik, so the IO and in this case the Hybrid core where it emulates an Amiga CPU.

Not sure its a feature people are looking for on the MiSTer to be able to run regular ARM Linux stuff in the Amiga UI like browsing, playing videos and MP3s. Could be a cool feature if it was implemented, but it needs changes to be done on the Linux side as well.

I am pretty sure Sorg had commented on wanting to look into doing something like this, that is the Hybrid core part, so I hope something comes from that.
throAU
Posts: 181
Joined: Fri Sep 11, 2020 1:06 am
Has thanked: 233 times
Been thanked: 27 times

Re: Lets actually try Hybrid Emulation

Unread post by throAU »

softtest9 wrote: Tue Nov 23, 2021 5:23 am It sounds like throAU wants an accelerator for running native ARM code on the DE10-nano's ARM part, whereas the thread is about using the ARM part to emulate an m68k CPU. Why the former would be desirable I have no idea.
Bingo. Not using the ARM side to run 68k in emulation faster, but using ARM like the add-on Amiga PPC accelerators were used. i.e., running ARM native code inside of the AmigaOS. Instead of a hardware PPC accelerator board, using the ARM processor "natively".

And yeah, it's not "desirable" from a hardware recreation perspective, more from the Amiga specific perspective of porting amigaOS to some relevant currently available hardware. i.e., not doing it in MiSTer to re-create old hardware, but using MiSTer as an interim stop gap platform to going fully ARM-Native.

Not exactly what this thread is about, and not MiSTer specific, more an Amiga being carried forward into the modern era. Hybrid-emulation, but used for a different purpose.

The "special" thing about ARM is that if AmigaOS was ported to it, it would run spectacularly well (vs. 68k emulation) on a Raspberry PI costing a hundred bucks or less.

This may be something the amiga die-hards may want to consider adding to AmiBerry or other Pi hosted Amiga emulators with a view to getting a new hardware platform for the amiga. Because like it or not, 68k is dead (i.e., the Vampire guys building a new faster 68k are wasting their time, imho). PPC (the existing de-facto platform for hardware Amiga accelerators) is dead. ARM is not going anywhere, is cheap and abundantly available.

But yeah thinking about it some more, probably AROS on ARM already covers this.
User avatar
Newsdee
Top Contributor
Posts: 873
Joined: Mon May 25, 2020 1:07 am
Has thanked: 104 times
Been thanked: 239 times

Re: Lets actually try Hybrid Emulation

Unread post by Newsdee »

throAU wrote: Tue Nov 23, 2021 9:48 am This may be something the amiga die-hards may want to consider adding to AmiBerry or other Pi hosted Amiga emulators with a view to getting a new hardware platform for the amiga. Because like it or not, 68k is dead (i.e., the Vampire guys building a new faster 68k are wasting their time, imho). PPC (the existing de-facto platform for hardware Amiga accelerators) is dead. ARM is not going anywhere, is cheap and abundantly available.
There's the philosophical question of "what is Amiga"... because you could just skin Linux to look like the Amiga workbench and add an application compatibility layer like Wine, and you'd be covered regarding modern hardware. :D Perhaps Amiga is supposed to be 68K based?

Anyway it looks like AROS has been ported to RPI? See their github (raspi-armhf):
https://github.com/aros-development-team/AROS
kolla
Posts: 191
Joined: Sat Jun 13, 2020 7:56 am
Has thanked: 17 times
Been thanked: 33 times

Re: Lets actually try Hybrid Emulation

Unread post by kolla »

you could just skin Linux to look like the Amiga workbench
I wish? People keep saying this, for decades, but where is this “skin”? Besides, look is irrelevant, what matters is functionality - how to operate screens, windows and menus, and only ancient AmiWM is anywhere near the genuine experience.
softtest9
Posts: 165
Joined: Thu May 28, 2020 7:13 pm
Has thanked: 3 times
Been thanked: 22 times

Re: Lets actually try Hybrid Emulation

Unread post by softtest9 »

The Raspberry Pi, like most ARM devices, has had an issue with proprietary/missing drivers for a very long time if I recall. Let's say you make the OS run, but then for the next decade or so, the graphics chip still isn't supported. So now you not only threw out compatibility with existing applications, but you also can't run anything modern on the new platform because you don't have a graphics driver.

The ARM ecosystem is rife with these gimmick devices that look great until you start looking into them. They may be cheap but you get what you pay for.
User avatar
ron
Posts: 160
Joined: Sun May 24, 2020 7:02 pm
Has thanked: 70 times
Been thanked: 62 times

Re: Lets actually try Hybrid Emulation

Unread post by ron »

This is a wonderful project, that runs like a charm on a Rpi with PiStorm, connected to a real A500
https://github.com/michalsc/Emu68

There are releases for PiStorm and Rpi standalone.
https://github.com/michalsc/Emu68/releases/tag/nightly

With that softcore, aims to be a baremetal emulator. I have been testing with mushashi and Qemu right here months ago and was a very nice experience. With this new possibility it is very possible that very interesting results will be obtained.

Cheers !
User avatar
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

Unread post by Caldor »

ron wrote: Tue Nov 30, 2021 10:32 am This is a wonderful project, that runs like a charm on a Rpi with PiStorm, connected to a real A500
https://github.com/michalsc/Emu68

There are releases for PiStorm and Rpi standalone.
https://github.com/michalsc/Emu68/releases/tag/nightly

With that softcore, aims to be a baremetal emulator. I have been testing with mushashi and Qemu right here months ago and was a very nice experience. With this new possibility it is very possible that very interesting results will be obtained.

Cheers !
Yeah, I do hope the focus will move to Emu68 here, as there should be a much higher performance gain from Emu68 than from the Mushashi. I even think Mushashi is emulating a full chipset in the way its used now.
User avatar
ron
Posts: 160
Joined: Sun May 24, 2020 7:02 pm
Has thanked: 70 times
Been thanked: 62 times

Re: Lets actually try Hybrid Emulation

Unread post by ron »

Using the git release you can get easily 225 Mips and the Rpi keeps cold.
When using the experimental highspeed you get 835 mips and seems to get some temperature, but nothing weird.
dec_alpha
Posts: 7
Joined: Wed Jan 06, 2021 3:17 pm
Has thanked: 3 times

Re: Lets actually try Hybrid Emulation

Unread post by dec_alpha »

I’m ready to support on Patreon, if someone is willing to continue work on this.

Just sayin’ :)

Amiiiiiigaaaaa!!
mahen
Posts: 185
Joined: Sun May 24, 2020 8:25 pm
Has thanked: 19 times
Been thanked: 6 times

Re: Lets actually try Hybrid Emulation

Unread post by mahen »

Yep, would love to fund someone to specifically work on the Amiga core (any kind of improvement although it's already very reliable & satisfying IMHO) :)
In addition to Sorge of course.
Fularu
Posts: 29
Joined: Sat Jun 13, 2020 3:25 am

Re: Lets actually try Hybrid Emulation

Unread post by Fularu »

mahen wrote: Mon Dec 27, 2021 11:23 am Yep, would love to fund someone to specifically work on the Amiga core (any kind of improvement although it's already very reliable & satisfying IMHO) :)
In addition to Sorge of course.
Afaik a good chunk of the Amiga core needs a rewrite (starting with Paula). It's still the old Minimig from 2005ish underneath it (improved obviously)
dec_alpha
Posts: 7
Joined: Wed Jan 06, 2021 3:17 pm
Has thanked: 3 times

Re: Lets actually try Hybrid Emulation

Unread post by dec_alpha »

Fularu wrote: Tue Dec 28, 2021 4:37 am
Afaik a good chunk of the Amiga core needs a rewrite (starting with Paula). It's still the old Minimig from 2005ish underneath it (improved obviously)
Really, I had no idea, what’s wrong with Paula?
I have thrown all kinds of things at this core and never noticed anything not working correctly, Workbench 3.2, Slam Tilt, several OCS games, and various OCS/AGA demos.
Not comparing side-by-side with real hardware, I know some things can become very apparent when doing a 1:1 comparison, so this is only my experiences from memory.

My main “issue” is I would love to have 68030 @ 50MHz or better CPU performance.

Even as-is I’m very happy with what I already have, but any kind of improvement is appreciated, for me this is a great way to preserve the Amiga Classic (m68k) in a compact, affordable and very capable box.
bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Lets actually try Hybrid Emulation

Unread post by bbond007 »

dec_alpha wrote: Tue Dec 28, 2021 11:21 am My main “issue” is I would love to have 68030 @ 50MHz or better CPU performance.

It already has performance at least on par with a 68030 @ 50MHz

Performance wise, there is not a huge difference between an 020 and 030 other than clock speed.
dec_alpha
Posts: 7
Joined: Wed Jan 06, 2021 3:17 pm
Has thanked: 3 times

Re: Lets actually try Hybrid Emulation

Unread post by dec_alpha »

bbond007 wrote: Tue Dec 28, 2021 3:49 pm
It already has performance at least on par with a 68030 @ 50MHz

Performance wise, there is not a huge difference between an 020 and 030 other than clock speed.
My memory isn’t the best, but watching TBL Tint, TBL GOA and other old AGA demos, I’m pretty sure they ran smoother on a 030@50, but I suppose that could also be related to the speed of the AGA implementation or a number of other things.
Workbench with RTG certainly runs quite fast, but that could be a benefit of the sum of much faster I/O, RAM and more.
I think I recall people saying that the 030 and 040 provides benefits other than just the clock, not as much love for the 060, but I guess it must have more instructions per clock or something, otherwise why would it perform tasks faster :P

Running demos accurately is definitely a edge case, but I can’t help myself, I love them.

I’m in deep waters here, I don’t know anything about how FPGA actually works, and have forgotten most of what I knew about Amigas, so just spitballing :lol:
Post Reply