Mercurial > hg > Members > kono > os9 > sbc09
diff io.c @ 4:6159cc57d44e
on going ...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 04 Jul 2018 19:33:22 +0900 |
parents | 831ac057ea86 |
children | a6db579d8c11 |
line wrap: on
line diff
--- a/io.c Wed Jul 04 14:03:56 2018 +0900 +++ b/io.c Wed Jul 04 19:33:22 2018 +0900 @@ -98,6 +98,7 @@ void do_timer(int,int); void do_disk(int,int); +void do_mmu(int,int); int char_input(void) { int c, w, sum; @@ -243,10 +244,12 @@ xidx = 0; } } - } else if ((a&0xf0) == 0x10) { /* timer */ + } else if (a >= 0x90) { /* mmu */ + do_mmu(a,c); + } else if (a >= 0x20) { /* disk */ + do_disk(a,c); + } else if (a >= 0x10) { /* disk */ do_timer(a,c); - } else if ((a&0xf0) == 0x20) { /* disk */ - do_disk(a,c); } } @@ -309,6 +312,24 @@ mem[IOPAGE+0x20] = 0xff; } +void do_mmu(int a, int c) +{ +#ifdef USE_MMU + + if (a==0x91) { + if (c&0) { + mmu = phymem+memsize-0x10000+0xffa0; + } else { + mmu = phymem+memsize-0x10000+0xffa8; + } + mem[IOPAGE+a] = c; + } if (0xa0 <= a && a <= 0xaf) { + mem[IOPAGE+a] = c; + } + +#endif +} + typedef struct bp { int address; int count;