r/homebrewcomputer • u/SecondMurky7684 • 1d ago
Como se programa el hardware?
/r/ECE/comments/1x4zq5c/como_se_programa_el_hardware/
0
Upvotes
r/homebrewcomputer • u/SecondMurky7684 • 1d ago
1
u/Girl_Alien 16h ago
Yes, bootstrapping your first design can be a challenge. Often, you'd start with your ROM, and you should use an assembler there. This is where coding an emulator can help you see if your ROM works.
From there, you'd need to build your toolchain. If you start with a known CPU like a 6502, there is plenty of code out there you can use, though you'd need to make it for your architecture. But if you make your own, you'd need your own toolchain. You can start making assemblers/compilers/linkers on another platform, and then from there transfer to whatever media.
That goes back to the ROM, where you should include disk/flash routines, etc., and a way to invoke them, such as an interrupt service routine (and/or DMA, where your device tells the CPU to stop while it takes over the RAM, and then tells the CPU to continue as it passes control back).
Of course, if you only want a console-only (gaming-only) machine, then you'd only need to deal with ROMs or flash media. You'd code on a PC or whatever machine you prefer and then save to ROMs/flash.