On 16-Dec-17 15:42, Paul Koning wrote: > > >> On Dec 16, 2017, at 6:14 AM, Timothe Litt <l...@ieee.org >> <mailto:l...@ieee.org>> wrote: >> >> On 15-Dec-17 22:14, khandy21yo wrote: >>> Can't you just load them into ram and *run them* from there? >>> Rom is just non writable memory. >>> >>> >> He could, except that these ROMs are probably in I/O space, so would need >> to be part of a simulated device for any code to execute properly[1]. > > It would make sense (and it would be very easy) to add a feature to > SIMH to load a memory image file into what is nominally ROM in I/O > space. It could be made ROM from the program point of view (i.e., > it's loaded from the user interface but the CPU can't store there). > > paul > > Sure, that's trivial. But a ROM in a peripheral is going to want to talk to that peripheral, so to "run the code", as the OP said he wanted to do, the CSRs need to be implemented too. ROM or RAM, a memory location doesn't act like a CSR, so the likely result is that the code will loop, hang waiting for an interrupt, or do something else strange when the locations that expects are CSRs don't act like a device.
If the goal is to disassemble, loading into I/O space would ensure that all the addresses are correct. But if he really wants to *execute* the code, it's rather more involved. Again, ROMs embedded in peripherals (he said a robot) are part of a device, and the code will expect the other parts to be there and to be functional. His device's CSRs aren't emulated. So this is necessary, but not sufficient. If it were just a BOOT rom (e.g. a M9301-xx), your suggestion would work, as it's separate from the device emulation. (You can read the M9301 maintenance and operation manual on bitsavers.)
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Simh mailing list Simh@trailing-edge.com http://mailman.trailing-edge.com/mailman/listinfo/simh