Z80: Expose alterate register state and register set selection flipflops

This commit is contained in:
David Banks 2018-09-19 18:52:43 +01:00
parent 8a9fe6f57e
commit 2ff43fafb3
3 changed files with 47 additions and 2 deletions

View File

@ -51,6 +51,12 @@ m3: 163,
m4: 159,
m5: 209,
m6: 210,
m6: 210,
ex_af: 631,
ex_bcdehl: 1770,
ex_dehl0: 625,
ex_dehl1: 629,
ex_dehl_combined: 626,
reg_a0: 2271,
reg_f0: 1854,
reg_b0: 2268,

View File

@ -16,7 +16,7 @@ presetLogLists=[
['cycle',],
['ab','db','_m1','_rd','_wr','_mreq','_iorq','pc'],
['af', 'bc', 'de', 'hl', 'ix', 'iy', 'sp', 'wz', 'ir'],
['State'],
['af2', 'bc2', 'de2', 'hl2', 'State'],
['_int','_nmi',nodenamereset],
];
@ -181,6 +181,14 @@ function busToString(busname){
return busToHexInv('reg_d') + busToHexInv('reg_e');
if(busname=='hl')
return busToHexInv('reg_h') + busToHexInv('reg_l');
if(busname=='af2')
return busToHexInv('reg_aa') + busToHexInv('reg_ff');
if(busname=='bc2')
return busToHexInv('reg_bb') + busToHexInv('reg_cc');
if(busname=='de2')
return busToHexInv('reg_dd') + busToHexInv('reg_ee');
if(busname=='hl2')
return busToHexInv('reg_hh') + busToHexInv('reg_ll');
if(busname=='ir')
return busToHexInv('reg_i') + busToHexInv('reg_r');
if(busname=='wz')

View File

@ -15,7 +15,38 @@ readTriggers[0x8000]="var c=consolegetc; consolegetc=undefined; (c)";
// for opcodes, see http://www.textfiles.com/programming/CARDS/6800
testprogram = [
0x00, // NOP
0x3C, // INC A
0x04, // INC B
0x14, // INC D
0x24, // INC H
0xEB, // EXX DE,HL
0x00, // NOP
0x3C, // INC A
0x04, // INC B
0x14, // INC D
0x24, // INC H
0xD9, // EXX
0x00, // NOP
0x3C, // INC A
0x04, // INC B
0x14, // INC D
0x24, // INC H
0xEB, // EXX DE,HL
0x00, // NOP
0x3C, // INC A
0x04, // INC B
0x14, // INC D
0x24, // INC H
0x08, // EXX AF,AF'
0x00, // NOP
0x3C, // INC A
0x04, // INC B
0x14, // INC D
0x24, // INC H
0x00, // NOP
0x00, // NOP
0x00, // NOP
0x21, 0x00, 0x01, // LD HL,$0100
0x36, 0xCC, // LD (HL),$CC
0x00, // NOP
@ -23,7 +54,7 @@ testprogram = [
0x00, // NOP
0x21, 0x34, 0x12, // LD HL,$1234
0x31, 0xfe, 0xdc, // LD SP,0xDCFE
0xe5, // PUSH HL
// 0xe5, // PUSH HL
0x21, 0x78, 0x56, // LD HL,$5678
0xe3, // EX (SP),HL
0xdd, 0x21, 0xbc,0x9a, // LD IX, 0x9ABC