1. Emulators in Euphoria
- Posted by Icy_Viking May 09, 2023
- 811 views
Hello all,
Recently I've been thinking of writing my own game console emulator. My first steps are to either write a CHIP-8 Emulator or something along the lines of Gameboy or NES emulator. Would Euphoria be capable of emulating more powerful systems, say above the 16-bit era? Just some thoughts for later on.
2. Re: Emulators in Euphoria
- Posted by ghaberek (admin) May 10, 2023
- 797 views
Recently I've been thinking of writing my own game console emulator. My first steps are to either write a CHIP-8 Emulator or something along the lines of Gameboy or NES emulator.
There are a handful of emulators in The Archive you may want to check out, including CHIP-8 and NES.
Would Euphoria be capable of emulating more powerful systems, say above the 16-bit era? Just some thoughts for later on.
Once you get into 32-bit systems you really have to treat them less like discrete "machines" and more like full-on computers, and the complexity goes up exponentially.
The original PlayStation had its own BIOS so you have to go through all the work of emulating the hardware and bootstrapping the BIOS before you even get to loading ROMs.
Later system emulators are written in C/C++, Assembly, threading, and possibly even hardware virtualization if possible, since modern consoles are basically x86 PCs.
Could you use Euphoria? Maybe, but we currently can't offer the kind of performance you need for scaling past very early 16/32-bit consoles.
My advice: start small and build things in reusable pieces whenever possible. Just writing a working fetch-decode-execute cycle for a CPU is a huge step.
-Greg
3. Re: Emulators in Euphoria
- Posted by Icy_Viking May 21, 2023
- 685 views
Recently I've been thinking of writing my own game console emulator. My first steps are to either write a CHIP-8 Emulator or something along the lines of Gameboy or NES emulator.
There are a handful of emulators in The Archive you may want to check out, including CHIP-8 and NES.
Would Euphoria be capable of emulating more powerful systems, say above the 16-bit era? Just some thoughts for later on.
Once you get into 32-bit systems you really have to treat them less like discrete "machines" and more like full-on computers, and the complexity goes up exponentially.
The original PlayStation had its own BIOS so you have to go through all the work of emulating the hardware and bootstrapping the BIOS before you even get to loading ROMs.
Later system emulators are written in C/C++, Assembly, threading, and possibly even hardware virtualization if possible, since modern consoles are basically x86 PCs.
Could you use Euphoria? Maybe, but we currently can't offer the kind of performance you need for scaling past very early 16/32-bit consoles.
My advice: start small and build things in reusable pieces whenever possible. Just writing a working fetch-decode-execute cycle for a CPU is a huge step.
-Greg
Thanks for the tips Greg. My plans would be to start small like a 8-bit CPU like CHIP-8 or NES or possibly Gameboy.