sark02 wrote:
Emulators: custom, Kowalski,none, VICE
Note that VICE, the Kowalski environment, etc., are simulation, not emulation. Emulation is usually the province of hardware, resulting in a behavior that is identical to or very close to that of the emulated hardware (I think we had a topic going on this a while back). Simulation is generally done in software, often on a machine that has no architectural similarity to what is being simulated.
Quote:
For those of you who bypass emulation(sic) and go straight to target, how do you load the code onto the target?
The procedure with my POC unit is as follows:
- Edit and assemble the code in Kowalski.
- Put POC into load mode via an M/L monitor command. The command to set up a load is L [<bank> [<page>]], where <bank> and <page> may be used to load into any bank and optionally with relocation to any page within that bank. The load function opens the auxiliary serial port and readies it for data inflow.
- Save the object code generated by Kowalski in Motorola S-record format. This takes a little explaining.
Normally, saving object code in S-record format would write a file. As my Windows file and print services run on Linux, not Windows, I have some flexibility at my disposal. In every subdirectory in which I do 65C816 development is a file called binary code.65m, which is a symbolic link to a static file named aout.65m. Windows, of course, doesn't know that binary code.65m isn't a real file, as Samba makes symbolic links look to Windows like regular files. When object code is written into one of the binary code.65m symbolic links the data ends up in aout.65m.
- A daemon running on my Linux box looks at aout.65m at two second intervals and compares the file's current time-stamp to what it was the last time it looked at the file. As the time-stamp will change when the file is written, the daemon will see a newer time-stamp, read aout.65m and pipe its content to my UNIX box via the network.
- The UNIX box also has a daemon that listens for a network connection on port 65534 (a dynamic port). When a connection is made, the daemon will direct the incoming data flow to a specific serial port on the Equinox serial hardware that is attached to my UNIX box. That port is wired to the auxiliary serial port on POC. An stty command sets up the communications parameters and data is ready to flow.
- POC reads in the data flow an S-record at a time, converts each record to binary, checks it for errors and if satisfactory, pokes bytes into RAM. A dot is printed to the console for each record successfully processed.
- When an S9 record has been received and processed the load has completed, the serial link is broken and the code is ready to be run. The final step is for the MPU's PB and PC shadow registers in the M/L monitor to be updated with the execution address of the program. Typing G or J will immediately execute the code.
Although this process sounds convoluted it is quite fast. The serial link to my UNIX box runs at 115.2 Kbps, so even a large program loads in only a few seconds.