
Euphrates: A Sega Game Console Emulator - tosh
https://github.com/mikebenfield/euphrates
======
geospeck
Can someone please post any good resource for beginners about writing
emulators.

I've read a blog post the other day that was recommending to start with CHIP8
as a good exercise for people that want to get into emulating.

~~~
ikornaselur
I got interested this summer and followed
[http://emulator101.com/](http://emulator101.com/) to write a Intel 8080
emulator + hardware emulation for Space Invaders. It was a lot of fun.

I was then able to use the knowledge gained from that to start on a NES
emulator, which I unfortunately haven't had time to continue on, but I'd
definitely recommend that website for the 8080 and Space Invaders.

He does it in C, but I found it easy to follow in a different language. I made
mine in Rust as an exercise to learn Rust as well.

------
thristian
> _euphrates_virtual_memory, a library implementing memory banking via native
> virtual memory_

Is this.. practical? As I understand it, modern general-purpose computers tend
to use 4KB pages (or larger!) for virtual memory, while game cartridges could
and did use whatever crazy memory maps they could wire up... at least on the
NES and SNES. Maybe Sega's 8-bit consoles were tamer?

~~~
fredoralive
Sega 8 bit "mappers" used 16KB slots, so you can use 4KB pages to emulate
them. The mapper is solely to bank switch memory and doesn't do any of the
support chip fun that more complex NES mappers do, so it's generally simpler.
Only thing to note is the first 1KB (ie the interrupt vector table) is fixed
on most mappers, which presumably would need a workaround.

Details:
[http://www.smspower.org/Development/Mappers](http://www.smspower.org/Development/Mappers)

------
zapita
How does Euphrates compare to MEKA? As far as I know it’s the state of the art
of Sega 8 bit emulation.
[http://www.smspower.org/meka/](http://www.smspower.org/meka/)

------
maeln
What I really hope for is a backend for the Motorola 68000. That way we would
be able to do homebrew in Rust for the megadrive/master system, various atari
and apple computer in rust :) . I saw some work on a llvm-m68k backend but it
was nowhere near ready.

~~~
zozbot123
The Sega Master System was purely Z80-based though. Anyway, a m68k backend is
in development, there are fairly recent news about this. It's not clear if it
will ever be included in the official LLVM release, though.

~~~
maeln
It use Z80 as a slave CPU but the main CPU is the m68k :) .

[https://en.wikipedia.org/wiki/Sega_Genesis#Technical_specifi...](https://en.wikipedia.org/wiki/Sega_Genesis#Technical_specifications)

~~~
maeln
I sorry, i see that I mistake the megadrive / genesis with the master system.

------
ngcc_hk
Mainly for AI? What?

~~~
sanxiyn
ALE(The Arcade Learning Environment), an Atari emulator for AI, is a good
example of this genre of softwares.
[https://arxiv.org/abs/1207.4708](https://arxiv.org/abs/1207.4708)

