- [FIX] Els opcodes DD amb paràmetre de 16 bits mostraven mal l'adreça
- [FIX] Al carregar un estat el contador de programa no mantenia l'adreça correcta - [NEW] Afegit al analitzador la visualització de escritura de dades - [NEW] Deshabilite les interrupcions al entrar a una interrupció. No se si fa falta. - [NEW] Afegit el Batman de Jon Ritman pa provar
This commit is contained in:
50
z80.cpp
50
z80.cpp
@@ -217,6 +217,7 @@ namespace z80
|
||||
memtag[addr] = MEMTAG_MIXED;
|
||||
} else {
|
||||
memtag[addr] = MEMTAG_DATA;
|
||||
memtouched[addr] = MEMTAG_DATA;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -717,30 +718,6 @@ namespace z80
|
||||
RETN();
|
||||
}
|
||||
|
||||
void interrupt()
|
||||
{
|
||||
if (!iff1) return;
|
||||
exit_from_halt = true;
|
||||
PUSH(rPC);
|
||||
uint16_t address;
|
||||
if (im==1) {
|
||||
rPC = 0x38;
|
||||
} else if (im==2) {
|
||||
address = (rI<<8) | 0xFE;
|
||||
rPC = READ_MEM_16(address);
|
||||
} else if (im==0) {
|
||||
printf("Interrupt mode 0!\n");
|
||||
z80debug::stop();
|
||||
return;
|
||||
}
|
||||
if (options[Z80_OPTION_BREAK_ON_INTERRUPT]) {
|
||||
printf("Break on interrupt! 0x%2x, PC: 0x%2x\n", address, rPC);
|
||||
z80debug::setcursor(rPC);
|
||||
z80debug::history::store();
|
||||
z80debug::stop();
|
||||
}
|
||||
}
|
||||
|
||||
void RST(uint8_t vec)
|
||||
{
|
||||
PUSH(rPC);
|
||||
@@ -785,6 +762,31 @@ namespace z80
|
||||
}
|
||||
}
|
||||
|
||||
void interrupt()
|
||||
{
|
||||
if (!iff1) return;
|
||||
DI();
|
||||
exit_from_halt = true;
|
||||
PUSH(rPC);
|
||||
uint16_t address;
|
||||
if (im==1) {
|
||||
rPC = 0x38;
|
||||
} else if (im==2) {
|
||||
address = (rI<<8) | 0xFE;
|
||||
rPC = READ_MEM_16(address);
|
||||
} else if (im==0) {
|
||||
printf("Interrupt mode 0!\n");
|
||||
z80debug::stop();
|
||||
return;
|
||||
}
|
||||
if (options[Z80_OPTION_BREAK_ON_INTERRUPT]) {
|
||||
printf("Break on interrupt! 0x%2x, PC: 0x%2x\n", address, rPC);
|
||||
z80debug::setcursor(rPC);
|
||||
z80debug::history::store();
|
||||
z80debug::stop();
|
||||
}
|
||||
}
|
||||
|
||||
static inline const uint8_t RLC(const uint8_t v)
|
||||
{
|
||||
const uint8_t res = (v>>7) | (v<<1);
|
||||
|
||||
Reference in New Issue
Block a user