m6809: Read reset vector during execute_run rather than device_reset to facilitate bank switching of vectoro area

This commit is contained in:
AJR 2023-04-08 10:34:28 -04:00
parent fabf9be833
commit 9dc9d774c0
3 changed files with 5 additions and 6 deletions

View File

@ -245,8 +245,7 @@ void m6809_base_device::device_reset()
m_cc |= CC_I; // IRQ disabled
m_cc |= CC_F; // FIRQ disabled
m_pc.b.h = space(AS_PROGRAM).read_byte(VECTOR_RESET_FFFE + 0);
m_pc.b.l = space(AS_PROGRAM).read_byte(VECTOR_RESET_FFFE + 1);
set_ea(VECTOR_RESET_FFFE);
// reset sub-instruction state
reset_state();

View File

@ -204,7 +204,7 @@ protected:
// state stack - implemented as a uint32_t
void push_state(uint16_t state) { m_state = (m_state << 9) | state; }
uint16_t pop_state() { uint16_t result = m_state & 0x1ff; m_state >>= 9; return result; }
void reset_state() { m_state = 0; }
void reset_state() { m_state = 1; }
// effective address reading/writing
uint8_t read_ea() { return read_memory(m_ea.w); }

View File

@ -7,10 +7,10 @@ import re
import sys
# Initial state
state = 1
text = ""
dispatch_to_states = { "MAIN" : 0 }
states_to_dispatch = { 0 : "MAIN" }
dispatch_to_states = { "MAIN" : 0, "INTERRUPT_VECTOR" : 1 }
states_to_dispatch = { 0 : "MAIN", 1 : "INTERRUPT_VECTOR" }
state = len(states_to_dispatch)
def load_file(fname, lines):
path = fname.rpartition('/')[0]