comparison vdp.c @ 83:2c7267617d71

Implement Z80 reset and bus request registers.
author Mike Pavone <pavone@retrodev.com>
date Wed, 26 Dec 2012 17:06:34 -0800
parents 108e587165c0
children 2d1ae596db7a
comparison
equal deleted inserted replaced
82:6331ddec228f 83:2c7267617d71
1042 } else { 1042 } else {
1043 if ((value & 0xC000) == 0x8000) { 1043 if ((value & 0xC000) == 0x8000) {
1044 //Register write 1044 //Register write
1045 uint8_t reg = (value >> 8) & 0x1F; 1045 uint8_t reg = (value >> 8) & 0x1F;
1046 if (reg < VDP_REGS) { 1046 if (reg < VDP_REGS) {
1047 //printf("register %d set to %X\n", reg, value & 0xFF); 1047 printf("register %d set to %X\n", reg, value & 0xFF);
1048 context->regs[reg] = value; 1048 context->regs[reg] = value;
1049 /*if (reg == REG_MODE_2) { 1049 if (reg == REG_MODE_2) {
1050 printf("Display is now %s\n", (context->regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled"); 1050 printf("Display is now %s\n", (context->regs[REG_MODE_2] & DISPLAY_ENABLE) ? "enabled" : "disabled");
1051 }*/ 1051 }
1052 } 1052 }
1053 } else { 1053 } else {
1054 context->flags |= FLAG_PENDING; 1054 context->flags |= FLAG_PENDING;
1055 context->address = (context->address &0xC000) | (value & 0x3FFF); 1055 context->address = (context->address &0xC000) | (value & 0x3FFF);
1056 context->cd = (context->cd &0x3C) | (value >> 14); 1056 context->cd = (context->cd &0x3C) | (value >> 14);