Developing Core for Panasonic 3DO

Discussion of developmental aspects of the MiSTer Project.
Roman
Posts: 7
Joined: Mon Mar 20, 2023 1:17 pm
Been thanked: 20 times

Developing Core for Panasonic 3DO

Unread post by Roman »

Let me introduce myself a bit, I grown up as an embedded software engineer with some analog/digital circuits development in my background
A few years ago I was developing some sort of a home-brew "gaming console" (wouldn't call it like that though) using stm32 microcontrollers, so I managed to port a few games on my board, such as doom, quake I, II (buried now), duke nukem ... But my real goal was to port Killing Time from 3DO console, but unfortunately the only person who has sources (It's Rebecca Heinemann) has some licensing issues going on. Then I started looking at 3DO emulation instead, and since there are plenty of software emulators already, I came up with an idea to implement one on FPGA, and so here I am :D

I just started my way to this, literally I just ordered one of these Xilinx board (which is Kria K26, or something), and would really appreciate if anyone wants to join this journey, I have got a plan, I believe :D

PS: for anyone curious about games I listed in above running on stm32 board, please take a look :

https://www.youtube.com/channel/UCMXDf6 ... UGLl-1qQQw

So if anyone has any insights on this I would really appreciate it. I have not done this before, just did port some old games on my own home-brew console, so I'm new to this game console fpga core development at first glance the overall process looks like to me :

  1. Grab SoC board with CPU and FPGA available
  2. Get open source emulator, which is proven to be working
  3. Build it for the given board
  4. Replace sub systems with IP cores
  5. Repeat 4 until whole port is done
  6. TBD
FPGA64
Top Contributor
Posts: 937
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 374 times

Re: Developing Core for Panasonic 3DO

Unread post by FPGA64 »

Your proposal wont make a FPGA core. You seem to be porting an existing emulator. FPGA development is radically different. A 3DO is a very complex first project and I think you would be better off choosing an old 80's Arcade game to start on, if not just working on an exiting FPGA core and fixing some issues within it.

To give some example of scale Robert Peip, an experienced FPGA dev has taken 1 year to get the PSX FPGA core to its current state.

User avatar
Mr. Encyclopedia
Posts: 111
Joined: Thu Aug 05, 2021 1:52 am
Has thanked: 51 times
Been thanked: 47 times
Contact:

Re: Developing Core for Panasonic 3DO

Unread post by Mr. Encyclopedia »

I've seen quite a few developers, including Robert Peip, start the development process with a cycle-accurate software emulator that they use to build the FPGA core. I suspect Roman, given his experience with embedded hardware, gets that. The approach of porting an emulator to a SoC board and then altering the emulator to rely more and more on the FPGA reminds me of the fabled "Hybrid Emulation" that regularly comes up.

I hope this project works out for him, but a hybrid emulator built on anything other than the DE-10 Nano is unlikely to be viable for the MiSTer project. The various FPGA boards vary in hardware architecture, not to mention having to work around the ways MiSTer already utilizes both the CPU and FPGA.

Roman
Posts: 7
Joined: Mon Mar 20, 2023 1:17 pm
Been thanked: 20 times

Re: Developing Core for Panasonic 3DO

Unread post by Roman »

Thank you for replying to this, I see that Mister project is based on DE-10 Nano, I've been stick to use Xilinx boards, as for my regular job, so I think this could be an option. I really appreciate that someone has interest in that, so that motivates me !
My Xilinx SoC board is on its way, and I started trying this emulator as a base for my project (could build it so far):
https://github.com/gameblabla/3doh_gcw0

I could compile it, and in coming day would try to get in touch with the author (even it is a for of a "freedo" project though, they may have some experience with reversing hardware)
I would also contact back Rebecca Heinemann, as she was close to this console

Will keep you posted !

User avatar
Chilli_Vibes
Posts: 129
Joined: Sat Mar 12, 2022 4:47 pm
Has thanked: 53 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by Chilli_Vibes »

Good luck.
My own 3DO will never be sold, I have had it since the late 90s when they were all sold off really cheap. I have the Panasonic Real FZ-1, and I just love it's 90s aesthetics.

User avatar
vgesoterica
Posts: 61
Joined: Wed May 05, 2021 1:44 pm
Has thanked: 1 time
Been thanked: 38 times

