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...
Try compukit.org[^] Images for the BASIC rom (4 separate ROM chips, 8Kb in total). Other info on those pages should help you with keyboard interrupts and screen output etc.
I built a UK101 in October '79. The base spec was 4Kb RAM, 1Mhz, 64x16 display. Some investigation of the circuits, a little judicious use of a sharp knife and a few extra wires, and I double the RAM, doubled the clock speed, doubled screen RAM and changed display circuitry to give 64x32 display, quadrupled the cassette tape baud rate, and added a 4-channel sound generator. Not too bad for my first electronics project!
That there's these moments where I switch from me to "idiot". And that it happens in seconds. Given my recent behaviour I can't dismiss that, but been told I always was like that. (With "always" being >15 years, more than CP membership).
Is that true?
Be honest, instead of friendly. Got enough people being friendly and supportive; I need some blunt answers. Someone who doesn't care if possible.
I'm a bloody loudmouth on this site; it may reflect on CodeProject. If I reflect badly on the site, then I should react a lot less. CodeProject has helped me forward, and I don't want to damage it.
I don't think I'm "crazy". I feel the same as I always did. I like to think I react on CP as I always did. There's a question, and you give a rational answer, with some arguments to back that up.
Whatever your reaction, I won't hold it against you (this thread only). If there is a problem, I need to confront it. So, react, honestly and without reserves. If you pissed at me, you're excused, if you explain what and why. I won't be angry at any response.
Tell me honestly; is my perception that way off from reality? How much damage have I done?
Honestly, and don't hold back. Feel free to spout. I'll vote you up for it.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.