2 EPSON QC-10 Emulator 'eQC-10'
4 Author : Takeda.Toshiya
12 #include "../../fifo.h"
20 void MFONT::initialize()
22 memset(mfont, 0xff, sizeof(mfont));
24 // load multifont rom image
25 FILEIO* fio = new FILEIO();
26 if(fio->Fopen(create_local_path(_T("MFONT.ROM")), FILEIO_READ_BINARY)) {
27 fio->Fread(mfont, sizeof(mfont), 1);
46 void MFONT::write_io8(uint32_t addr, uint32_t data)
51 if(cmd->count() == 3) {
52 int mode = cmd->read();
53 int code = cmd->read();
54 code |= cmd->read() << 8;
56 if(0x200 <= code && code < 0xc00) {
57 int ofs = (code - 0x200) * 36;
60 for(int i = 0; i < 36; i++) {
61 res->write(mfont[ofs + i]);
63 status = BIT_IBF | BIT_OBF;
64 d_pic->write_signal(SIG_I8259_IR7 | SIG_I8259_CHIP1, 1, 1);
73 d_pic->write_signal(SIG_I8259_IR7 | SIG_I8259_CHIP1, 1, 1);
78 uint32_t MFONT::read_io8(uint32_t addr)
91 d_pic->write_signal(SIG_I8259_IR7 | SIG_I8259_CHIP1, 0, 1);
97 #define STATE_VERSION 1
99 bool MFONT::process_state(FILEIO* state_fio, bool loading)
101 if(!state_fio->StateCheckUint32(STATE_VERSION)) {
104 if(!state_fio->StateCheckInt32(this_device_id)) {
107 state_fio->StateUint8(status);
108 if(!cmd->process_state((void *)state_fio, loading)) {
111 if(!res->process_state((void *)state_fio, loading)) {