Re: Developing Core for Panasonic 3DO

Unread post by vgesoterica »

Come to the 3DO discord. We have more documents and help than you could ever need!

https://discord.gg/f8ggdSC3Qs

User avatar
trapexit
Posts: 1
Joined: Tue Mar 21, 2023 11:11 am

Re: Developing Core for Panasonic 3DO

Unread post by trapexit »

Roman wrote: Mon Mar 20, 2023 9:02 pm

Thank you for replying to this, I see that Mister project is based on DE-10 Nano, I've been stick to use Xilinx boards, as for my regular job, so I think this could be an option. I really appreciate that someone has interest in that, so that motivates me !
My Xilinx SoC board is on its way, and I started trying this emulator as a base for my project (could build it so far):
https://github.com/gameblabla/3doh_gcw0

I could compile it, and in coming day would try to get in touch with the author (even it is a for of a "freedo" project though, they may have some experience with reversing hardware)
I would also contact back Rebecca Heinemann, as she was close to this console

Will keep you posted !

Yeah, definitely come over to the Discord. We have myself (maintainer of Opera emulator and run 3dodev.com), Fixel (author of Freedo and the recent ODE), as well as a few original 3DO developers and current homebrew authors.

jordi
Posts: 282
Joined: Thu Jun 11, 2020 10:11 am
Has thanked: 112 times
Been thanked: 87 times

Re: Developing Core for Panasonic 3DO

Unread post by jordi »

Wow !
one of the exciting but not successful consoles

It has these unique ports like NFS, Wolfstein, Road Rash, Another world.

bbond007
Top Contributor
Posts: 531
Joined: Tue May 26, 2020 5:06 am
Has thanked: 87 times
Been thanked: 211 times

Re: Developing Core for Panasonic 3DO

Unread post by bbond007 »

jordi wrote: Tue Mar 21, 2023 12:53 pm

It has these unique ports like NFS, Wolfstein, Road Rash, Another world.

And the exclusive Way of the Warrior! --> https://youtu.be/-_Ya4mSkDMI

User avatar
Bunker
Posts: 84
Joined: Sun Jan 02, 2022 10:29 am
Has thanked: 46 times
Been thanked: 10 times

Re: Developing Core for Panasonic 3DO

Unread post by Bunker »

Would love this on the misterFPGA ! :D

pbsk8
Posts: 289
Joined: Mon Dec 28, 2020 4:23 pm
Has thanked: 75 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by pbsk8 »

isn't FPGAzumSpass working on 3do core already?

PixelCherryNinja
Posts: 6
Joined: Wed Oct 12, 2022 6:52 am
Has thanked: 6 times
Been thanked: 6 times

Re: Developing Core for Panasonic 3DO

Unread post by PixelCherryNinja »

Great News. I hope this becomes something really good. All the best.

FPGAzumSpass
Core Developer
Posts: 385
Joined: Sat May 23, 2020 12:55 pm
Has thanked: 42 times
Been thanked: 414 times

Re: Developing Core for Panasonic 3DO

Unread post by FPGAzumSpass »

3DO is often requested, so there is a large crowd of people who would appreciate that.

Some hints from my side, as someone who also writes a software emulator every time before the FPGA core:

Grab SoC board with CPU and FPGA available
Get open source emulator, which is proven to be working
Build it for the given board
Replace sub systems with IP cores
Repeat 4 until whole port is done

This is likely not going to work. The subsystems typically communicate much faster(latency) with each other than the CPU of the SoC FPGA could communicate with the FPGA fabric
You could maybe get something working, but it will be very inaccurate and leads to plenty of debugging.
I don't think it's a approach that is saving time in the end.

What i do instead:

  • i write the software emulator in a way that already every component is triggered every clock cycle, not some event based system that most emulators use
    This way it's much easier to compare between FPGA and emulator

  • add bus level exports for every major component in the emulator
    So e.g. to build a GPU, i capture all commands send from CPU to GPU to a file and simulate that for the FPGA without the rest of the system. Output of the simulated FPGA GPU and emulated software GPU are written to a file and must be 100% same in diff tool. Same for all other major components

Roman
Posts: 7
Joined: Mon Mar 20, 2023 1:17 pm
Been thanked: 20 times

