Hacker News new | comments | ask | show | jobs | submit login
Euphrates: A Sega Game Console Emulator (github.com)
58 points by tosh 13 days ago | hide | past | web | favorite | 14 comments

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.

I got interested this summer and followed 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.

There was a good discussion here not that long ago: https://news.ycombinator.com/item?id=17134668

> 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?

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

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/

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.

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.

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


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

Mainly for AI? What?

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

I would presume for training or evaluating game playing AI systems

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact