The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
I was thinking of writing a 6502 processor emulator in C#, but the trouble is that every ROM I could get to test it with it is protected meaning I can't just download it from somewhere, at least not legally. I need an old Apple ][ or Commodore 64 ROM. Even an old NES game or two would work. Without that, all I've got are homebrew ROMs and I don't know that I can rely on them for my testing.
Why is this stuff still protected? Nobody cares about Commodore 64s or Apple ][s anymore. I can kind of see the NES restrictions because they still have some value, but really, the market for the ROMs of the former computers is slim to none.
This reminds of something that happened in the late 1980s. Where I went to college there was a very old mainframe. Several years after graduation some friends decided to write an emulator for it in C, of course. Eventually they got it to work and were able to load and run old programs for it. The amusing part is they ran some performance tests and they found their emulator on an IBM PC-AT with an 80826 ran faster than the actual mainframe did. That PC ran at 5MHz I think. I think the mainframe was a Control Data but I am not sure.
With the speed of today's hardware, your emulator is likely to be faster than those old 6502-based systems.
"They have a consciousness, they have a life, they have a soul! Damn you! Let the rabbits wear glasses! Save our brothers! Can I get an amen?"
A word to the wise: I don't know how you want to go about your project but emulating any of those old processors is a fairly trivial matter. The surrounding hardware is a completely different ball game. In many cases it doesn't even make sense to emulate the video or audio circuitry because you are targeting different devices.
What you can probably do is to take the ROM entry points and treat them as black boxes and reimplement them to fit your system. For C64, I've seen a list of Commodore 64 standard KERNAL functions[^] that can serve as a starting point. There seems to be also a listing of the C64 Kernal that can serve as an inspiration for your implementations.
From a legal point of view, you would be implementing an API. I know that Oracle takes the view that this is an IP infringement but there are many lawyers who disagree with them. At any rate, you are probably a fish too small to fry for any of these big companies (no disrespect intended ).
Don't tell the copyright trolls but I've built an NES emulator in C# before. I understand what you mean by the surrounding hardware. The only tricks with implementing the 6502 is to do cycle counting, handle undocumented opcodes, and duplicate bugs in the original chip, since code expects it.
I care about the C64... I care...
I was legitimately excited to get (my first) C64, with a good size game collection, and working 1541 disk drive this last Christmas. Now I have a computer several years older than myself (though I don't know who's feeling the age more. We could both use some lubed joints.)
On a serious note, I am surprised those ROMs are still protected. I guess, with the community that revolves around both, I expected little barriers to doing whatever with the hardware/software.
RetroGames has been selling a C64 Mini for the last couple of years (modeled after the NES-Mini and SNES-Mini--Nintendo really started something)...and I guess it's been successful enough they started making a full-sized version late last year. I don't believe they own the Commodore trademark, so they've been very carefully avoiding branding it as such. I have no idea what sort of agreement they might have (or not) with whoever owns the name these days (it's been passed around quite a bit), but one thing's for sure, it's not abandoned technology and people are still making money off of it.
That's why some of these things are still protected IP. As long as there's a buck to be made...