Re: Developing Core for Panasonic 3DO

Unread post by Roman »

Good one folks !
I've made so progress so far and here to share that with you
Note: haven't visited discord community so far, but going to
So:

  1. Bring up of Xilinx Kria260 board is done, running basic linux stuff with monitor via hdmi
  2. Build freedo emulator for it (with having SDL 1.2 library compiled), no sound and no joystick so far
  3. Created shared memory (since that FPGA doesn't have required 3 mbytes dedicated memory) - so it will be used as shared ram + vram during early steps (Really slow one !, need to think about improving it with cache or so)
  4. Put some madam stuff such as registers and variables to fpga
  5. On early stage will be doing pure copy of freedo in HDL, since this is the only source I have, so event driven model. Haven't found any reliable description of MADAM hw so I can implement cycle accurate hdl

Next steps :

  1. Implementing MADAM in HDL, step by step replacing SW modules with HDL ones
  2. TBD

Thanks to everyone !
Will be posting further updates as soon as I have something !
Replying to @FPGAzumSpass - yes, you have your point here, but I needed something to start with without having any hardware..

Roman
Posts: 7
Joined: Mon Mar 20, 2023 1:17 pm
Been thanked: 20 times

Re: Developing Core for Panasonic 3DO

Unread post by Roman »

vgesoterica wrote: Tue Mar 21, 2023 2:19 am

Come to the 3DO discord. We have more documents and help than you could ever need!

https://discord.gg/f8ggdSC3Qs

Thank you so much, just created an account, will take a look my tomorrow time!

Roman
Posts: 7
Joined: Mon Mar 20, 2023 1:17 pm
Been thanked: 20 times

Re: Developing Core for Panasonic 3DO

Unread post by Roman »

FPGAzumSpass wrote: Tue Mar 21, 2023 4:22 pm

3DO is often requested, so there is a large crowd of people who would appreciate that.

Some hints from my side, as someone who also writes a software emulator every time before the FPGA core:

Grab SoC board with CPU and FPGA available
Get open source emulator, which is proven to be working
Build it for the given board
Replace sub systems with IP cores
Repeat 4 until whole port is done

This is likely not going to work. The subsystems typically communicate much faster(latency) with each other than the CPU of the SoC FPGA could communicate with the FPGA fabric
You could maybe get something working, but it will be very inaccurate and leads to plenty of debugging.
I don't think it's a approach that is saving time in the end.

What i do instead:

  • i write the software emulator in a way that already every component is triggered every clock cycle, not some event based system that most emulators use
    This way it's much easier to compare between FPGA and emulator

  • add bus level exports for every major component in the emulator
    So e.g. to build a GPU, i capture all commands send from CPU to GPU to a file and simulate that for the FPGA without the rest of the system. Output of the simulated FPGA GPU and emulated software GPU are written to a file and must be 100% same in diff tool. Same for all other major components

That makes sense for sure, but SW emulator is to be rewritten in that case, which I think I can't afford in the nearest future, in terms of time
Thanks a lot !

Goran
Posts: 28
Joined: Tue Oct 22, 2024 7:23 am

Re: Developing Core for Panasonic 3DO

Unread post by Goran »

Is there a 3DO Core that works?

FPGA64
Top Contributor
Posts: 937
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 374 times

Re: Developing Core for Panasonic 3DO

Unread post by FPGA64 »

Goran wrote: Tue Oct 29, 2024 3:10 pm

Is there a 3DO Core that works?

No

niallquinn
Posts: 136
Joined: Wed Jun 05, 2024 4:54 pm
Has thanked: 139 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by niallquinn »

Electron Ash did a 3d0 core, see his git for it. Not been updated for 2 years though.

User avatar
remax
Posts: 32
Joined: Sun Nov 21, 2021 8:24 pm
Has thanked: 12 times
Been thanked: 13 times

Re: Developing Core for Panasonic 3DO

Unread post by remax »

There are WIP builds in the discord

FPGA64
Top Contributor
Posts: 937
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 374 times

Re: Developing Core for Panasonic 3DO

Unread post by FPGA64 »

remax wrote: Tue Oct 29, 2024 7:07 pm

There are WIP builds in the discord

No there are not. There are no work in progress 3DO builds on the Discord. CDI has WIP not 3DO

niallquinn
Posts: 136
Joined: Wed Jun 05, 2024 4:54 pm
Has thanked: 139 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by niallquinn »

Correct, as are the Dreamcast core, plenty of pics and a video, takes 12 seconds to render 1 frame, so it's a tad on the slow side!

THat said, I believe he creates it all in C++, then converts it into verilog. I don't know if that improves things or not, I'm not a dev, just an observer.

3d0 pic attached.

He's also posted all his Dreamcast work on discord, pics, and a video.

Attachments
3d0.png
3d0.png (861.98 KiB) Viewed 1623 times
niallquinn
Posts: 136
Joined: Wed Jun 05, 2024 4:54 pm
Has thanked: 139 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by niallquinn »

But as the ST and Amiga cores are still worked on, and aren't perfect after 10 years of hard work, it's going to be a while before anything like this gets to a usable state I would think.

niallquinn
Posts: 136
Joined: Wed Jun 05, 2024 4:54 pm
Has thanked: 139 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by niallquinn »

Sorry just to clear it up, there's no test builds available in the discord, unless there's some hidden channel, but here's the Dreamcast core video.

https://drive.google.com/file/d/1GUWKqg ... cjoJp/view

It'll give you an idea of what he and the other devs involved are up against. DE10 probably not I would think, DE25 if the Mister project goes down that route, it would be more likely. That's just a comment, not a fact before everyone jumps down my throat. :)

