- [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:
BIN
batman.sav
Normal file
BIN
batman.sav
Normal file
Binary file not shown.
BIN
batmanritman.tap
Normal file
BIN
batmanritman.tap
Normal file
Binary file not shown.
13
symbols-glaurung.txt
Normal file
13
symbols-glaurung.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
0x5e38 STACK
|
||||
0x9a01 DRW_ROOM
|
||||
0x9f00 DRW_SCO_HERO
|
||||
0x9f0f VAR_VIDES
|
||||
0x9f8d DRW_SCO_INV
|
||||
0xa00a DRW_SCO_LIVS
|
||||
0xa01a DRW_SCO_NBAG
|
||||
0xa022 DRW_SCO_NARW
|
||||
0xa02a DRW_SCO_PNTS
|
||||
0xc661 CLEAR_SCR
|
||||
0xed5e MAINLOOP
|
||||
0xf2b1 DRW_HERO
|
||||
0xfed5 COUNT500
|
||||
14
symbols.txt
14
symbols.txt
@@ -1,13 +1 @@
|
||||
0x5e38 STACK
|
||||
0x9a01 DRW_ROOM
|
||||
0x9f00 DRW_SCO_HERO
|
||||
0x9f0f VAR_VIDES
|
||||
0x9f8d DRW_SCO_INV
|
||||
0xa00a DRW_SCO_LIVS
|
||||
0xa01a DRW_SCO_NBAG
|
||||
0xa022 DRW_SCO_NARW
|
||||
0xa02a DRW_SCO_PNTS
|
||||
0xc661 CLEAR_SCR
|
||||
0xed5e MAINLOOP
|
||||
0xf2b1 DRW_HERO
|
||||
0xfed5 COUNT500
|
||||
0x6580 START
|
||||
|
||||
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);
|
||||
|
||||
@@ -95,9 +95,9 @@ namespace z80analyze
|
||||
{
|
||||
//uint8_t tag = z80::getMemTag(i);
|
||||
//pixels[i] = tag==MEMTAG_NONE ? 0x808080 : tag==MEMTAG_DATA ? 0x0000FF : tag==MEMTAG_MIXED ? 0xFF00FF : 0x00FF00;
|
||||
|
||||
uint32_t none_color = i<0x4000 ? 0x101010 : i<0x5800 ? 0x202020 : i<0x5b00 ? 0x404040 : 0x808080;
|
||||
uint8_t tag = z80::getMemTouched(i);
|
||||
pixels[i] = tag==MEMTAG_NONE ? 0x808080 : tag==MEMTAG_DATA ? 0x0000FF : tag==MEMTAG_REPEAT ? 0xFF0000 : 0x00FF00;
|
||||
pixels[i] = tag==MEMTAG_NONE ? none_color : tag==MEMTAG_DATA ? 0x0000FF : tag==MEMTAG_REPEAT ? 0xFF0000 : 0x00FF00;
|
||||
}
|
||||
pixels[z80::getPC()] = 0xFFFFFF;
|
||||
|
||||
|
||||
@@ -1028,6 +1028,8 @@ namespace z80debug
|
||||
fread(regs, 31, 1, f);
|
||||
fread(&memory[0x4000], 0xc000, 1, f);
|
||||
fclose(f);
|
||||
history::store();
|
||||
history::gototop();
|
||||
}
|
||||
|
||||
void setcursor(const uint16_t address)
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace z80dis
|
||||
if (strstr(buffer, "4x"))
|
||||
{
|
||||
opcode_size+=2;
|
||||
const uint16_t word = *(uint16_t*)(memory+((*memory==0xFD) || (*memory==0xDD)?2:1));
|
||||
const uint16_t word = *(uint16_t*)(memory+((*memory==0xFD) || (*memory==0xDD) || (*memory==0xED)?2:1));
|
||||
if (symbols[word][0]!=0) {
|
||||
char *p = strstr(buffer, "$");
|
||||
(*p)='%'; p++;
|
||||
|
||||
Reference in New Issue
Block a user