![]() Again I chose C under WSL as my development environment. In an effort to streamline this process I considered writing my own terminal emulator, from which I could easily start the transfer program. This can be accomplished by means of a batch file loop but still it doesn't seem right. The only downside is that I have to exit Putty to start the serial program downloading as they share the COM port on completion I have to restart Putty. I excluded most of the modem error checking, particularly block number and CRC checks as we are transmitting at quite slow speeds down a 15cm cable. ![]() After a while this worked fine, I could compile a program, start xm running and run my serial program to send the machine code. I still couldn't get the example code working so I wrote my own version called xm. I found the modem protocol is quite simple so I wrote a C program under Windows WSL to download a test packet meaning that at least I had reasonable input. Not knowing the code or the protocol or having a tool to look at serial port traffic meant that debugging and experimentation were unsuccessful. However, on starting Xmodem nothing happened. It was easy to download the program and tweak it to compile/load successfully. ![]() I was a little nieve but that is the best way to start a long journey. The code is intended for a 65C02 + ACIA 6551, the same as mine, and it is only a couple of hundred lines long so I thought I have a good chance of success. provides a copy of Daryl Rictor's xmodem code so a couple of weeks ago I tried it out. I have been thinking of trying to implement XMODEM for a while, it seems sensible to use the serial port session which will allow a transfer at 19200 baud, taking a few seconds for program download into RAM (not EEPROM). For a 1KB program, which is quite large for my assembler programs but reasonable for C it can take a minute to process. My programs are quite small but it takes time to compile them, transfer them to an Arduino sketch then run the sketch to copy the program to EEPROM. ![]() I am probably being a diva about this as the old school method to remove, program, replace the EEPROM chip was very painful. My 6502 system is working well but I still find the program upload process irritating. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |