mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-02-05 05:31:22 +00:00
Improve CPU_TRACING output
This commit is contained in:
parent
30d7f88c21
commit
2c12aa6112
@ -746,7 +746,7 @@ GLUE_C_WRITE(cpu65_trace_epilogue)
|
||||
case addr_absolute_y:
|
||||
case addr_j_indirect:
|
||||
case addr_j_indirect_x: /* word arg */
|
||||
sprintf(fmt, "%04X:%02X%02X%02X %s %s", current_pc, cpu65_opcode, (uint8_t)arg1, (uint8_t)arg2, opcodes_65c02[cpu65_opcode].mnemonic, disasm_templates[opcodes_65c02[cpu65_opcode].mode]);
|
||||
sprintf(fmt, "%04X:%02X%02X%02X %s %s", current_pc, cpu65_opcode, (uint8_t)arg2, (uint8_t)arg1, opcodes_65c02[cpu65_opcode].mnemonic, disasm_templates[opcodes_65c02[cpu65_opcode].mode]);
|
||||
sprintf(buf, fmt, (uint8_t)arg1, (uint8_t)arg2);
|
||||
break;
|
||||
|
||||
|
@ -101,8 +101,8 @@ TEST test_boot_disk_bytes() {
|
||||
|
||||
// This test is fairly abusive ... it creates an ~88MB file in $HOME
|
||||
// ... but if it's correct, you're fairly assured the cpu/vm is working =)
|
||||
#define EXPECTED_CPU_TRACE_FILE_SIZE 86057107
|
||||
#define EXPECTED_CPU_TRACE_SHA "525098EDD23E4602791D0167DAE0FB65ACE33ABD"
|
||||
#define EXPECTED_CPU_TRACE_FILE_SIZE 86057401
|
||||
#define EXPECTED_CPU_TRACE_SHA "B6154D9DCC39EFD2AA69BEBF981E3024427F5240"
|
||||
TEST test_boot_disk_cputrace() {
|
||||
char *homedir = getenv("HOME");
|
||||
char *output = NULL;
|
||||
@ -122,6 +122,10 @@ TEST test_boot_disk_cputrace() {
|
||||
char mdstr[(SHA_DIGEST_LENGTH*2)+1];
|
||||
|
||||
FILE *fp = fopen(output, "r");
|
||||
fseek(fp, 0, SEEK_END);
|
||||
long expectedSize = ftell(fp);
|
||||
ASSERT(expectedSize == EXPECTED_CPU_TRACE_FILE_SIZE);
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
char *buf = malloc(EXPECTED_CPU_TRACE_FILE_SIZE);
|
||||
if (fread(buf, 1, EXPECTED_CPU_TRACE_FILE_SIZE, fp) != EXPECTED_CPU_TRACE_FILE_SIZE) {
|
||||
ASSERT(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user