Conversation
Minor changes to the 8018x romprg code to get it working on my NEC V25 system. Just a "quick and dirty" job, as there is only a smal audience for this tool. Added a "how to" for my own reference. may be helpfull for others to, so I added it.
|
Thanks for testing out this utility and porting it to another platform along with some bug fixes. Cool! |
| }; | ||
|
|
||
| void set_baud_rate(uint8_t idx) { | ||
| outw(0x8000 | baudrate_compares[idx], PCB_B0CMP); // 38400bps |
There was a problem hiding this comment.
due to the fact that this is being called with an index of 17, the 38400bps is not true anymore. I think it has jumped to 115200 as well as on the V25
There was a problem hiding this comment.
@cocus, yes you are right. I use 115200 baud. The comment should be deleted.
There was a problem hiding this comment.
that's fine :) I never tried that baudrate, not sure why though. probably the error rate was high. I forgot :)
There was a problem hiding this comment.
No errors for me. I use 20 cm to a TTL to USB converter.
There was a problem hiding this comment.
no no, I meant the error rate due to the baudrate being too off from the actual 115200, due to the crystal I've used on my SBC
There was a problem hiding this comment.
@cocus, are you saying the 8018X (and possibly V25) don't map to the baud rate indices setup by termios.h in ELKS?
The IBM PC serial handler in serial-8250.c sets the baud rate using a divisor, and takes two steps to compute a baud rate index:
/* set baud rate divisor, first lower, then higher byte */
cflags = port->tty->termios.c_cflag & CBAUD;
if (cflags & CBAUDEX)
cflags = B38400 + (cflags & 03);
divisor = divisors[cflags];
The termios.h value for B38400 is 0000017, which is actually 15 decimal. 17 decimal would correspond to B115200.
There was a problem hiding this comment.
right, that's probably why I couldn't get 115200 reliable on mine, I've used a 20MHz crystal
There was a problem hiding this comment.
@cocus, are you saying the 8018X (and possibly V25) don't map to the baud rate indices setup by termios.h in ELKS?
The IBM PC serial handler in serial-8250.c sets the baud rate using a divisor, and takes two steps to compute a baud rate index:
/* set baud rate divisor, first lower, then higher byte */ cflags = port->tty->termios.c_cflag & CBAUD; if (cflags & CBAUDEX) cflags = B38400 + (cflags & 03); divisor = divisors[cflags];The termios.h value for B38400 is 0000017, which is actually 15 decimal. 17 decimal would correspond to B115200.
Right, but in here decimal 17 is being used. 15 was used before
There was a problem hiding this comment.
added a pull request to change the comment...
There was a problem hiding this comment.
thank you! it was a small nit pick :) It'll probably bite me in the future
Minor changes to the nice 8018x romprg code from @cocus to get it working on my NEC V25 system. Just a "quick and dirty" job, as there is only a small audience for this tool. Made a "how to" for my own reference. May be helpful for others too, so I added it. I can verify that the original version can be used unmodified for SST39SF040 flash ROMs.