2 NEC TK-80BS (COMPO BS/80) Emulator 'eTK-80BS'
3 NEC TK-80 Emulator 'eTK-80'
4 NEC TK-85 Emulator 'eTK-85'
6 Author : Takeda.Toshiya
23 uint32_t MEMBUS::fetch_op(uint32_t addr, int *wait)
25 #if defined(_TK80BS) || defined(_TK80)
26 if(d_cpu->read_signal(SIG_I8080_INTE) != 0) {
27 if(config.dipswitch & 1) {
28 d_cpu->write_signal(SIG_I8080_INTR, 1, 1);
32 if(pc7 != 0 && ++count == 4) {
33 if(config.dipswitch & 1) {
34 d_cpu->write_signal(SIG_I8085_RST7, 1, 1);
38 return MEMORY::fetch_op(addr, wait);
42 void MEMBUS::write_signal(int id, uint32_t data, uint32_t mask)
44 if(id == SIG_MEMBUS_PC7) {
45 if((pc7 = data & mask) == 0) {
52 #define STATE_VERSION 1
54 #include "../../statesub.h"
56 void MEMBUS::decl_state()
58 enter_decl_state(STATE_VERSION);
61 DECL_STATE_ENTRY_UINT32(pc7);
62 DECL_STATE_ENTRY_UINT32(count);
69 void MEMBUS::save_state(FILEIO* state_fio)
71 // state_fio->FputUint32(STATE_VERSION);
72 // state_fio->FputInt32(this_device_id);
75 // state_fio->FputUint32(pc7);
76 // state_fio->FputUint32(count);
78 MEMORY::save_state(state_fio);
81 bool MEMBUS::load_state(FILEIO* state_fio)
83 // if(state_fio->FgetUint32() != STATE_VERSION) {
86 // if(state_fio->FgetInt32() != this_device_id) {
90 // pc7 = state_fio->FgetUint32();
91 // count = state_fio->FgetUint32();
93 return MEMORY::load_state(state_fio);