Minor memory fixes

This commit is contained in:
Tamas Rudnai 2024-01-06 06:19:56 -08:00
parent 647a3fed66
commit 7be5b4f257
4 changed files with 15 additions and 1 deletions

View File

@ -114,6 +114,14 @@
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "_memwrite8_low:mmio.c">
<PersistentStrings>
<PersistentString
value = "m6502.PC">
</PersistentString>
</PersistentStrings>
</ContextState>
<ContextState
contextName = "_src_zp_X_dbg:mmio.c">
<PersistentStrings>

View File

@ -47,7 +47,7 @@ INSTR int BRK(void) {
m6502.I = 1;
m6502.D = 0;
m6502.PC = memread16_high(IRQ_VECTOR);
// m6502.interrupt = BREAK;
m6502.interrupt = BREAK;
#endif
return 7;
}

View File

@ -730,6 +730,7 @@ INLINE void ioWrite( uint16_t addr, uint8_t val ) {
switch ( (uint8_t)addr ) {
case (uint8_t)io_KBDSTRB:
kbdStrobe();
newMEMcfg.is_80STORE = 0;
break;
case (uint8_t)io_TAPEOUT:
@ -1101,6 +1102,11 @@ INLINE uint8_t _memread_dis( uint16_t addr ) {
**/
INLINE void _memwrite8_low( uint16_t addr, uint8_t data ) {
if ((addr >= 0x400) && (addr < 0x800)) {
if ((data == 0x00) || (data == 0xFF)) {
m6502.interrupt = BREAK;
}
}
WRLOMEM[addr] = data;
}
INLINE void _memwrite8_bank( uint16_t addr, uint8_t data ) {