4 ms·
Fun project. You might want to build an emulator for a real 16-bit CPU like a 6502. That would allow you to run real, existing software on it. That way you don’
by drob518 1y ago
Fun project. You might want to build an emulator for a real 16-bit CPU like a 6502. That would allow you to run real, existing software on it. That way you don’t have to write your own code.
- AlexeyBrin 1y ago6502 is an 8-bit CPU. Writing an emulator for it would be cool though.
- vardump 1y agoIt's interesting how arbitrarily CPU bitness is defined. Sometimes it's the register size, sometimes data bus width and sometimes the address width. 6502 has 8 bit registers, 8 bits wide data bus, and 16 bit addresses. Only PC register is 16-bit, but 6502 does have a zero page indirect 16-bit addressing mode.
- wang_li 1y agoSometimes by register size, sometimes by ALU size, sometimes by data bus width. But I've never heard of a CPU bitness defined by address bus size.
- deleted 1y ago[deleted]
- drob518 1y agoYea, I was thinking about the address width, but I guess it’s really an 8-bit accumulator width. LOL, and I used to hack 6502 assembly language when I was a kid. As I get older, I’m starting to understand the term “senior moment.”
- pjc50 1y agoM68k is probably the best choice for that. Not because of the architecture but because it was so widely used.
- dmitrygr 1y ago68k has too many addressing modes. It is a pain to emulate properly.
- errorcodezero 1y agoThank you! I think building an emulator for a real platform is going to be next on my list. A game console might be interesting to try especially or a 16-bit cpu like you mentioned.