[FT32] sim: character input port
Commit Message
Thanks for the review. Corrected Changelog/patch is:
sim/Changelog:
2015-09-22 James Bowman <james.bowman@ftdichip.com>
* ft32/interp.c: (cpu_mem_read) Call getchar when ea is 0x10000.
Comments
On 22 Sep 2015 18:41, James Bowman wrote:
> Thanks for the review. Corrected Changelog/patch is:
your e-mail client corrupted the patch -- all the tabs were spaces. i
applied it by hand this time, but you probably want to use something
like `git send-email` in the future so that it works correctly.
-mike
@@ -169,6 +169,8 @@ static uint32_t cpu_mem_read (SIM_DESC sd, uint32_t dw, uint32_t ea)
/* Simulate some IO devices */
switch (ea)
{
+ case 0x10000:
+ return getchar ();
case 0x1fff4:
/* Read the simulator cycle timer. */
return cpu->state.cycles / 100;