Thanks!

FPGA64
Top Contributor
Posts: 937
Joined: Mon Mar 01, 2021 3:10 pm
Has thanked: 49 times
Been thanked: 374 times

Re: Developing Core for Panasonic 3DO

Unread post by FPGA64 »

His Dreamcast core was an attempt to understand how the rendering works in the Dreamcast. His 3DO core is run in simulation, not on a DE10. Its highyl misleading to list these as cores.

they are initial inverstigations. Important work but not a core

User avatar
remax
Posts: 32
Joined: Sun Nov 21, 2021 8:24 pm
Has thanked: 12 times
Been thanked: 13 times

Re: Developing Core for Panasonic 3DO

Unread post by remax »

FPGA64 wrote: Tue Oct 29, 2024 7:45 pm

No there are not. There are no work in progress 3DO builds on the Discord. CDI has WIP not 3DO

Whoops, yeah... I read the whole topic with CDi replacing 3DO in my mind. :lol:

niallquinn
Posts: 136
Joined: Wed Jun 05, 2024 4:54 pm
Has thanked: 139 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by niallquinn »

FPGA64 wrote: Tue Oct 29, 2024 8:11 pm

His Dreamcast core was an attempt to understand how the rendering works in the Dreamcast. His 3DO core is run in simulation, not on a DE10. Its highyl misleading to list these as cores.

they are initial inverstigations. Important work but not a core

Written in c++, porting to verilog, so a potential core lets say.

dmckean
Posts: 310
Joined: Sat Jan 16, 2021 7:03 am
Has thanked: 396 times
Been thanked: 95 times

Re: Developing Core for Panasonic 3DO

Unread post by dmckean »

Remember that the 3DO is a 5th generation console like the PlayStation, Saturn and the N64 and would take a similar amount of effort to implement. All the work on the "core" at this point is the exploratory work to figure out a feasible architecture for the DE-10 nano. No actual implementation has been started.

grizzly
Top Contributor
Posts: 381
Joined: Tue Jun 16, 2020 12:22 pm
Has thanked: 58 times
Been thanked: 77 times

Re: Developing Core for Panasonic 3DO

Unread post by grizzly »

remax wrote: Wed Oct 30, 2024 8:29 am

Whoops, yeah... I read the whole topic with CDi replacing 3DO in my mind. :lol:

Easy to do since both has one big drawback together!
Which is when sold new, they where pretty much unobtainium for normal people :mrgreen:

niallquinn
Posts: 136
Joined: Wed Jun 05, 2024 4:54 pm
Has thanked: 139 times
Been thanked: 33 times

Re: Developing Core for Panasonic 3DO

Unread post by niallquinn »

One for DE25 Mister2 methinks...........if that's the route we go down, I assume it will for compatibility.

Post Reply