I am running loadice to load my prom image into the ROM emulator. I can get it to load an image once, but then it seems to refuse to do subsequent loads. This makes no sense and is totally wrong.
At one time, 57600 was a "wierd" baud rate and was not even supported on unix systems. This has now changed. I am working with the 4.0b sources from the Promice CD. The changes are more or less trivial to add this to the supported rate for my linux build. And it works!
I had expected to have to figure out some command to send to the promice to tell it to change baud rate, but it doesn't work that way. The promice detects the baud rate. Existing code in loadice sends a "auto-baud" character in a loop, watching until it gets one back. The auto-baud character is 0x03.
For a 64K binary image, this reduces the download time from 30 seconds to about 10 seconds, which is very nice.
It is hard to imagine a more common and simple use case. I have a binary image file "xyz.bin" and I want to load it into the emulator to run as a single 27512 EPROM. The simple, common, obvious case should "just work". Why doesn't it? We will find out, and very likely we will "fix" this software so simple obvious things work.
I am reminded of what is called "the principle of least surprise" in software design.
Second is that putting a "dot" in front of a command says "do it right now". Exactly what I wanted for the load command (why it should get delayed by default is beyond me).
I had put and "exit" command at the end of my loadice.ini, and that caused the software to exit and the procrastinated load never happened.
The reason I had put the exit at the end of the file is that it would always enter dialog mode, at which point I would need to type exit. I simply want to type "make load" and have my image downloaded and presented to my target.
(Note: now that I know about putting ". load" rather than "load" to get the sensible "do it now" behavior, I could just leave the exit at the end of the file).
Further investigation reveals that it enters dialog mode because I have a "begin" command in my loadrom.ini file. Without it, the loadice doesn't connect to the promice device and all subsequent commands fail.
Reading the documentation on the "begin" command says that without it, the "normal" mode of operation is to process the entire loadice.ini file, then connect to the promice device and do whatever has been set up.
Along with that, it uses the idiotic convention of putting newlines at the start of output lines rather than the ends!
The "trick" in all of this is understanding the sequence in which loadice processes things. There are 3 critical times:
We now know how to force the issue, as needed.
I can now use the following file with success. Note the dump, status, and config commands that I added during troubleshooting and will eventually eliminate.
; It seems that this is the comment character output=/dev/ttyUSB1 baud=57600 ; begin - this asks for dialog mode, but we exit begin word 8 0 rom 27512 stop dump 0 1f ; image bootrom.bin image sun3160.bin ; Putting the "dot" says "Do it now!!" . load status dump 0 1f go status config exit
Tom's Computer Info / tom@mmto.org