Fixed indentation.

This commit is contained in:
EngiNerd89
2021-12-01 21:39:40 +01:00
parent 5b552d027f
commit 68d20787ad

View File

@@ -694,107 +694,107 @@ kbd_init(const device_t *info)
* 10 - color (low-res, disables 640x400x2 mode) * 10 - color (low-res, disables 640x400x2 mode)
* 00 - autoswitching * 00 - autoswitching
*/ */
kbd->pd |= 0x00; kbd->pd |= 0x00;
else else
/* Switches 7, 8 - floppy drives. */ /* Switches 7, 8 - floppy drives. */
kbd->pd = get_fdd_switch_settings(); kbd->pd = get_fdd_switch_settings();
kbd->pd |= get_videomode_switch_settings(); kbd->pd |= get_videomode_switch_settings();
/* Switches 3, 4 - memory size. */ /* Switches 3, 4 - memory size. */
if ((kbd->type == 3) || (kbd->type == 4) || (kbd->type == 6)) { if ((kbd->type == 3) || (kbd->type == 4) || (kbd->type == 6)) {
switch (mem_size) { switch (mem_size) {
case 256: case 256:
kbd->pd |= 0x00; kbd->pd |= 0x00;
break; break;
case 512: case 512:
kbd->pd |= 0x04; kbd->pd |= 0x04;
break; break;
case 576: case 576:
kbd->pd |= 0x08; kbd->pd |= 0x08;
break; break;
case 640: case 640:
default: default:
kbd->pd |= 0x0c; kbd->pd |= 0x0c;
break; break;
} }
} else if (kbd->type >= 1) { } else if (kbd->type >= 1) {
switch (mem_size) { switch (mem_size) {
case 64: case 64:
kbd->pd |= 0x00; kbd->pd |= 0x00;
break; break;
case 128: case 128:
kbd->pd |= 0x04; kbd->pd |= 0x04;
break; break;
case 192: case 192:
kbd->pd |= 0x08; kbd->pd |= 0x08;
break; break;
case 256: case 256:
default: default:
kbd->pd |= 0x0c; kbd->pd |= 0x0c;
break; break;
} }
} else { } else {
switch (mem_size) { switch (mem_size) {
case 16: case 16:
kbd->pd |= 0x00; kbd->pd |= 0x00;
break; break;
case 32: case 32:
kbd->pd |= 0x04; kbd->pd |= 0x04;
break; break;
case 48: case 48:
kbd->pd |= 0x08; kbd->pd |= 0x08;
break; break;
case 64: case 64:
default: default:
kbd->pd |= 0x0c; kbd->pd |= 0x0c;
break; break;
} }
} }
/* Switch 2 - 8087 FPU. */ /* Switch 2 - 8087 FPU. */
if (hasfpu) if (hasfpu)
kbd->pd |= 0x02; kbd->pd |= 0x02;
/* Switch 1 - always off. */ /* Switch 1 - always off. */
kbd->pd |= 0x01; kbd->pd |= 0x01;
} else if (kbd-> type == 9) { } else if (kbd-> type == 9) {
/* Zenith Data Systems Z-151 /* Zenith Data Systems Z-151
* SW2 switch settings: * SW2 switch settings:
* bit 7: monitor frequency * bit 7: monitor frequency
* bits 5-6: autoboot (00-11 resident monitor, 10 hdd, 01 fdd) * bits 5-6: autoboot (00-11 resident monitor, 10 hdd, 01 fdd)
* bits 0-4: installed memory * bits 0-4: installed memory
*/ */
kbd->pd = 0x20; kbd->pd = 0x20;
switch (mem_size) { switch (mem_size) {
case 128: case 128:
kbd->pd |= 0x02; kbd->pd |= 0x02;
break; break;
case 192: case 192:
kbd->pd |= 0x04; kbd->pd |= 0x04;
break; break;
case 256: case 256:
kbd->pd |= 0x06; kbd->pd |= 0x06;
break; break;
case 320: case 320:
kbd->pd |= 0x08; kbd->pd |= 0x08;
break; break;
case 384: case 384:
kbd->pd |= 0x0a; kbd->pd |= 0x0a;
break; break;
case 448: case 448:
kbd->pd |= 0x0c; kbd->pd |= 0x0c;
break; break;
case 512: case 512:
kbd->pd |= 0x0e; kbd->pd |= 0x0e;
break; break;
case 576: case 576:
kbd->pd |= 0x10; kbd->pd |= 0x10;
break; break;
case 640: case 640:
default: default:
kbd->pd |= 0x12; kbd->pd |= 0x12;
break; break;
} }
} }