OSDN Git Service

[VM][FMTOWNS] Some devices are enabled to compile.
[csp-qt/common_source_project-fm7.git] / source / src / vm / fmtowns / msdosrom.cpp
1 /*
2         FUJITSU FM Towns Emulator 'eFMTowns'
3
4         Author : Kyuma.Ohta <whatisthis.sowhat _at_ gmail.com>
5         Date   : 2019.01.09 -
6
7         [MSDOS ROM]
8 */
9
10 #include "./msdosrom.h"
11
12 namespace FMTOWNS {
13         
14 void MSDOSROM::initialize()
15 {
16         memset(rom, 0xff, sizeof(rom));
17         FILEIO *fio;
18         if(fio->Fopen(create_local_path(_T("FMT_DOS.ROM")), FILEIO_READ_BINARY)) { // MSDOS
19                 fio->Fread(rom, sizeof(rom), 1);
20                 fio->Fclose();
21         }
22         delete fio;
23 }
24
25 uint32_t MSDOSROM::read_data8(uint32_t addr)    
26 {
27         uint8_t d = 0xff;
28         if((addr >= 0xc2000000) && (addr < 0xc2080000)) {
29                 d = rom[addr & 0x7ffff];
30         }
31         return (uint32_t)d;
32 }
33
34
35 }