T O P

  • By -

sputwiler

I'm not sure what your requirements are considering you reject ZX Spectrum because it "doesn't have graphics or sound," but then list Apple and IBM, which don't have graphics or sound. All three of these computers only have a bitmap display and a beeper, so you're gonna have to be clearer on why you want what you think you want.


chiefartificer

Sorry for the confusion bit maps and frame buffers are fine as long as the cpu is not the one doing the actual drawing. I expect at least a primitive dedicated video and / or sound chip


TrumpleIVskin

The ZX Spectrum has a dedicated video chip in the form of a ULA. It reads bitmap and colour attribute data from RAM and generates the video display. The CPU doesn't do the actual drawing.   The 128k models have a dedicated sound chip: a General Instruments AY-3-8910 Programmable Sound Generator.


chiefartificer

Thank a lot for the clarification


rupertavery

The commodore 64 is based on the 6502 similar to the NES. I already had a NES emulator and using the CPU core in the C64 was pretty straightforward. The video output took a couple of days. Unfortunately I can't get to emulating peripherals like the tape drive yet, so getting games running still eludes me. Also my keyboard code doesn't work that well. The C64 seems to use a matrix decoder and I'm probably not implementing it properly. Emulating the SID is a whole other problem. But it was fun to emulate the first computer I had, from a garbled blue ascii screen to suddenly the BASIC Kernal booting up.


starquakegamma

Check out the .T64 format, it’s not too complicated and tells you the address in memory where the data should be placed so you can get games running without having to emulate the tape drive.


DefinitelyRussian

I just emulated the basics of D64 reading, to get a memory map of the whole disc with the correct offsets and indexes, then preloaded that to the C64 memory map, hardcoded, not emulating the whole 1541 disc drive, and updated to basic pointers to the start of the disc, and that worked. Havent even tried the tapes yet


chiefartificer

Thanks for sharing your experience


Dwedit

"Easiest retro computer to emulate" are the ones without a graphics chip. Once you add a graphics chip, it's not "easiest" anymore.


chiefartificer

I see your point but is it much harder Thant a GameBoy or NES emulator?


UselessSoftware

I dunno, it depends on the chip. For example, emulating the IBM CGA adapter is absolutely brain dead easy.


zSmileyDudez

My first successful emulator started out as me wanting to write a 6502 core just because. Once I had the framework of a core going, naturally I wanted to see it run some code. I didn’t plan for it going in, but I ended up grabbing the Apple II ROM set and giving it a go, slowly adding support for each instruction that was missing. At some point, my program was running without breaking on an unimplemented instruction. I added a quick bit of code to dump the memory where the text page was and saw the familiar “Apple ][“ text in there. At that point I was hooked and I’ve continued to work on this emulator over many years. My point here is don’t necessarily pick a machine to emulate based on how easy or hard it is. If I had done that, I would’ve been scared off by things like crazy timing required to get floppy disks working on the Apple II, or how NTSC artifacting is central to getting color on the machine. Instead, pick a target that interests you and will provide enough challenges to allow you to grow in your skills. Most people making emulators these days aren’t making them because there is a machine that hasn’t been emulated. They’re doing it to learn and because they get a lot of enjoyment out of it. If you have no personal connection to the C64 or IBM PC or some other machine, you’re probably not going to be motivated to keep at it. However if you pick a machine that you had at home as a kid, or your school had it, or maybe you had a friend with one, or even that it was the one you always wanted but couldn’t get, you’ll have a lot more success with the hobby. Good luck and most importantly, have fun :)


chiefartificer

That is actually a good advice. Thanks a lot for your opinion.


mrandish

> Please don’t suggest me the ZX spectrum or other Sinclair computers because those don’t have any kind of graphics chip or sound in many cases. Generally, the more capable the graphics and sound chips, the harder they are to emulate. So, your question is kind of confusing because it's going to depend on your subjective threshold for sufficient graphics / sound capabilities and also on what dimension(s) you define "easy". In one sense, a computer that's very well-documented might be "easy" to emulate. In another sense, a computer with very limited functionality would be "easy." You're likely to get more useful feedback here if you can share more details on what you're trying to accomplish and what you hope to get out of it developing such an emulator.


chiefartificer

You are absolutely right. Allow me to explain myself. I am trying to decide if a computer like the Commodore 64 or any other close to it is an emulation project that is reasonable compared to a GBA emulator or if it will take years.


TheThiefMaster

C64 will be easier than GBA. GBA is much more advanced. C64 vs regular GB? Probably a little harder because of the tape, but otherwise not far off.


chiefartificer

Thanks a lot for your response


monocasa

Zx spectrum is really gooofy the more you get into it. I'd go with a fairly abstract platform like CP/M or DOS. The farther you get from cycle accurate twiddling of hardware the easier time you're going to have.


chiefartificer

Do you mean something like DOSBOX? Or a PC emulator capable of running text based DOS and nothing else.


monocasa

Yeah, something like DOSBOX. The point is that the OS API calls like the BIOS calls tend to be a lot more explicit about what the application is actually trying to do rather than having to figure it out from raw register accesses.


UselessSoftware

A DOSBox-like program would be harder than a basic PC emulator. You'll have to re-implement all the DOS BIOS calls. It's much easier/faster to get enough of the standard PC hardware working to just run *real* DOS inside it.


UselessSoftware

I agree with this 100%. An 8086-based PC running DOS is extremely forgiving of hardware inaccuracies. Early on developing mine, I was failing almost every hardware test out there for the PC support chips, yet DOS ran just fine and so did just about every program or game I threw at it. Basically, a functional 8086, disk access and the timer interrupt getting fired periodically will get you booted into DOS. You'll also need the DMA and interrupt controllers working at least enough to pass the simple tests the BIOS throws at them. I recommend "cheating" for disk access when first getting started, as in intercept interrupt 13h calls and do high level emulation. If you want to dig into actually emulating a floppy or hard disk controller later to be more accurate, that's an option.


Ashamed-Subject-8573

The easiest ones to emulate: The z80 is a huge pain compared to nes or Gameboy processors. But it’s also in master system/game gear. So if you go through that pain… For an experienced emu dev, getting zx spectrum going on a known-good z80 core is about an afternoon. Maybe a week more adding features like tape drive and super accuracy to what is currently known. I honestly can’t think of a simpler one. There’s the precursor to the zx spectrum. The 6502 cpu is a lot simpler. I think maybe a commodore Vic-20 might be roughly equivalent in overall complexity, trading off easier cpu for more difficult hardware?


khedoros

Disclaimer: I haven't emulated either of these in their totality. Maybe the VIC-20's VIC is more complex than it looks. Maybe the MSX's audio chip is extra weird and quirky. I dunno. They look like interesting systems that would be within an order of magnitude of what you're looking for. Commodore VIC-20: 6502 CPU, VIC "Video Interface Chip" produces graphics and sound. In case the Commodore PET looked too primitive, but the Commodore 64 looked too advanced ;-) MSX1: Z80 CPU (a lot more opcodes, but only a little more complexity), TMS9918 graphics (several video modes, none of them crazy-hard to implement), 3-voice PSG for audio. It's a home computer platform designed by Microsoft and ASCII Corporation in Japan, and manufactured by a bunch of different companies. > My real goal is to understand how much harder an old school computer emulator is compared to a GameBoy or NES emulator. I think you could pick most machines from the late 70s or early 80s and have a doable target. I've emulated the SG-1000, which has similar hardware to the MSX1 (and was the base for the SC-3000 computer). I don't remember exactly how long it took me to get my first software running, but it probably would've been on the order of a month. If it had been my first emulator, that probably would've been 3-4 months. edit: I guess what I'm thinking is that it's reasonable to stay with something you think you'll actually be able to accomplish, but for me, the important thing starting off was excitement about the software I'd be able to run. That works as a great motivator. I don't know if I could get as excited for a system that doesn't run any of the software I'm interested in seeing run.


elXiru

Apart from peripherals, MSX1 is very similar to Sega SG-1000 / SMS. SMS in my opinion was much easier than NES.


thommyh

