OSDN Git Service

[General] Convert sourcecode's CRLF format: DOS(WINDOWS) to Unix, to apply patches...
[csp-qt/common_source_project-fm7.git] / source / src / vm / fmr30 / system.cpp
1 /*
2         FUJITSU FMR-30 Emulator 'eFMR-30'
3
4         Author : Takeda.Toshiya
5         Date   : 2008.12.31 -
6
7         [ system ]
8 */
9
10 #include "system.h"
11
12 void SYSTEM::initialize()
13 {
14         arr = nmistat = 0;
15         nmimask = 0xf0;
16 }
17
18 void SYSTEM::write_io8(uint32 addr, uint32 data)
19 {
20         switch(addr & 0xffff) {
21         case 0x46:
22                 nmistat &= ~data;
23                 break;
24         case 0x47:
25                 nmimask = data;
26                 break;
27         case 0xff00:
28                 arr = data;
29                 break;
30         }
31 }
32
33 uint32 SYSTEM::read_io8(uint32 addr)
34 {
35         switch(addr & 0xffff) {
36         case 0x18:
37                 // modem:       no
38                 // scsi:        yes
39                 // fd23:        3.5inch
40                 // ext-ram:     yes (1mb)
41                 // co-pro       no
42                 return 0x24;
43         case 0x20:
44         case 0x21:
45                 // isrr high/low
46                 return 0;
47         case 0x46:
48                 return nmistat;
49         case 0x47:
50                 return nmimask;
51         case 0xff00:
52                 return arr;
53         }
54         return 0xff;
55 }
56