From: Brian B. <bba...@mt...> - 2002-09-13 21:44:33
|
Hi, David. Epic is right! That's quite complex stuff but it sounds like you're conquering it all. Is all this going to have a physical 3d/2d environment that the RCX emulator runs in? If so, do you have a plan on what it'll look like and how you'll develop it? > Now, an interesting (but complicated problem). I want to be able to > create a fake IR tower application that takes output from the > firmware/program download applications (lejosfirmdl and lejos) and > communicates it to the serial port of the RCX. The serial port is quite > complex and it's going to take me some time to implement. Add to that > the fact that I don't have a clue how to interface these things! It > would be ideal if I could do it without having to modify the firmware > download code too much (e.g. just set RCXTTY=fakeir or something). Also, > I don't know the best way of interfacing. Some ideas: > > 1. Sockets. Cygwin does sockets similarly to Unix, so I could create a > message-based protocol to transfer information to and from the emulator. > This could also be used when updating the state of the emulator. It > would enable a UI to run in another language (e.g. Java) and even on > another machine. > > 2. Some other convoluted way such as pipes or shared memory. Shared > memory wouldn't be too bad, but I don't have a clue about it and whether > it's portable. That way I wouldn't have to deal with the overhead of > processing messages. This will be really strange in a simulated environment. I don't envy having to create that. > So, that's about where I am. Congratulations if you read this far! Now > I'll tell you how to compile and run the thing! > > Step 1. Obtain latest code from CVS. > > Step 2. Put it all in a directory. > > Step 3. Compile it. > a) gcc -o emul.exe *.c will do it. > b) gcc -DRCX_DEBUG -o emul.exe *.c will give you a version > with debug info (recommended). > c) gcc -DRCX_DEBUG -DRCX_DEBUG_REGISTERS -o emul.exe *.c will > give you a version with some registers output as well. Not all that > useful. > > Step 4. Get a ROM and RAM image. > a) ROM: Kekoa's page has info on how to get this. > http://graphics.stanford.edu/~kekoa/rcx/. I don't know how safe it is to > do this, but all it does is install a new firmware that reads the ROM > and outputs it in S-record format. > b) firmware (RAM): The file bin\lejos.srec in the lejos > distribution should do it. It doesn't actually use the firmware, but it > has to be there for the thing to work. > > Step 5. Run it! Impressive. > Type: emul -f lejos.srec -r rom.srec -d > > This assumes your firmware is called lejos.srec and your ROM is called > rom.srec. The -d signifies that you want debug mode. There are 4 levels > of output and the following flags control them: > > -d (or --debug): highest level - output most (recommended) > -q (or --quiet): don't output very much > -v (or --verbose): about half way > > If you don't put a flag it defaults to between -q and -v. > > Other flags: > > -f (or --ram): followed by the firmware image > -r (or --rom): followed by the rom image > -h (or --help): output some help info > > It compiles under my installation of cygwin using gcc. I don't know if > it will compile for anyone else; it would be nice if someone lets me > know if they can get it to run. > > In the actual application, pressing return will execute the next > instruction. Pressing d (followed by return) will dump the memory to > screen, and b will output it to a file (in binary format). > > Phew! That's about it for now... > > Dave. > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.386 / Virus Database: 218 - Release Date: 09/09/2002 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Rcxemul-discussion mailing list > Rcx...@li... > https://lists.sourceforge.net/lists/listinfo/rcxemul-discussion |