Merge pull request #2812 from jriwanek-forks/randomstuff
Various ports and cleanups
This commit is contained in:
@@ -1120,6 +1120,14 @@ write_output(atkbd_t *dev, uint8_t val)
|
||||
if (!(val & 0x01)) { /* Pin 0 selected. */
|
||||
/* Pin 0 selected. */
|
||||
kbd_log("write_output(): Pulse reset!\n");
|
||||
if (machines[machine].flags & MACHINE_COREBOOT) {
|
||||
/* The SeaBIOS hard reset code attempts a KBC reset if ACPI RESET_REG
|
||||
is not available. However, the KBC reset is normally a soft reset, so
|
||||
SeaBIOS gets caught in a soft reset loop as it tries to hard reset the
|
||||
machine. Hack around this by making the KBC reset a hard reset only on
|
||||
coreboot machines. */
|
||||
pc_reset_hard();
|
||||
} else {
|
||||
softresetx86(); /*Pulse reset!*/
|
||||
cpu_set_edx();
|
||||
flushmmucache();
|
||||
@@ -1127,6 +1135,7 @@ write_output(atkbd_t *dev, uint8_t val)
|
||||
smbase = 0x00030000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Do this here to avoid an infinite reset loop. */
|
||||
dev->output_port = val;
|
||||
|
||||
@@ -51,6 +51,7 @@ enum {
|
||||
static int next_inst = 0;
|
||||
static serial_device_t serial_devices[SERIAL_MAX];
|
||||
|
||||
//#define ENABLE_SERIAL_CONSOLE 1
|
||||
#ifdef ENABLE_SERIAL_LOG
|
||||
int serial_do_log = ENABLE_SERIAL_LOG;
|
||||
|
||||
@@ -193,6 +194,15 @@ serial_transmit(serial_t *dev, uint8_t val)
|
||||
write_fifo(dev, val);
|
||||
else if (dev->sd->dev_write)
|
||||
dev->sd->dev_write(dev, dev->sd->priv, val);
|
||||
#ifdef ENABLE_SERIAL_CONSOLE
|
||||
if ((val >= ' ' && val <= '~') || val == '\r' || val == '\n') {
|
||||
fputc(val, stdout);
|
||||
if (val == '\n')
|
||||
fflush(stdout);
|
||||
} else {
|
||||
fprintf(stdout, "[%02X]", val);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -383,6 +383,14 @@ fdd_is_dd(int drive)
|
||||
return (drive_types[fdd[drive].type].flags & 0x70) == 0x10;
|
||||
}
|
||||
|
||||
#if 0
|
||||
int
|
||||
fdd_is_hd(int drive)
|
||||
{
|
||||
return drive_types[fdd[drive].type].flags & FLAG_HOLE1;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
fdd_is_ed(int drive)
|
||||
{
|
||||
|
||||
@@ -42,6 +42,9 @@ extern int fdd_can_read_medium(int drive);
|
||||
extern int fdd_doublestep_40(int drive);
|
||||
extern int fdd_is_525(int drive);
|
||||
extern int fdd_is_dd(int drive);
|
||||
#if 0
|
||||
extern int fdd_is_hd(int drive);
|
||||
#endif
|
||||
extern int fdd_is_ed(int drive);
|
||||
extern int fdd_is_double_sided(int drive);
|
||||
extern void fdd_set_head(int drive, int head);
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||
* Authors: Miran Grca, <mgrca8@gmail.com>
|
||||
*
|
||||
* Copyright 2020 Miran Grca.
|
||||
*/
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
*
|
||||
* Author: RichardG, <richardg867@gmail.com>
|
||||
* Authors: RichardG, <richardg867@gmail.com>
|
||||
*
|
||||
* Copyright 2020 RichardG.
|
||||
*/
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
#define MACHINE_SCSI_SEC 0x02000000 /* sys has int sec SCSI */
|
||||
#define MACHINE_USB_PRI 0x04000000 /* sys has int pri USB */
|
||||
#define MACHINE_USB_SEC 0x08000000 /* sys has int sec USB */
|
||||
#define MACHINE_COREBOOT 0x10000000 /* sys has coreboot BIOS */
|
||||
/* Combined flags. */
|
||||
#define MACHINE_IDE (MACHINE_IDE_PRI) /* sys has int single IDE/ATAPI - mark as pri IDE/ATAPI */
|
||||
#define MACHINE_IDE_DUAL (MACHINE_IDE_PRI | MACHINE_IDE_SEC) /* sys has int dual IDE/ATAPI - mark as both pri and sec IDE/ATAPI */
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
*
|
||||
* Definitions for the Super I/O chips.
|
||||
*
|
||||
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
|
||||
*
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
*/
|
||||
|
||||
|
||||
@@ -199,7 +199,6 @@ const machine_filter_t machine_chipsets[] = {
|
||||
Write Input Port, same as on AMIKey-3.
|
||||
*/
|
||||
|
||||
|
||||
const machine_t machines[] = {
|
||||
// clang-format off
|
||||
/* 8088 Machines */
|
||||
|
||||
Reference in New Issue
Block a user