Crazy Community Idea - Build Emulators in Unity!

In a lot of cases retro platform emulators have already been made, but could we build emulators in Unity?

Benefits, the potential to bring retro games to all platforms supported by Unity.

Or drop a mini arcade machine or retro computer into your game or VR world.

What do you think, could or should the Unity Community build emulators in Unity?

I’d be all for making an auto desk beast emulator and putting it in unity 5.

The horrible gi emulator we have currently isn’t doing it for me.

2 Likes
2 Likes

The thing is if we created a modular system, once you can emulate a specific chip e.g. Z80 or 6502 you can start to build Emulators for all of the computers that used that processor (see links).

And there are already open source emulators out there so it would just be a matter of porting to Unity and testing.

For me the ZX81, Acorn Electron and Amiga would be my ideal retro emulation platforms.

What retro computer/console would you like to be able to emulate in Unity?

I don’t really see any point in it, as emulators already exist. There would be no benefit to running one built in unity vs something else.

However… what would be much more interesting would be creating a converter. Something that you could pass in a rom image and it spits out a unity project. You could do mashups, hd versions and all kinds of fun things. Probably be a massive undertaking but interesting.

2 Likes

Then you have the potential to build a 3D retro computer model and have it working in a game or VR scene! Also retro games are tiny and if you simulate the loading time you could stream in the games.

You could also build a virtual games museum with all the retro classics or a time travelling games room with working retro computers/consoles.

that would be BADASS!! … but yeah huge undertaking

With something like the Gameboy with tiled graphics you could look in the emulator for when they try and draw a tile and replace it with a 3D model that is connected to a certain memory address(The start of the tile) because you have the background and sprites and stuff layering would be easy.

1 Like

Hmm, so basically to make your converter work. You would have to write an Emulator that reads assembly language for the retro CPU and Other Hardware and runs/writes Unity Code.

It’s doable but the first step is writing an Emulator to convert the assembly language to C#.

Also once you have a working Emulator as long as it is fast enough (we could run it in a separate thread) why spend the additional time generating C# code for each game.

Actually the generated C#/Unity project would probably be massive compared to the size of the Emulator, ROM and game data.

But I can already do that, with a game that I develop in Unity. The render to texture feature that was made standard in both the personal and professional editions of Unity 5.0 makes this a largely trivial task. I even just finished working on standardized 3D model of a CRT screen with adjusted UV mapping to simulate the curvature of a glass screen. All of what you’re describing I could easily achieve with Unity’s own tools, without having to muck around with programming emulators for older systems.

If I was looking to shoehorn older classic games into my game as some form of decoration, there would be value to what you’re describing. But if I wanted to make an original game-within-a-game, I would just make it with Unity’s native tools. That’s a lot easier for me, even if it would take up more memory than an older ROM.

@RichardKain You have a point, you can write your own games and sub games in Unity. But maybe you are missing the point…

Emulators are a fun technical problem, they also allow thousands and possibly millions of retro games to be brought onto our modern hardware. Bringing them to Unity would allow all those games and retro hardware to live on into the new VR age we could have a Unity VR museum of gaming.

Not all hardware will be emulatable, e.g. more modern retro hardware devices are probably too fast to emulate at playable frame rates in Unity, especially ones with dedicated graphics or sound hardware.

Playing some retro games might inspire game developers to do more with less or re-explore games themes and ideas that are novel and different from current trending themes and ideas.

Also who would not like to walk up to a ZX81, ZX Spectrum or Commodore 64 in VR and type:

10 PRINT "VR IN UNITY IS COOL"
20 GOTO 10
>RUN

And have it work!

Obsolete programming languages are generally not all that appealing to me. I avoided long-form procedural coding because of how long and bloated my source files would get. (and how difficult they became to read)

I get the appeal of doing coding of this sort. I understand the technical challenge inherent in doing work like this. I also know that such projects are not “for” me. I’m more of a high-level coder, and would not be capable of handling the low-level coding necessary for such an emulation project. With the C++ module support available in Unity, it should be entirely possible for lower-level technical coders to do what you’re describing. I just know that such a project would not interest me personally.

If you want to pursue such an effort, good luck. I will follow your efforts with interest. The real challenge with emulation projects isn’t more advanced hardware, but with more esoteric hardware. Constant expansion in the PC space insures that more and more power will always be available. Time takes care of that issue. Emulating much less standardized hardware is a considerably greater challenge. The Sega Saturn, for instance, is a system that is still not effectively emulated, despite numerous years of effort. It’s hardware architecture and coding practices were just so “out-there” that it presents a much greater technical challenge when it comes to emulation.

Still a WIP but it’s a Virtual CHIP 8 computer* running in Unity, note the batch of numbers in the top left that’s the code that made the maze on the screen.

Not all of the demo/game roms are running correctly yet but it’s a start.

*The CHIP 8 is not an actual hardware CPU it’s a virtual CPU designed to run within other hardware, but it has a very simple instruction set so it’s a start.

I’ve done a couple of chip8 emulators in Unity, lots of fun :smile: I’m working on a game(ish) thing that uses tiny basic on computers to do things(It’s not actually emulated though)

Cool you should have said!

If the community works together on bringing different retro chips to Unity we could build up a virtual museum for retro hardware, software and games.