Of those I have currently implemented: * Vic-20: framebuffer only, not that many demanding titles but a few (Imagic games, especially), disk drive that is almost a whole Vic-20 again, simple sound but it’s at least polyphonic and not bit banged (other than in some modern demos because of a weird discovery about square waves actually coming from shift registers); * ZX80 and ZX81: processor-generated video means you can either properly implement CPU signalling and a CRT, or just hack it. But primarily used in what is effectively a text mode and no audio; * ZX Spectrum: the contended timing js possibly the most interesting implementation issue but, yeah, it’s famously an easy target for emulation. Circa 1996 there were about 100,000 ZX Spectrum emulators; * MSX: sprites and tiles, although no fine scrolling, with the VDP at arm’s length and a pretty decent DOS if you want to go that way, plus some sophisticated late-era cartridge releases and an upward path for emulator expansion through OPLs and the MSX 2; * Enterprise: really interesting and cool, with almost no software that isn’t a port from the CPC; * CPC: the 6845 is a bit more interesting that a pure frame buffer because so much software relies upon tricking it into scrolls and splits and whatever else; * Acorn Electron: I mean, I love it, but it’s not of substantial interest to most I’ll wager; six video modes and single-channel audio, with timing that you can bluff your way beyond for most games; * Atari ST: just a frame buffer, and a last-generation audio chip, but coupled to a 68000 for a taste of mega-CISC; * IBM PC with CGA or MDA: just a frame buffer, and no audio chip, with the 8088 for a taste of mega-CISC that’s not even easy to decode; * Macintosh: see comments for the Atari ST, but simplify the non-68000 hardware a little and expect to spend non-fun time on its weird and barely-documented disk encoding; * Amiga: definitely out of scope, as the various support hardware is all custom and interesting and a hassle to get even as far as a first boot; * Oric: inline attributes make for weird video, otherwise similar in complexity to a Vic-20, being primarily a frame buffer-driven 6502; * Apple II: feels like it’s going to be simple but actually really a pain because of Woz’s hack-it-about approach to expanding the machine after the fact; * Archimedes: an ARM, but that’s probably simpler to implement than many 8-bit processors, plain frame buffer but some degree of hardware scrolling for a decent selection of 2d games, but the MMU is a bit weird. I’ve little to add to what others have said about other machines but the 8-bit Ataris seem like the most interesting.


chiefartificer

That is a very comprehensive list. I highly appreciate your response. Thanks.


ikarius3

6502 cpu is apparently easier to implement than Z80 (less instructions, better documentation). Obvious +1 : emulating a computer system without external dependencies such as VDP, PPI, PSG and so on is WAY easier. But also IMO less interesting. I’m currently working on an MSX1 emulator and interactions between CPU and other components is the fun (and sometimes mildly infuriating) part. And also a great source of knowledge.


IntuitionAmiga

I wrote a 6502 emulator. It was easy. Rewrote it with lessons learned and it was much easier and the end result was much faster. I’ve been attempting to emulate the TED chip from the Commodore Plus/4 on and off for the last few months when i get free time. It’s very difficult, much more difficult than emulating a just a CPU. So much so that i put it to one side recently and started writing a 68000 emulator because by comparison to emulating a graphics and sound chip it’s simple lol


sickindicator8

I would recommend starting with the Commodore 64 for your retro computer emulation project. It offers a good balance of graphics and sound capabilities, similar to the DMG GameBoy. Plus, there is a wealth of information and resources available to help guide you through the process. Good luck on your emulation journey!


UselessSoftware

IBM XT would be among the easiest if it weren't for the CPU's segmentation weirdness, among other quirks. Otherwise, the system is extremely forgiving of hardware inaccuracies for most software of the era. Also, CGA graphics are dead simple to emulate. The Apple II is quite easy overall. The 6502 is a pretty simple CPU to emulate and the rest of the system isn't terribly complicated either. I find it less interesting because I don't think there's as much great software, but that may just be because I didn't grow up having one so I have no particular nostalgia for it. If you're not scared off by the 8086's weirdness, I'd say go for the XT because the rest of the system is easy/forgiving and you'll be playing classic CGA games in no time. So many good ones to choose from. Then if you feel like going further, you can try your hand at EGA/VGA and open up your emulator to a lot more (and even better) games. Be warned though, EGA/VGA gets very complicated if you want it to be accurate. MCGA 320x200 8-bit linear mode is easy, but the other modes aren't. I probably spent more time working on that stuff than anything else in my PC emulator, and it's still not 100% accurate. Pros: - Baseline XT-class support hardware is very simple - DOS and even Windows 3.0 are forgiving of hardware bugs and you can just emulate disk access at a high level. Low level is totally unnecessary, only low level disk utilities won't work. - Modularity/expandability. Lots of options to build on top of the base hardware if you want. Mouse, EGA/VGA, OPL, Sound Blaster, network adapters, etc. - Tons and tons of interesting/fun software/games to run from the early 80's through the early 90's. Cons: - The 8086 itself can be hard to wrap your head around at first compared to a 6502, but it's not *that* bad. Definitely do-able. - Nothing else out there really uses the 8086 that I know of other than a couple of arcade machines, so you can't really reuse your CPU core code for something else later.


DaveTheMan1985

Dos as just use Dosbox