Correct many file headers to show 86box

This commit is contained in:
Jasmine Iwanek
2022-10-27 17:08:58 -04:00
parent 94e1f6535c
commit f49d3c7458
52 changed files with 1454 additions and 1454 deletions

View File

@@ -1,22 +1,22 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Standard PC/AT implementation.
* Standard PC/AT implementation.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2017-2020 Fred N. van Kempen.
* Copyright 2016-2020 Miran Grca.
* Copyright 2008-2020 Sarah Walker.
* Copyright 2017-2020 Fred N. van Kempen.
* Copyright 2016-2020 Miran Grca.
* Copyright 2008-2020 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,22 +1,22 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Implementation of the Commodore PC3 system.
* Implementation of the Commodore PC3 system.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2017,2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2017,2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,131 +1,131 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Implementation of the Toshiba T3100e.
* Implementation of the Toshiba T3100e.
*
* The Toshiba 3100e is a 286-based portable.
* The Toshiba 3100e is a 286-based portable.
*
* To bring up the BIOS setup screen hold down the 'Fn' key
* on booting.
* To bring up the BIOS setup screen hold down the 'Fn' key
* on booting.
*
* Memory management
* ~~~~~~~~~~~~~~~~~
* Memory management
* ~~~~~~~~~~~~~~~~~
*
* Motherboard memory is divided into:
* - Conventional memory: Either 512k or 640k
* - Upper memory: Either 512k or 384k, depending on
* amount of conventional memory.
* Upper memory can be used as EMS or XMS.
* - High memory: 0-4Mb, depending on RAM installed.
* The BIOS setup screen allows some or
* all of this to be used as EMS; the
* remainder is XMS.
* Motherboard memory is divided into:
* - Conventional memory: Either 512k or 640k
* - Upper memory: Either 512k or 384k, depending on
* amount of conventional memory.
* Upper memory can be used as EMS or XMS.
* - High memory: 0-4Mb, depending on RAM installed.
* The BIOS setup screen allows some or
* all of this to be used as EMS; the
* remainder is XMS.
*
* Additional memory (either EMS or XMS) can also be provided
* by ISA expansion cards.
* Additional memory (either EMS or XMS) can also be provided
* by ISA expansion cards.
*
* Under test in PCem, the BIOS will boot with up to 65368Kb
* of memory in total (16Mb less 16k). However it will give
* an error with RAM sizes above 8Mb, if any of the high
* memory is allocated as EMS, because the builtin EMS page
* registers can only access up to 8Mb.
* Under test in PCem, the BIOS will boot with up to 65368Kb
* of memory in total (16Mb less 16k). However it will give
* an error with RAM sizes above 8Mb, if any of the high
* memory is allocated as EMS, because the builtin EMS page
* registers can only access up to 8Mb.
*
* Memory is controlled by writes to I/O port 8084h:
* Bit 7: Always 0 }
* Bit 6: Always 1 } These bits select which motherboard
* Bit 5: Always 0 } function to access.
* Bit 4: Set to treat upper RAM as XMS
* Bit 3: Enable external RAM boards?
* Bit 2: Set for 640k conventional memory, clear for 512k
* Bit 1: Enable RAM beyond 1Mb.
* Bit 0: Enable EMS.
* Memory is controlled by writes to I/O port 8084h:
* Bit 7: Always 0 }
* Bit 6: Always 1 } These bits select which motherboard
* Bit 5: Always 0 } function to access.
* Bit 4: Set to treat upper RAM as XMS
* Bit 3: Enable external RAM boards?
* Bit 2: Set for 640k conventional memory, clear for 512k
* Bit 1: Enable RAM beyond 1Mb.
* Bit 0: Enable EMS.
*
* The last value written to this port is saved at 0040:0093h,
* and in CMOS memory at offset 0x37. If the top bit of the
* CMOS byte is set, then high memory is being provided by
* an add-on card rather than the mainboard; accordingly,
* the BIOS will not allow high memory to be used as EMS.
* The last value written to this port is saved at 0040:0093h,
* and in CMOS memory at offset 0x37. If the top bit of the
* CMOS byte is set, then high memory is being provided by
* an add-on card rather than the mainboard; accordingly,
* the BIOS will not allow high memory to be used as EMS.
*
* EMS is controlled by 16 page registers:
* EMS is controlled by 16 page registers:
*
* Page mapped at 0xD000 0xD400 0xD800 0xDC00
* ------------------------------------------------------
* Pages 0x00-0x7F 0x208 0x4208 0x8208 0xc208
* Pages 0x80-0xFF 0x218 0x4218 0x8218 0xc218
* Pages 0x100-0x17F 0x258 0x4258 0x8258 0xc258
* Pages 0x180-0x1FF 0x268 0x4268 0x8268 0xc268
* Page mapped at 0xD000 0xD400 0xD800 0xDC00
* ------------------------------------------------------
* Pages 0x00-0x7F 0x208 0x4208 0x8208 0xc208
* Pages 0x80-0xFF 0x218 0x4218 0x8218 0xc218
* Pages 0x100-0x17F 0x258 0x4258 0x8258 0xc258
* Pages 0x180-0x1FF 0x268 0x4268 0x8268 0xc268
*
* The value written has bit 7 set to enable EMS, reset to
* disable it.
* The value written has bit 7 set to enable EMS, reset to
* disable it.
*
* So:
* OUT 0x208, 0x80 will page in the first 16k page at 0xD0000.
* OUT 0x208, 0x00 will page out EMS, leaving nothing at 0xD0000.
* OUT 0x4208, 0x80 will page in the first 16k page at 0xD4000.
* OUT 0x218, 0x80 will page in the 129th 16k page at 0xD0000.
* etc.
* So:
* OUT 0x208, 0x80 will page in the first 16k page at 0xD0000.
* OUT 0x208, 0x00 will page out EMS, leaving nothing at 0xD0000.
* OUT 0x4208, 0x80 will page in the first 16k page at 0xD4000.
* OUT 0x218, 0x80 will page in the 129th 16k page at 0xD0000.
* etc.
*
* To use EMS from DOS, you will need the Toshiba EMS driver
* (TOSHEMM.ZIP). This supports the above system, plus further
* ranges of ports at 0x_2A8, 0x_2B8, 0x_2C8.
* To use EMS from DOS, you will need the Toshiba EMS driver
* (TOSHEMM.ZIP). This supports the above system, plus further
* ranges of ports at 0x_2A8, 0x_2B8, 0x_2C8.
*
* Features not implemented:
* > Four video fonts.
* > BIOS-controlled mapping of serial ports to IRQs.
* > Custom keyboard controller. This has a number of extra
* commands in the 0xB0-0xBC range, for such things as turbo
* on/off, and switching the keyboard between AT and PS/2
* modes. Currently I have only implemented command 0xBB,
* so that self-test completes successfully. Commands include:
* Features not implemented:
* > Four video fonts.
* > BIOS-controlled mapping of serial ports to IRQs.
* > Custom keyboard controller. This has a number of extra
* commands in the 0xB0-0xBC range, for such things as turbo
* on/off, and switching the keyboard between AT and PS/2
* modes. Currently I have only implemented command 0xBB,
* so that self-test completes successfully. Commands include:
*
* 0xB0: Turbo on
* 0xB1: Turbo off
* 0xB2: Internal display on?
* 0xB3: Internal display off?
* 0xB5: Get settings byte (bottom bit is color/mono setting)
* 0xB6: Set settings byte
* 0xB7: Behave as 101-key PS/2 keyboard
* 0xB8: Behave as 84-key AT keyboard
* 0xBB: Return a byte, bit 2 is Fn key state, other bits unknown.
* 0xB0: Turbo on
* 0xB1: Turbo off
* 0xB2: Internal display on?
* 0xB3: Internal display off?
* 0xB5: Get settings byte (bottom bit is color/mono setting)
* 0xB6: Set settings byte
* 0xB7: Behave as 101-key PS/2 keyboard
* 0xB8: Behave as 84-key AT keyboard
* 0xBB: Return a byte, bit 2 is Fn key state, other bits unknown.
*
* The other main I/O port needed to POST is:
* 0x8084: System control.
* Top 3 bits give command, bottom 5 bits give parameters.
* 000 => set serial port IRQ / addresses
* bit 4: IRQ5 serial port base: 1 => 0x338, 0 => 0x3E8
* bits 3, 2, 0 specify serial IRQs for COM1, COM2, COM3:
* 00 0 => 4, 3, 5
* The other main I/O port needed to POST is:
* 0x8084: System control.
* Top 3 bits give command, bottom 5 bits give parameters.
* 000 => set serial port IRQ / addresses
* bit 4: IRQ5 serial port base: 1 => 0x338, 0 => 0x3E8
* bits 3, 2, 0 specify serial IRQs for COM1, COM2, COM3:
* 00 0 => 4, 3, 5
* 00 1 => 4, 5, 3
* 01 0 => 3, 4, 5
* 01 1 => 3, 5, 4
* 10 0 => 4, -, 3
* 10 1 => 3, -, 4
* 010 => set memory mappings
* bit 4 set if upper RAM is XMS
* bit 3 enable add-on memory boards beyond 5Mb?
* bit 2 set for 640k sysram, clear for 512k sysram
* bit 1 enable mainboard XMS
* bit 0 enable mainboard EMS
* 100 => set parallel mode / LCD settings
* bit 4 set for bidirectional parallel port
* bit 3 set to disable internal CGA
* bit 2 set for single-pixel LCD font
* bits 0,1 for display font
* 010 => set memory mappings
* bit 4 set if upper RAM is XMS
* bit 3 enable add-on memory boards beyond 5Mb?
* bit 2 set for 640k sysram, clear for 512k sysram
* bit 1 enable mainboard XMS
* bit 0 enable mainboard EMS
* 100 => set parallel mode / LCD settings
* bit 4 set for bidirectional parallel port
* bit 3 set to disable internal CGA
* bit 2 set for single-pixel LCD font
* bits 0,1 for display font
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2017,2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
* Copyright 2017,2018 Fred N. van Kempen.
* Copyright 2016-2018 Miran Grca.
* Copyright 2008-2018 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -486,7 +486,7 @@ t3100e_sys_in(uint16_t addr, void *p)
void
t3100e_sys_out(uint16_t addr, uint8_t val, void *p)
{
// struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p;
// struct t3100e_ems_regs *regs = (struct t3100e_ems_regs *)p;
switch (val & 0xE0) {
case 0x00: /* Set serial port IRQs. Not implemented */

View File

@@ -1,36 +1,36 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Implementation of the Toshiba 3100e plasma display.
* This display has a fixed 640x400 resolution.
* Implementation of the Toshiba 3100e plasma display.
* This display has a fixed 640x400 resolution.
*
* T3100e CRTC regs (from the ROM):
* T3100e CRTC regs (from the ROM):
*
* Selecting a character height of 3 seems to be sufficient to
* convert the 640x200 graphics mode to 640x400 (and, by
* analogy, 320x200 to 320x400).
* Selecting a character height of 3 seems to be sufficient to
* convert the 640x200 graphics mode to 640x400 (and, by
* analogy, 320x200 to 320x400).
*
* Horiz-----> Vert------> I ch
* 38 28 2D 0A 1F 06 19 1C 02 07 06 07 CO40
* 71 50 5A 0A 1F 06 19 1C 02 07 06 07 CO80
* 38 28 2D 0A 7F 06 64 70 02 01 06 07 Graphics
* 61 50 52 0F 19 06 19 19 02 0D 0B 0C MONO
* 2D 28 22 0A 67 00 64 67 02 03 06 07 640x400
* Horiz-----> Vert------> I ch
* 38 28 2D 0A 1F 06 19 1C 02 07 06 07 CO40
* 71 50 5A 0A 1F 06 19 1C 02 07 06 07 CO80
* 38 28 2D 0A 7F 06 64 70 02 01 06 07 Graphics
* 61 50 52 0F 19 06 19 19 02 0D 0B 0C MONO
* 2D 28 22 0A 67 00 64 67 02 03 06 07 640x400
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2016-2019 Miran Grca.
* Copyright 2008-2019 Sarah Walker.
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2016-2019 Miran Grca.
* Copyright 2008-2019 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -561,9 +561,9 @@ t3100e_recalcattrs(t3100e_t *t3100e)
* Bit 0: Attributes 01-06, 08-0E are inverse video
* Bit 1: Attributes 01-06, 08-0E are bold
* Bit 2: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF
* are inverse video
* are inverse video
* Bit 3: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF
* are bold */
* are bold */
/* Set up colours */
amber = makecol(0xf7, 0x7C, 0x34);

View File

@@ -1,74 +1,74 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Implementation of the PS/1 Model 2011 disk controller.
* Implementation of the PS/1 Model 2011 disk controller.
*
* XTA is the acronym for 'XT-Attached', which was basically
* the XT-counterpart to what we know now as IDE (which is
* also named ATA - AT Attachment.) The basic ideas was to
* put the actual drive controller electronics onto the drive
* itself, and have the host machine just talk to that using
* a simpe, standardized I/O path- hence the name IDE, for
* Integrated Drive Electronics.
* XTA is the acronym for 'XT-Attached', which was basically
* the XT-counterpart to what we know now as IDE (which is
* also named ATA - AT Attachment.) The basic ideas was to
* put the actual drive controller electronics onto the drive
* itself, and have the host machine just talk to that using
* a simpe, standardized I/O path- hence the name IDE, for
* Integrated Drive Electronics.
*
* In the ATA version of IDE, the programming interface of
* the IBM PC/AT (which used the Western Digitial 1002/1003
* controllers) was kept, and, so, ATA-IDE assumes a 16bit
* data path: it reads and writes 16bit words of data. The
* disk drives for this bus commonly have an 'A' suffix to
* identify them as 'ATBUS'.
* In the ATA version of IDE, the programming interface of
* the IBM PC/AT (which used the Western Digitial 1002/1003
* controllers) was kept, and, so, ATA-IDE assumes a 16bit
* data path: it reads and writes 16bit words of data. The
* disk drives for this bus commonly have an 'A' suffix to
* identify them as 'ATBUS'.
*
* In XTA-IDE, which is slightly older, the programming
* interface of the IBM PC/XT (which used the MFM controller
* from Xebec) was kept, and, so, it uses an 8bit data path.
* Disk drives for this bus commonly have the 'X' suffix to
* mark them as being for this XTBUS variant.
* In XTA-IDE, which is slightly older, the programming
* interface of the IBM PC/XT (which used the MFM controller
* from Xebec) was kept, and, so, it uses an 8bit data path.
* Disk drives for this bus commonly have the 'X' suffix to
* mark them as being for this XTBUS variant.
*
* So, XTA and ATA try to do the same thing, but they use
* different ways to achive their goal.
* So, XTA and ATA try to do the same thing, but they use
* different ways to achive their goal.
*
* Also, XTA is **not** the same as XTIDE. XTIDE is a modern
* variant of ATA-IDE, but retro-fitted for use on 8bit XT
* systems: an extra register is used to deal with the extra
* data byte per transfer. XTIDE uses regular IDE drives,
* and uses the regular ATA/IDE programming interface, just
* with the extra register.
* Also, XTA is **not** the same as XTIDE. XTIDE is a modern
* variant of ATA-IDE, but retro-fitted for use on 8bit XT
* systems: an extra register is used to deal with the extra
* data byte per transfer. XTIDE uses regular IDE drives,
* and uses the regular ATA/IDE programming interface, just
* with the extra register.
*
* NOTE: We should probably find a nicer way to integrate our Disk
* Type table with the main code, so the user can only select
* items from that list...
* NOTE: We should probably find a nicer way to integrate our Disk
* Type table with the main code, so the user can only select
* items from that list...
*
*
*
* Author: Fred N. van Kempen, <decwiz@yahoo.com>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
*
* Based on my earlier HD20 driver for the EuroPC.
* Thanks to Marco Bortolin for the help and feedback !!
* Based on my earlier HD20 driver for the EuroPC.
* Thanks to Marco Bortolin for the help and feedback !!
*
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2017-2019 Fred N. van Kempen.
*
* Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that the
* following conditions are met:
* Redistribution and use in source and binary forms, with
* or without modification, are permitted provided that the
* following conditions are met:
*
* 1. Redistributions of source code must retain the entire
* above notice, this list of conditions and the following
* disclaimer.
* 1. Redistributions of source code must retain the entire
* above notice, this list of conditions and the following
* disclaimer.
*
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
* 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the
* following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names
* of its contributors may be used to endorse or promote
* products derived from this software without specific
* prior written permission.
* 3. Neither the name of the copyright holder nor the names
* of its contributors may be used to endorse or promote
* products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
@@ -165,56 +165,56 @@ enum {
#pragma pack(push, 1)
typedef struct {
/* Status byte 0. */
uint8_t track_0 : 1, /* T0 */
mbz1 : 1, /* 0 */
mbz2 : 1, /* 0 */
cylinder_err : 1, /* CE */
write_fault : 1, /* WF */
mbz3 : 1, /* 0 */
seek_end : 1, /* SE */
not_ready : 1; /* NR */
uint8_t track_0 : 1, /* T0 */
mbz1 : 1, /* 0 */
mbz2 : 1, /* 0 */
cylinder_err : 1, /* CE */
write_fault : 1, /* WF */
mbz3 : 1, /* 0 */
seek_end : 1, /* SE */
not_ready : 1; /* NR */
/* Status byte 1. */
uint8_t id_not_found : 1, /* ID */
mbz4 : 1, /* 0 */
mbz5 : 1, /* 0 */
wrong_cyl : 1, /* WC */
all_bit_set : 1, /* BT */
mark_not_found : 1, /* AM */
ecc_crc_err : 1, /* ET */
ecc_crc_field : 1; /* EF */
uint8_t id_not_found : 1, /* ID */
mbz4 : 1, /* 0 */
mbz5 : 1, /* 0 */
wrong_cyl : 1, /* WC */
all_bit_set : 1, /* BT */
mark_not_found : 1, /* AM */
ecc_crc_err : 1, /* ET */
ecc_crc_field : 1; /* EF */
/* Status byte 2. */
uint8_t headsel_state : 4, /* headsel state[4] */
defective_sector : 1, /* DS */
retried_ok : 1, /* RG */
need_reset : 1, /* RR */
uint8_t headsel_state : 4, /* headsel state[4] */
defective_sector : 1, /* DS */
retried_ok : 1, /* RG */
need_reset : 1, /* RR */
#if 1
valid : 1; /* 0 (abused as VALID) */
valid : 1; /* 0 (abused as VALID) */
#else
mbz6 : 1; /* 0 */
mbz6 : 1; /* 0 */
#endif
/* Most recent ID field seen. */
uint8_t last_cyl_low; /* Cyl_Low[8] */
uint8_t last_head : 4, /* HD[4] */
mbz7 : 1, /* 0 */
last_cyl_high : 2, /* Cyl_high[2] */
last_def_sect : 1; /* DS */
uint8_t last_sect; /* Sect[8] */
uint8_t last_cyl_low; /* Cyl_Low[8] */
uint8_t last_head : 4, /* HD[4] */
mbz7 : 1, /* 0 */
last_cyl_high : 2, /* Cyl_high[2] */
last_def_sect : 1; /* DS */
uint8_t last_sect; /* Sect[8] */
uint8_t sect_size; /* Size[8] = 02 */
uint8_t sect_size; /* Size[8] = 02 */
/* Current position. */
uint8_t curr_cyl_high : 2, /* Cyl_High_[2] */
mbz8 : 1, /* 0 */
mbz9 : 1, /* 0 */
curr_head : 4; /* HD_2[4] */
uint8_t curr_cyl_low; /* Cyl_Low_2[8] */
uint8_t curr_cyl_high : 2, /* Cyl_High_[2] */
mbz8 : 1, /* 0 */
mbz9 : 1, /* 0 */
curr_head : 4; /* HD_2[4] */
uint8_t curr_cyl_low; /* Cyl_Low_2[8] */
uint8_t sect_corr; /* sectors corrected */
uint8_t sect_corr; /* sectors corrected */
uint8_t retries; /* retries */
uint8_t retries; /* retries */
/*
* This byte shows the progress of the controller through the
@@ -235,7 +235,7 @@ typedef struct {
* transfer:
*
* Bit 7 A sector was transferred between the system
* and the sector buffer.
* and the sector buffer.
*
* Bit 6 A sector was transferred between the controller
* and the sector buffer.
@@ -249,11 +249,11 @@ typedef struct {
* 4. When the transfer is complete, the low nibble equals hex 4
* and the high nibble is unchanged.
*/
uint8_t cmd_syndrome; /* command syndrome */
uint8_t cmd_syndrome; /* command syndrome */
uint8_t drive_type; /* drive type */
uint8_t drive_type; /* drive type */
uint8_t rsvd; /* reserved byte */
uint8_t rsvd; /* reserved byte */
} ssb_t;
#pragma pack(pop)
@@ -293,20 +293,20 @@ typedef struct {
*/
#pragma pack(push, 1)
typedef struct {
uint8_t cyl_high : 2, /* cylinder [9:8] bits */
defective_sector : 1, /* DS */
mbz1 : 1, /* 0 */
head : 4; /* head number */
uint8_t cyl_high : 2, /* cylinder [9:8] bits */
defective_sector : 1, /* DS */
mbz1 : 1, /* 0 */
head : 4; /* head number */
uint8_t cyl_low; /* cylinder [7:0] bits */
uint8_t cyl_low; /* cylinder [7:0] bits */
uint8_t sector; /* sector number */
uint8_t sector; /* sector number */
uint8_t mbz2 : 1, /* 0 */
mbo : 1, /* 1 */
mbz3 : 6; /* 000000 */
uint8_t mbz2 : 1, /* 0 */
mbo : 1, /* 1 */
mbz3 : 6; /* 000000 */
uint8_t fill; /* filler byte */
uint8_t fill; /* filler byte */
} fcb_t;
#pragma pack(pop)
@@ -319,25 +319,25 @@ typedef struct {
*/
#pragma pack(push, 1)
typedef struct {
uint8_t ec_p : 1, /* EC/P (ecc/park) */
mbz1 : 1, /* 0 */
auto_seek : 1, /* AS (auto-seek) */
no_data : 1, /* ND (no data) */
cmd : 4; /* command code[4] */
uint8_t ec_p : 1, /* EC/P (ecc/park) */
mbz1 : 1, /* 0 */
auto_seek : 1, /* AS (auto-seek) */
no_data : 1, /* ND (no data) */
cmd : 4; /* command code[4] */
uint8_t cyl_high : 2, /* cylinder [9:8] bits */
mbz2 : 2, /* 00 */
head : 4; /* head number */
uint8_t cyl_high : 2, /* cylinder [9:8] bits */
mbz2 : 2, /* 00 */
head : 4; /* head number */
uint8_t cyl_low; /* cylinder [7:0] bits */
uint8_t cyl_low; /* cylinder [7:0] bits */
uint8_t sector; /* sector number */
uint8_t sector; /* sector number */
uint8_t mbz3 : 1, /* 0 */
mbo1 : 1, /* 1 */
mbz4 : 6; /* 000000 */
uint8_t mbz3 : 1, /* 0 */
mbo1 : 1, /* 1 */
mbz4 : 6; /* 000000 */
uint8_t count; /* blk count/interleave */
uint8_t count; /* blk count/interleave */
} ccb_t;
#pragma pack(pop)
@@ -417,51 +417,51 @@ typedef struct {
*/
static const geom_t ibm_type_table[] = {
// clang-format off
{ 0, 0, 0, 0, 0 }, /* 0 (none) */
{ 306, 4, 17, 128, 305 }, /* 1 10 MB */
{ 615, 4, 17, 300, 615 }, /* 2 20 MB */
{ 615, 6, 17, 300, 615 }, /* 3 31 MB */
{ 940, 8, 17, 512, 940 }, /* 4 62 MB */
{ 940, 6, 17, 512, 940 }, /* 5 47 MB */
{ 615, 4, 17, -1, 615 }, /* 6 20 MB */
{ 462, 8, 17, 256, 511 }, /* 7 31 MB */
{ 733, 5, 17, -1, 733 }, /* 8 30 MB */
{ 900, 15, 17, -1, 901 }, /* 9 112 MB */
{ 820, 3, 17, -1, 820 }, /* 10 20 MB */
{ 855, 5, 17, -1, 855 }, /* 11 35 MB */
{ 855, 7, 17, -1, 855 }, /* 12 50 MB */
{ 306, 8, 17, 128, 319 }, /* 13 20 MB */
{ 733, 7, 17, -1, 733 }, /* 14 43 MB */
{ 0, 0, 0, 0, 0 }, /* 15 (rsvd) */
{ 612, 4, 17, 0, 663 }, /* 16 20 MB */
{ 977, 5, 17, 300, 977 }, /* 17 41 MB */
{ 977, 7, 17, -1, 977 }, /* 18 57 MB */
{ 1024, 7, 17, 512, 1023 }, /* 19 59 MB */
{ 733, 5, 17, 300, 732 }, /* 20 30 MB */
{ 733, 7, 17, 300, 732 }, /* 21 43 MB */
{ 733, 5, 17, 300, 733 }, /* 22 30 MB */
{ 306, 4, 17, 0, 336 }, /* 23 10 MB */
{ 612, 4, 17, 305, 663 }, /* 24 20 MB */
{ 306, 4, 17, -1, 340 }, /* 25 10 MB */
{ 612, 4, 17, -1, 670 }, /* 26 20 MB */
{ 698, 7, 17, 300, 732 }, /* 27 41 MB */
{ 976, 5, 17, 488, 977 }, /* 28 40 MB */
{ 306, 4, 17, 0, 340 }, /* 29 10 MB */
{ 611, 4, 17, 306, 663 }, /* 30 20 MB */
{ 732, 7, 17, 300, 732 }, /* 31 43 MB */
{ 1023, 5, 17, -1, 1023 }, /* 32 42 MB */
{ 614, 4, 25, -1, 663 }, /* 33 30 MB */
{ 775, 2, 27, -1, 900 }, /* 34 20 MB */
{ 921, 2, 33, -1, 1000 }, /* 35 30 MB * */
{ 402, 4, 26, -1, 460 }, /* 36 20 MB */
{ 580, 6, 26, -1, 640 }, /* 37 44 MB */
{ 845, 2, 36, -1, 1023 }, /* 38 30 MB * */
{ 769, 3, 36, -1, 1023 }, /* 39 41 MB * */
{ 531, 4, 39, -1, 532 }, /* 40 40 MB */
{ 577, 2, 36, -1, 1023 }, /* 41 20 MB */
{ 654, 2, 32, -1, 674 }, /* 42 20 MB */
{ 923, 5, 36, -1, 1023 }, /* 43 81 MB */
{ 531, 8, 39, -1, 532 } /* 44 81 MB */
{ 0, 0, 0, 0, 0 }, /* 0 (none) */
{ 306, 4, 17, 128, 305 }, /* 1 10 MB */
{ 615, 4, 17, 300, 615 }, /* 2 20 MB */
{ 615, 6, 17, 300, 615 }, /* 3 31 MB */
{ 940, 8, 17, 512, 940 }, /* 4 62 MB */
{ 940, 6, 17, 512, 940 }, /* 5 47 MB */
{ 615, 4, 17, -1, 615 }, /* 6 20 MB */
{ 462, 8, 17, 256, 511 }, /* 7 31 MB */
{ 733, 5, 17, -1, 733 }, /* 8 30 MB */
{ 900, 15, 17, -1, 901 }, /* 9 112 MB */
{ 820, 3, 17, -1, 820 }, /* 10 20 MB */
{ 855, 5, 17, -1, 855 }, /* 11 35 MB */
{ 855, 7, 17, -1, 855 }, /* 12 50 MB */
{ 306, 8, 17, 128, 319 }, /* 13 20 MB */
{ 733, 7, 17, -1, 733 }, /* 14 43 MB */
{ 0, 0, 0, 0, 0 }, /* 15 (rsvd) */
{ 612, 4, 17, 0, 663 }, /* 16 20 MB */
{ 977, 5, 17, 300, 977 }, /* 17 41 MB */
{ 977, 7, 17, -1, 977 }, /* 18 57 MB */
{ 1024, 7, 17, 512, 1023 }, /* 19 59 MB */
{ 733, 5, 17, 300, 732 }, /* 20 30 MB */
{ 733, 7, 17, 300, 732 }, /* 21 43 MB */
{ 733, 5, 17, 300, 733 }, /* 22 30 MB */
{ 306, 4, 17, 0, 336 }, /* 23 10 MB */
{ 612, 4, 17, 305, 663 }, /* 24 20 MB */
{ 306, 4, 17, -1, 340 }, /* 25 10 MB */
{ 612, 4, 17, -1, 670 }, /* 26 20 MB */
{ 698, 7, 17, 300, 732 }, /* 27 41 MB */
{ 976, 5, 17, 488, 977 }, /* 28 40 MB */
{ 306, 4, 17, 0, 340 }, /* 29 10 MB */
{ 611, 4, 17, 306, 663 }, /* 30 20 MB */
{ 732, 7, 17, 300, 732 }, /* 31 43 MB */
{ 1023, 5, 17, -1, 1023 }, /* 32 42 MB */
{ 614, 4, 25, -1, 663 }, /* 33 30 MB */
{ 775, 2, 27, -1, 900 }, /* 34 20 MB */
{ 921, 2, 33, -1, 1000 }, /* 35 30 MB * */
{ 402, 4, 26, -1, 460 }, /* 36 20 MB */
{ 580, 6, 26, -1, 640 }, /* 37 44 MB */
{ 845, 2, 36, -1, 1023 }, /* 38 30 MB * */
{ 769, 3, 36, -1, 1023 }, /* 39 41 MB * */
{ 531, 4, 39, -1, 532 }, /* 40 40 MB */
{ 577, 2, 36, -1, 1023 }, /* 41 20 MB */
{ 654, 2, 32, -1, 674 }, /* 42 20 MB */
{ 923, 5, 36, -1, 1023 }, /* 43 81 MB */
{ 531, 8, 39, -1, 532 } /* 44 81 MB */
// clang-format on
};
@@ -663,7 +663,7 @@ do_format(hdc_t *dev, drive_t *drive, ccb_t *ccb)
/* Point to the FCB we got. */
#if 0
fcb = (fcb_t *)dev->data;
fcb = (fcb_t *)dev->data;
#endif
dev->state = STATE_FINIT;
/*FALLTHROUGH*/
@@ -693,7 +693,7 @@ do_fmt:
* use it's "filler byte" value...
*/
#if 0
hdd_image_zero_ex(drive->hdd_num, addr, fcb->fill, drive->spt);
hdd_image_zero_ex(drive->hdd_num, addr, fcb->fill, drive->spt);
#else
hdd_image_zero(drive->hdd_num, addr, drive->spt);
#endif

View File

@@ -1,22 +1,22 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Implementation of MCA-based PS/2 machines.
* Implementation of MCA-based PS/2 machines.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2016-2019 Miran Grca.
* Copyright 2008-2019 Sarah Walker.
* Copyright 2017-2019 Fred N. van Kempen.
* Copyright 2016-2019 Miran Grca.
* Copyright 2008-2019 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,65 +1,65 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Implementation of the Toshiba T1000 and T1200 portables.
* Implementation of the Toshiba T1000 and T1200 portables.
*
* The T1000 is the T3100e's little brother -- a real laptop
* with a rechargeable battery.
* The T1000 is the T3100e's little brother -- a real laptop
* with a rechargeable battery.
*
* Features: 80C88 at 4.77MHz
* - 512k system RAM
* - 640x200 monochrome LCD
* - 82-key keyboard
* - Real-time clock. Not the normal 146818, but a TC8521,
* which is a 4-bit chip.
* - A ROM drive (128k, 256k or 512k) which acts as a mini
* hard drive and contains a copy of DOS 2.11.
* - 160 bytes of non-volatile RAM for the CONFIG.SYS used
* when booting from the ROM drive. Possibly physically
* located in the keyboard controller RAM.
* Features: 80C88 at 4.77MHz
* - 512k system RAM
* - 640x200 monochrome LCD
* - 82-key keyboard
* - Real-time clock. Not the normal 146818, but a TC8521,
* which is a 4-bit chip.
* - A ROM drive (128k, 256k or 512k) which acts as a mini
* hard drive and contains a copy of DOS 2.11.
* - 160 bytes of non-volatile RAM for the CONFIG.SYS used
* when booting from the ROM drive. Possibly physically
* located in the keyboard controller RAM.
*
* An optional memory expansion board can be fitted. This adds
* 768k of RAM, which can be used for up to three purposes:
* > Conventional memory -- 128k between 512k and 640k
* > HardRAM -- a battery-backed RAM drive.
* > EMS
* An optional memory expansion board can be fitted. This adds
* 768k of RAM, which can be used for up to three purposes:
* > Conventional memory -- 128k between 512k and 640k
* > HardRAM -- a battery-backed RAM drive.
* > EMS
*
* This means that there are up to three different
* implementations of non-volatile RAM in the same computer
* (52 nibbles in the TC8521, 160 bytes of CONFIG.SYS, and
* up to 768k of HardRAM).
* This means that there are up to three different
* implementations of non-volatile RAM in the same computer
* (52 nibbles in the TC8521, 160 bytes of CONFIG.SYS, and
* up to 768k of HardRAM).
*
* The T1200 is a slightly upgraded version with a turbo mode
* (double CPU clock, 9.54MHz) and an optional hard drive.
* The interface for this is proprietary both at the physical
* and programming level.
* The T1200 is a slightly upgraded version with a turbo mode
* (double CPU clock, 9.54MHz) and an optional hard drive.
* The interface for this is proprietary both at the physical
* and programming level.
*
* 01F2h: If hard drive is present, low 4 bits are 0Ch [20Mb]
* or 0Dh [10Mb].
* 01F2h: If hard drive is present, low 4 bits are 0Ch [20Mb]
* or 0Dh [10Mb].
*
* The hard drive is a 20MB (615/2/26) RLL 3.5" drive.
* The hard drive is a 20MB (615/2/26) RLL 3.5" drive.
*
* The TC8521 is a 4-bit RTC, so each memory location can only
* hold a single BCD digit. Hence everything has 'ones' and
* 'tens' digits.
* The TC8521 is a 4-bit RTC, so each memory location can only
* hold a single BCD digit. Hence everything has 'ones' and
* 'tens' digits.
*
* NOTE: Still need to figure out a way to load/save ConfigSys and
* HardRAM stuff. Needs to be linked in to the NVR code.
* NOTE: Still need to figure out a way to load/save ConfigSys and
* HardRAM stuff. Needs to be linked in to the NVR code.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2018,2019 Fred N. van Kempen.
* Copyright 2018,2019 Miran Grca.
* Copyright 2018,2019 Sarah Walker.
* Copyright 2018,2019 Fred N. van Kempen.
* Copyright 2018,2019 Miran Grca.
* Copyright 2018,2019 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by

View File

@@ -1,23 +1,23 @@
/*
* VARCem Virtual ARchaeological Computer EMulator.
* An emulator of (mostly) x86-based PC systems and devices,
* using the ISA,EISA,VLB,MCA and PCI system buses, roughly
* spanning the era between 1981 and 1995.
* 86Box A hypervisor and IBM PC system emulator that specializes in
* running old operating systems and software designed for IBM
* PC systems and compatibles from 1981 through fairly recent
* system designs based on the PCI bus.
*
* This file is part of the VARCem Project.
* This file is part of the 86Box distribution.
*
* Implementation of the Toshiba T1000 plasma display, which
* has a fixed resolution of 640x200 pixels.
* Implementation of the Toshiba T1000 plasma display, which
* has a fixed resolution of 640x200 pixels.
*
*
*
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
* Authors: Fred N. van Kempen, <decwiz@yahoo.com>
* Miran Grca, <mgrca8@gmail.com>
* Sarah Walker, <tommowalker@tommowalker.co.uk>
*
* Copyright 2018,2019 Fred N. van Kempen.
* Copyright 2018,2019 Miran Grca.
* Copyright 2018,2019 Sarah Walker.
* Copyright 2018,2019 Fred N. van Kempen.
* Copyright 2018,2019 Miran Grca.
* Copyright 2018,2019 Sarah Walker.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -546,9 +546,9 @@ t1000_recalcattrs(t1000_t *t1000)
* Bit 0: Attributes 01-06, 08-0E are inverse video
* Bit 1: Attributes 01-06, 08-0E are bold
* Bit 2: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF
* are inverse video
* are inverse video
* Bit 3: Attributes 11-16, 18-1F, 21-26, 28-2F ... F1-F6, F8-FF
* are bold */
* are bold */
/* Set up colours */
if (t1000->invert) {