cavnex / mc6809

Cycle-Accurate MC6809/E implementation, Verilog
91 stars 19 forks source link

NMILatched should be initialized to 1 to avoid initial NMI after nRESET release #3

Open jferreir opened 1 year ago

jferreir commented 1 year ago

https://github.com/cavnex/mc6809/blob/17e94a6ef163be8b79a9b15b2e814847b6062f0f/mc6809i.v#LL195C13-L195C13

jferreir commented 1 year ago

Another solution is to initialize s_nxt to 0 in https://github.com/cavnex/mc6809/blob/17e94a6ef163be8b79a9b15b2e814847b6062f0f/mc6809i.v#L1724 and check the status of NMIMask (should be zero to accept the NMI input) in https://github.com/cavnex/mc6809/blob/17e94a6ef163be8b79a9b15b2e814847b6062f0f/mc6809i.v#L1792 as if ((NMIMask == 0) && (NMILatched == 0))