mirror of
https://github.com/86Box/86Box.git
synced 2026-02-23 18:08:20 -07:00
Merge remote-tracking branch 'upstream/master' into feature/mtrr
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
* Copyright 2008-2020 Sarah Walker.
|
||||
* Copyright 2016-2020 Miran Grca.
|
||||
* Copyright 2017-2020 Fred N. van Kempen.
|
||||
* Copyright 2021 Laci bá'
|
||||
* Copyright 2021 dob205
|
||||
* Copyright 2021 Laci bá'
|
||||
* Copyright 2021 dob205
|
||||
*/
|
||||
#include <inttypes.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -667,14 +667,16 @@ ropFCHS(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeb
|
||||
return op_pc; \
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
opFLDimm(1, 1.0)
|
||||
opFLDimm(L2T, 3.3219280948873623)
|
||||
opFLDimm(L2E, 1.4426950408889634);
|
||||
opFLDimm(L2T, 3.3219280948873623)
|
||||
opFLDimm(L2E, 1.4426950408889634);
|
||||
opFLDimm(PI, 3.141592653589793);
|
||||
opFLDimm(EG2, 0.3010299956639812);
|
||||
opFLDimm(Z, 0.0)
|
||||
// clang-format on
|
||||
|
||||
static uint32_t ropFLDLN2(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
static uint32_t ropFLDLN2(uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc, codeblock_t *block)
|
||||
{
|
||||
FP_ENTER();
|
||||
FP_LOAD_IMM_Q(0x3fe62e42fefa39f0ull);
|
||||
|
||||
@@ -485,48 +485,51 @@ codegen_flush(void)
|
||||
return;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static int opcode_modrm[256] = {
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*00*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*10*/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 1, 1, 1, 1, /*90*/
|
||||
0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, /*a0*/
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, /*b0*/
|
||||
|
||||
1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, /*c0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*d0*/
|
||||
0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*e0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, /*c0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*d0*/
|
||||
0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*e0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
};
|
||||
// clang-format off
|
||||
|
||||
void
|
||||
codegen_debug(void)
|
||||
|
||||
@@ -1627,48 +1627,51 @@ codegen_flush(void)
|
||||
return;
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static int opcode_modrm[256] = {
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*00*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*10*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*20*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*30*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0,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 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, /*c0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*d0*/
|
||||
0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*e0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, /*c0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*d0*/
|
||||
0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*e0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void
|
||||
codegen_debug(void)
|
||||
|
||||
@@ -322,48 +322,51 @@ codegen_generate_ea(ir_data_t *ir, x86seg *op_ea_seg, uint32_t fetchdat, int op_
|
||||
return codegen_generate_ea_16_long(ir, op_ea_seg, fetchdat, op_ssegs, op_pc);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
static uint8_t opcode_modrm[256] = {
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*00*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*10*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*20*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*30*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*00*/
|
||||
1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, /*10*/
|
||||
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, 0, 1, 1, 1, 0, 1, /*d0*/
|
||||
0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*e0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, /*c0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*d0*/
|
||||
0, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 1, /*e0*/
|
||||
0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 0 /*f0*/
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
void
|
||||
codegen_generate_call(uint8_t opcode, OpFn op, uint32_t fetchdat, uint32_t new_pc, uint32_t old_pc)
|
||||
|
||||
@@ -37,16 +37,18 @@
|
||||
return op_pc + 2; \
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
ropParith(PFADD)
|
||||
ropParith(PFCMPEQ)
|
||||
ropParith(PFCMPGE)
|
||||
ropParith(PFCMPGT)
|
||||
ropParith(PFMAX)
|
||||
ropParith(PFMIN)
|
||||
ropParith(PFMUL)
|
||||
ropParith(PFSUB)
|
||||
ropParith(PFCMPEQ)
|
||||
ropParith(PFCMPGE)
|
||||
ropParith(PFCMPGT)
|
||||
ropParith(PFMAX)
|
||||
ropParith(PFMIN)
|
||||
ropParith(PFMUL)
|
||||
ropParith(PFSUB)
|
||||
// clang-format on
|
||||
|
||||
uint32_t ropPF2ID(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
|
||||
uint32_t ropPF2ID(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc)
|
||||
{
|
||||
int dest_reg = (fetchdat >> 3) & 7;
|
||||
|
||||
|
||||
@@ -423,8 +423,10 @@ ropFUCOMPP(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat,
|
||||
return op_pc + 1; \
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
ropF_arith_mem(s, uop_MEM_LOAD_SINGLE)
|
||||
ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
|
||||
ropF_arith_mem(d, uop_MEM_LOAD_DOUBLE)
|
||||
// clang-format on
|
||||
|
||||
#define ropFI_arith_mem(name, temp_reg) \
|
||||
uint32_t ropFIADD##name(codeblock_t *block, ir_data_t *ir, uint8_t opcode, uint32_t fetchdat, uint32_t op_32, uint32_t op_pc) \
|
||||
|
||||
@@ -172,36 +172,42 @@ typedef struct {
|
||||
const cpu_legacy_table_t **tables;
|
||||
} cpu_legacy_machine_t;
|
||||
|
||||
#define C_FLAG 0x0001
|
||||
#define P_FLAG 0x0004
|
||||
#define A_FLAG 0x0010
|
||||
#define Z_FLAG 0x0040
|
||||
#define N_FLAG 0x0080
|
||||
#define T_FLAG 0x0100
|
||||
#define I_FLAG 0x0200
|
||||
#define D_FLAG 0x0400
|
||||
#define V_FLAG 0x0800
|
||||
#define NT_FLAG 0x4000
|
||||
#define MD_FLAG 0x8000
|
||||
#define C_FLAG 0x0001
|
||||
#define P_FLAG 0x0004
|
||||
#define A_FLAG 0x0010
|
||||
#define Z_FLAG 0x0040
|
||||
#define N_FLAG 0x0080
|
||||
#define T_FLAG 0x0100
|
||||
#define I_FLAG 0x0200
|
||||
#define D_FLAG 0x0400
|
||||
#define V_FLAG 0x0800
|
||||
#define NT_FLAG 0x4000
|
||||
#define MD_FLAG 0x8000
|
||||
|
||||
#define RF_FLAG 0x0001 /* in EFLAGS */
|
||||
#define VM_FLAG 0x0002 /* in EFLAGS */
|
||||
#define VIF_FLAG 0x0008 /* in EFLAGS */
|
||||
#define VIP_FLAG 0x0010 /* in EFLAGS */
|
||||
#define VID_FLAG 0x0020 /* in EFLAGS */
|
||||
#define RF_FLAG 0x0001 /* in EFLAGS */
|
||||
#define VM_FLAG 0x0002 /* in EFLAGS */
|
||||
#define VIF_FLAG 0x0008 /* in EFLAGS */
|
||||
#define VIP_FLAG 0x0010 /* in EFLAGS */
|
||||
#define VID_FLAG 0x0020 /* in EFLAGS */
|
||||
|
||||
#define WP_FLAG 0x10000 /* in CR0 */
|
||||
#define CR4_VME (1 << 0)
|
||||
#define CR4_PVI (1 << 1)
|
||||
#define CR4_PSE (1 << 4)
|
||||
#define CR4_PAE (1 << 5)
|
||||
#define CR4_PGE (1 << 7)
|
||||
#define WP_FLAG 0x10000 /* in CR0 */
|
||||
|
||||
#define CPL ((cpu_state.seg_cs.access >> 5) & 3)
|
||||
#define CR4_VME (1 << 0) /* Virtual 8086 Mode Extensions */
|
||||
#define CR4_PVI (1 << 1) /* Protected-mode Virtual Interrupts */
|
||||
#define CR4_TSD (1 << 2) /* Time Stamp Disable */
|
||||
#define CR4_DE (1 << 3) /* Debugging Extensions */
|
||||
#define CR4_PSE (1 << 4) /* Page Size Extension */
|
||||
#define CR4_PAE (1 << 5) /* Physical Address Extension */
|
||||
#define CR4_MCE (1 << 6) /* Machine Check Exception */
|
||||
#define CR4_PGE (1 << 7) /* Page Global Enabled */
|
||||
#define CR4_PCE (1 << 8) /* Performance-Monitoring Counter enable */
|
||||
#define CR4_OSFXSR (1 << 9) /* Operating system support for FXSAVE and FXRSTOR instructions */
|
||||
|
||||
#define IOPL ((cpu_state.flags >> 12) & 3)
|
||||
#define CPL ((cpu_state.seg_cs.access >> 5) & 3)
|
||||
|
||||
#define IOPLp ((!(msw & 1)) || (CPL <= IOPL))
|
||||
#define IOPL ((cpu_state.flags >> 12) & 3)
|
||||
|
||||
#define IOPLp ((!(msw & 1)) || (CPL <= IOPL))
|
||||
|
||||
typedef union {
|
||||
uint32_t l;
|
||||
@@ -468,15 +474,9 @@ COMPILE_TIME_ASSERT(sizeof(cpu_state_t) <= 128)
|
||||
# define fpu_cycles cpu_state._fpu_cycles
|
||||
#endif
|
||||
|
||||
#define cpu_rm cpu_state.rm_data.rm_mod_reg.rm
|
||||
#define cpu_mod cpu_state.rm_data.rm_mod_reg.mod
|
||||
#define cpu_reg cpu_state.rm_data.rm_mod_reg.reg
|
||||
|
||||
#define CR4_TSD (1 << 2)
|
||||
#define CR4_DE (1 << 3)
|
||||
#define CR4_MCE (1 << 6)
|
||||
#define CR4_PCE (1 << 8)
|
||||
#define CR4_OSFXSR (1 << 9)
|
||||
#define cpu_rm cpu_state.rm_data.rm_mod_reg.rm
|
||||
#define cpu_mod cpu_state.rm_data.rm_mod_reg.mod
|
||||
#define cpu_reg cpu_state.rm_data.rm_mod_reg.reg
|
||||
|
||||
/* Global variables. */
|
||||
extern cpu_state_t cpu_state;
|
||||
|
||||
@@ -125,25 +125,27 @@
|
||||
return 0; \
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
opFPU(s, x87_ts, 16, t.i, geteal, t.s, _32)
|
||||
#ifndef FPU_8087
|
||||
opFPU(s, x87_ts, 32, t.i, geteal, t.s, _32)
|
||||
#endif
|
||||
opFPU(d, x87_td, 16, t.i, geteaq, t.d, _64)
|
||||
opFPU(d, x87_td, 16, t.i, geteaq, t.d, _64)
|
||||
#ifndef FPU_8087
|
||||
opFPU(d, x87_td, 32, t.i, geteaq, t.d, _64)
|
||||
opFPU(d, x87_td, 32, t.i, geteaq, t.d, _64)
|
||||
#endif
|
||||
|
||||
opFPU(iw, uint16_t, 16, t, geteaw, (double) (int16_t) t, _i16)
|
||||
opFPU(iw, uint16_t, 16, t, geteaw, (double) (int16_t) t, _i16)
|
||||
#ifndef FPU_8087
|
||||
opFPU(iw, uint16_t, 32, t, geteaw, (double) (int16_t) t, _i16)
|
||||
opFPU(iw, uint16_t, 32, t, geteaw, (double) (int16_t) t, _i16)
|
||||
#endif
|
||||
opFPU(il, uint32_t, 16, t, geteal, (double) (int32_t) t, _i32)
|
||||
opFPU(il, uint32_t, 16, t, geteal, (double) (int32_t) t, _i32)
|
||||
#ifndef FPU_8087
|
||||
opFPU(il, uint32_t, 32, t, geteal, (double) (int32_t) t, _i32)
|
||||
opFPU(il, uint32_t, 32, t, geteal, (double) (int32_t) t, _i32)
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
static int opFADD(uint32_t fetchdat)
|
||||
static int opFADD(uint32_t fetchdat)
|
||||
{
|
||||
FP_ENTER();
|
||||
cpu_state.pc++;
|
||||
|
||||
@@ -82,10 +82,11 @@
|
||||
#include <86box/pic.h>
|
||||
#include <86box/isartc.h>
|
||||
|
||||
#define ISARTC_EV170 0
|
||||
#define ISARTC_DTK 1
|
||||
#define ISARTC_P5PAK 2
|
||||
#define ISARTC_A6PAK 3
|
||||
#define ISARTC_EV170 0
|
||||
#define ISARTC_DTK 1
|
||||
#define ISARTC_P5PAK 2
|
||||
#define ISARTC_A6PAK 3
|
||||
#define ISARTC_VENDEX 4
|
||||
|
||||
#define ISARTC_DEBUG 0
|
||||
|
||||
@@ -544,6 +545,18 @@ isartc_init(const device_t *info)
|
||||
dev->year = MM67_AL_DOM; /* year, NON STANDARD */
|
||||
break;
|
||||
|
||||
case ISARTC_VENDEX: /* Vendex HeadStart Turbo 888-XT RTC */
|
||||
dev->flags |= FLAG_YEAR80 | FLAG_YEARBCD;
|
||||
dev->base_addr = 0x0300;
|
||||
dev->base_addrsz = 32;
|
||||
dev->f_rd = mm67_read;
|
||||
dev->f_wr = mm67_write;
|
||||
dev->nvr.reset = mm67_reset;
|
||||
dev->nvr.start = mm67_start;
|
||||
dev->nvr.tick = mm67_tick;
|
||||
dev->year = MM67_AL_DOM; /* year, NON STANDARD */
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -559,7 +572,7 @@ isartc_init(const device_t *info)
|
||||
dev->f_rd, NULL, NULL, dev->f_wr, NULL, NULL, dev);
|
||||
|
||||
/* Hook into the NVR backend. */
|
||||
dev->nvr.fn = isartc_get_internal_name(isartc_type);
|
||||
dev->nvr.fn = (char *)info->internal_name;
|
||||
dev->nvr.irq = dev->irq;
|
||||
if (!is_at)
|
||||
nvr_init(&dev->nvr);
|
||||
@@ -709,6 +722,21 @@ static const device_t a6pak_device = {
|
||||
.config = a6pak_config
|
||||
};
|
||||
|
||||
/* Onboard RTC devices */
|
||||
const device_t vendex_xt_rtc_onboard_device = {
|
||||
.name = "National Semiconductor MM58167 (Vendex)",
|
||||
.internal_name = "vendex_xt_rtc",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = ISARTC_VENDEX,
|
||||
.init = isartc_init,
|
||||
.close = isartc_close,
|
||||
.reset = NULL,
|
||||
{ .available = NULL },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config = NULL
|
||||
};
|
||||
|
||||
static const device_t isartc_none_device = {
|
||||
.name = "None",
|
||||
.internal_name = "none",
|
||||
|
||||
@@ -13,5 +13,6 @@
|
||||
# Copyright 2020,2021 David Hrdlička.
|
||||
#
|
||||
|
||||
add_library(fdd OBJECT fdd.c fdc.c fdc_magitronic.c fdc_pii15xb.c fdi2raw.c fdd_common.c
|
||||
fdd_86f.c fdd_fdi.c fdd_imd.c fdd_img.c fdd_json.c fdd_mfm.c fdd_td0.c)
|
||||
add_library(fdd OBJECT fdd.c fdc.c fdc_magitronic.c fdc_monster.c fdc_pii15xb.c
|
||||
fdi2raw.c fdd_common.c fdd_86f.c fdd_fdi.c fdd_imd.c fdd_img.c fdd_json.c
|
||||
fdd_mfm.c fdd_td0.c)
|
||||
|
||||
@@ -2276,6 +2276,9 @@ fdc_reset(void *priv)
|
||||
if (fdc->flags & FDC_FLAG_PCJR) {
|
||||
fdc->dma = 0;
|
||||
fdc->specify[1] = 1;
|
||||
} else if (fdc->flags & FDC_FLAG_SEC) {
|
||||
fdc->dma = 1;
|
||||
fdc->specify[1] = 0;
|
||||
} else {
|
||||
fdc->dma = 1;
|
||||
fdc->specify[1] = 0;
|
||||
|
||||
193
src/floppy/fdc_monster.c
Normal file
193
src/floppy/fdc_monster.c
Normal file
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
* 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 86Box distribution.
|
||||
*
|
||||
* Emulation of Sergey Kiselev's Monster Floppy Disk Controller.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Jasmine Iwanek, <jasmine@iwanek.co.uk>
|
||||
*
|
||||
* Copyright 2022 Jasmine Iwanek.
|
||||
*/
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#define HAVE_STDARG_H
|
||||
#include <86box/86box.h>
|
||||
#include <86box/device.h>
|
||||
#include <86box/io.h>
|
||||
#include <86box/mem.h>
|
||||
#include <86box/rom.h>
|
||||
#include <86box/machine.h>
|
||||
#include <86box/timer.h>
|
||||
#include <86box/fdd.h>
|
||||
#include <86box/fdc.h>
|
||||
#include <86box/fdc_ext.h>
|
||||
|
||||
#define BIOS_ADDR (uint32_t)(device_get_config_hex20("bios_addr") & 0x000fffff)
|
||||
#define ROM_MONSTER_FDC "roms/floppy/monster-fdc/floppy_bios.rom"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
rom_t bios_rom;
|
||||
} monster_fdc_t;
|
||||
|
||||
static void
|
||||
monster_fdc_close(void *priv)
|
||||
{
|
||||
monster_fdc_t *dev = (monster_fdc_t *)priv;
|
||||
|
||||
free(dev);
|
||||
}
|
||||
|
||||
static void *
|
||||
monster_fdc_init(const device_t *info)
|
||||
{
|
||||
monster_fdc_t *dev;
|
||||
|
||||
dev = (monster_fdc_t *)malloc(sizeof(monster_fdc_t));
|
||||
memset(dev, 0, sizeof(monster_fdc_t));
|
||||
|
||||
if (BIOS_ADDR != 0)
|
||||
rom_init(&dev->bios_rom, ROM_MONSTER_FDC, BIOS_ADDR, 0x2000, 0x1ffff, 0, MEM_MAPPING_EXTERNAL);
|
||||
|
||||
// Primary FDC
|
||||
device_add(&fdc_at_device);
|
||||
|
||||
// Secondary FDC
|
||||
// device_add(&fdc_at_sec_device);
|
||||
|
||||
return dev;
|
||||
}
|
||||
|
||||
static int monster_fdc_available(void)
|
||||
{
|
||||
return rom_present(ROM_MONSTER_FDC);
|
||||
}
|
||||
|
||||
static const device_config_t monster_fdc_config[] = {
|
||||
// clang-format off
|
||||
/*
|
||||
{
|
||||
.name = "sec_irq",
|
||||
.description = "Secondary Controller IRQ",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 6,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{
|
||||
.description = "IRQ 2",
|
||||
.value = 2
|
||||
},
|
||||
{
|
||||
.description = "IRQ 3",
|
||||
.value = 3
|
||||
},
|
||||
{
|
||||
.description = "IRQ 4",
|
||||
.value = 4
|
||||
},
|
||||
{
|
||||
.description = "IRQ 5",
|
||||
.value = 5
|
||||
},
|
||||
{
|
||||
.description = "IRQ 6",
|
||||
.value = 6
|
||||
},
|
||||
{
|
||||
.description = "IRQ 7",
|
||||
.value = 7
|
||||
},
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
{
|
||||
.name = "sec_dma",
|
||||
.description = "Secondary Controller DMA",
|
||||
.type = CONFIG_SELECTION,
|
||||
.default_string = "",
|
||||
.default_int = 2,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{
|
||||
.description = "DMA 1",
|
||||
.value = 1
|
||||
},
|
||||
{
|
||||
.description = "DMA 2",
|
||||
.value = 2
|
||||
},
|
||||
{
|
||||
.description = "DMA 3",
|
||||
.value = 3
|
||||
},
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
*/
|
||||
{
|
||||
.name = "bios_addr",
|
||||
.description = "BIOS Address:",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "",
|
||||
.default_int = 0xc8000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "Disabled", .value = 0 },
|
||||
{ .description = "C000H", .value = 0xc0000 },
|
||||
{ .description = "C800H", .value = 0xc8000 },
|
||||
{ .description = "D000H", .value = 0xd0000 },
|
||||
{ .description = "D800H", .value = 0xd8000 },
|
||||
{ .description = "E000H", .value = 0xe0000 },
|
||||
{ .description = "E800H", .value = 0xe8000 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
/*
|
||||
{
|
||||
.name = "bios_size",
|
||||
.description = "BIOS Size:",
|
||||
.type = CONFIG_HEX20,
|
||||
.default_string = "32",
|
||||
.default_int = 0xc8000,
|
||||
.file_filter = "",
|
||||
.spinner = { 0 },
|
||||
.selection = {
|
||||
{ .description = "8K", .value = 8 },
|
||||
{ .description = "32K", .value = 32 },
|
||||
{ .description = "" }
|
||||
}
|
||||
},
|
||||
*/
|
||||
// BIOS extension ROM writes: Enabled/Disabled
|
||||
{ .name = "", .description = "", .type = CONFIG_END }
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
const device_t fdc_monster_device = {
|
||||
.name = "Monster FDC Floppy Drive Controller",
|
||||
.internal_name = "monster_fdc",
|
||||
.flags = DEVICE_ISA,
|
||||
.local = 0,
|
||||
.init = monster_fdc_init,
|
||||
.close = monster_fdc_close,
|
||||
.reset = NULL,
|
||||
{ .available = monster_fdc_available },
|
||||
.speed_changed = NULL,
|
||||
.force_redraw = NULL,
|
||||
.config =monster_fdc_config
|
||||
};
|
||||
@@ -28,109 +28,109 @@ extern "C" {
|
||||
|
||||
#if 0
|
||||
typedef struct {
|
||||
uint8_t id,
|
||||
uint8_t bus_type, /* Bus type: IDE, SCSI, etc. */
|
||||
bus, :4, /* ID of the bus (for example, for IDE,
|
||||
0 = primary, 1 = secondary, etc. */
|
||||
bus_id, :4, /* ID of the device on the bus */
|
||||
uint8_t type, /* Type flags, interpretation depends
|
||||
on the device */
|
||||
uint8_t is_image; /* This is only used for CD-ROM:
|
||||
0 = Image;
|
||||
1 = Host drive */
|
||||
uint8_t id,
|
||||
uint8_t bus_type, /* Bus type: IDE, SCSI, etc. */
|
||||
bus, : 4, /* ID of the bus (for example, for IDE,
|
||||
0 = primary, 1 = secondary, etc. */
|
||||
bus_id, : 4, /* ID of the device on the bus */
|
||||
uint8_t type, /* Type flags, interpretation depends
|
||||
on the device */
|
||||
uint8_t is_image; /* This is only used for CD-ROM:
|
||||
0 = Image;
|
||||
1 = Host drive */
|
||||
|
||||
wchar_t path[1024]; /* Name of current image file or
|
||||
host drive */
|
||||
wchar_t path[1024]; /* Name of current image file or
|
||||
host drive */
|
||||
|
||||
uint32_t spt, /* Physical geometry parameters */
|
||||
hpc,
|
||||
tracks;
|
||||
uint32_t spt, /* Physical geometry parameters */
|
||||
hpc,
|
||||
tracks;
|
||||
} storage_cfg_t;
|
||||
|
||||
typedef struct {
|
||||
/* General configuration */
|
||||
int vid_resize, /* Window is resizable or not */
|
||||
vid_renderer, /* Renderer */
|
||||
vid_fullscreen_scale, /* Full screen scale type */
|
||||
vid_fullscreen_start, /* Start emulator in full screen */
|
||||
vid_force_43, /* Force 4:3 display ratio in windowed mode */
|
||||
vid_scale, /* Windowed mode scale */
|
||||
vid_overscan, /* EGA/(S)VGA overscan enabled */
|
||||
vid_cga_contrast, /* CGA alternate contrast enabled */
|
||||
vid_grayscale, /* Video is grayscale */
|
||||
vid_grayscale_type, /* Video grayscale type */
|
||||
vid_invert_display, /* Invert display */
|
||||
rctrl_is_lalt, /* Right CTRL is left ALT */
|
||||
update_icons, /* Update status bar icons */
|
||||
window_remember, /* Remember window position and size */
|
||||
window_w, /* Window coordinates */
|
||||
window_h,
|
||||
window_x,
|
||||
window_y,
|
||||
sound_gain; /* Sound gain */
|
||||
int vid_resize, /* Window is resizable or not */
|
||||
vid_renderer, /* Renderer */
|
||||
vid_fullscreen_scale, /* Full screen scale type */
|
||||
vid_fullscreen_start, /* Start emulator in full screen */
|
||||
vid_force_43, /* Force 4:3 display ratio in windowed mode */
|
||||
vid_scale, /* Windowed mode scale */
|
||||
vid_overscan, /* EGA/(S)VGA overscan enabled */
|
||||
vid_cga_contrast, /* CGA alternate contrast enabled */
|
||||
vid_grayscale, /* Video is grayscale */
|
||||
vid_grayscale_type, /* Video grayscale type */
|
||||
vid_invert_display, /* Invert display */
|
||||
rctrl_is_lalt, /* Right CTRL is left ALT */
|
||||
update_icons, /* Update status bar icons */
|
||||
window_remember, /* Remember window position and size */
|
||||
window_w, /* Window coordinates */
|
||||
window_h,
|
||||
window_x,
|
||||
window_y,
|
||||
sound_gain; /* Sound gain */
|
||||
# ifdef USE_LANGUAGE
|
||||
uint16_t language_id; /* Language ID (0x0409 = English (US)) */
|
||||
uint16_t language_id; /* Language ID (0x0409 = English (US)) */
|
||||
# endif
|
||||
|
||||
/* Machine cateogory */
|
||||
int machine, /* Machine */
|
||||
cpu, /* CPU */
|
||||
int machine, /* Machine */
|
||||
cpu, /* CPU */
|
||||
# ifdef USE_DYNAREC
|
||||
cpu_use_dynarec, /* CPU recompiler enabled */
|
||||
cpu_use_dynarec, /* CPU recompiler enabled */
|
||||
# endif
|
||||
wait_states, /* CPU wait states */
|
||||
enable_external_fpu, /* FPU enabled */
|
||||
time_sync; /* Time sync enabled */
|
||||
uint32_t mem_size; /* Memory size */
|
||||
wait_states, /* CPU wait states */
|
||||
enable_external_fpu, /* FPU enabled */
|
||||
time_sync; /* Time sync enabled */
|
||||
uint32_t mem_size; /* Memory size */
|
||||
|
||||
/* Video category */
|
||||
int video_card, /* Video card */
|
||||
voodoo_enabled; /* Voodoo enabled */
|
||||
int video_card, /* Video card */
|
||||
voodoo_enabled; /* Voodoo enabled */
|
||||
|
||||
/* Input devices category */
|
||||
int mouse_type, /* Mouse type */
|
||||
joystick_type; /* Joystick type */
|
||||
int mouse_type, /* Mouse type */
|
||||
joystick_type; /* Joystick type */
|
||||
|
||||
/* Sound category */
|
||||
int sound_card, /* Sound card */
|
||||
midi_device, /* Midi device */
|
||||
mpu_401, /* Standalone MPU-401 enabled */
|
||||
ssi_2001_enabled, /* SSI-2001 enabled */
|
||||
game_blaster_enabled, /* Game blaster enabled */
|
||||
gus_enabled, /* Gravis Ultrasound enabled */
|
||||
opl_type, /* OPL emulation type */
|
||||
sound_is_float; /* Sound is 32-bit float or 16-bit integer */
|
||||
int sound_card, /* Sound card */
|
||||
midi_device, /* Midi device */
|
||||
mpu_401, /* Standalone MPU-401 enabled */
|
||||
ssi_2001_enabled, /* SSI-2001 enabled */
|
||||
game_blaster_enabled, /* Game blaster enabled */
|
||||
gus_enabled, /* Gravis Ultrasound enabled */
|
||||
opl_type, /* OPL emulation type */
|
||||
sound_is_float; /* Sound is 32-bit float or 16-bit integer */
|
||||
|
||||
/* Network category */
|
||||
int network_type, /* Network type (SLiRP or PCap) */
|
||||
network_card; /* Network card */
|
||||
char network_host[520]; /* PCap device */
|
||||
int network_type, /* Network type (SLiRP or PCap) */
|
||||
network_card; /* Network card */
|
||||
char network_host[520]; /* PCap device */
|
||||
|
||||
/* Ports category */
|
||||
char parallel_devices[PARALLEL_MAX][32]; /* LPT device names */
|
||||
char parallel_devices[PARALLEL_MAX][32]; /* LPT device names */
|
||||
# ifdef USE_SERIAL_DEVICES
|
||||
char serial_devices[SERIAL_MAX][32]; /* Serial device names */
|
||||
char serial_devices[SERIAL_MAX][32]; /* Serial device names */
|
||||
# endif
|
||||
|
||||
/* Other peripherals category */
|
||||
int fdc_type, /* Floppy disk controller type */
|
||||
hdc, /* Hard disk controller */
|
||||
scsi_card, /* SCSI controller */
|
||||
ide_ter_enabled, /* Tertiary IDE controller enabled */
|
||||
ide_qua_enabled, /* Quaternary IDE controller enabled */
|
||||
bugger_enabled, /* ISA bugger device enabled */
|
||||
isa_rtc_type, /* ISA RTC card */
|
||||
isa_mem_type[ISAMEM_MAX]; /* ISA memory boards */
|
||||
int fdc_type, /* Floppy disk controller type */
|
||||
hdc, /* Hard disk controller */
|
||||
scsi_card, /* SCSI controller */
|
||||
ide_ter_enabled, /* Tertiary IDE controller enabled */
|
||||
ide_qua_enabled, /* Quaternary IDE controller enabled */
|
||||
bugger_enabled, /* ISA bugger device enabled */
|
||||
isa_rtc_type, /* ISA RTC card */
|
||||
isa_mem_type[ISAMEM_MAX]; /* ISA memory boards */
|
||||
|
||||
/* Hard disks category */
|
||||
storage_cfg_t hdd[HDD_NUM]; /* Hard disk drives */
|
||||
storage_cfg_t hdd[HDD_NUM]; /* Hard disk drives */
|
||||
|
||||
/* Floppy drives category */
|
||||
storage_cfg_t fdd[FDD_NUM]; /* Floppy drives */
|
||||
storage_cfg_t fdd[FDD_NUM]; /* Floppy drives */
|
||||
|
||||
/* Other removable devices category */
|
||||
storage_cfg_t cdrom[CDROM_NUM], /* CD-ROM drives */
|
||||
storage_cfg_t rdisk[ZIP_NUM]; /* Removable disk drives */
|
||||
storage_cfg_t cdrom[CDROM_NUM], /* CD-ROM drives */
|
||||
storage_cfg_t rdisk[ZIP_NUM]; /* Removable disk drives */
|
||||
} config_t;
|
||||
#endif
|
||||
|
||||
|
||||
70
src/include/86box/disksizes.h
Normal file
70
src/include/86box/disksizes.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* 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 86Box distribution.
|
||||
*
|
||||
* Header of the emulation of the PC speaker.
|
||||
*
|
||||
*
|
||||
*
|
||||
* Authors: Jasmine Iwanek <jriwanek@gmail.com/>
|
||||
*
|
||||
* Copyright 2022 Jasmine Iwanek
|
||||
*/
|
||||
|
||||
#ifndef DISK_SIZES_H
|
||||
#define DISK_SIZES_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
int hole;
|
||||
int sides;
|
||||
int data_rate;
|
||||
int encoding;
|
||||
int rpm;
|
||||
int tracks;
|
||||
int sectors; /* For IMG and Japanese FDI only. */
|
||||
int sector_len; /* For IMG and Japanese FDI only. */
|
||||
int media_desc;
|
||||
int spc;
|
||||
int num_fats;
|
||||
int spfat;
|
||||
int root_dir_entries;
|
||||
} disk_size_t;
|
||||
|
||||
static const disk_size_t disk_sizes[14] = {
|
||||
// clang-format off
|
||||
// { 1, 1, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 250k 8" */
|
||||
// { 1, 2, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 500k 8" */
|
||||
// { 1, 1, 2, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 616k 8" */
|
||||
// { 1, 2, 0, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 1232k 8" */
|
||||
{ 0, 1, 2, 1, 0, 40, 8, 2, 0xfe, 2, 2, 1, 64 }, /* 160k */
|
||||
{ 0, 1, 2, 1, 0, 40, 9, 2, 0xfc, 2, 2, 1, 64 }, /* 180k */
|
||||
{ 0, 2, 2, 1, 0, 40, 8, 2, 0xff, 2, 2, 1, 112 }, /* 320k */
|
||||
{ 0, 2, 2, 1, 0, 40, 9, 2, 0xfd, 2, 2, 2, 112 }, /* 360k */
|
||||
{ 0, 2, 2, 1, 0, 80, 8, 2, 0xfb, 2, 2, 2, 112 }, /* 640k */
|
||||
{ 0, 2, 2, 1, 0, 80, 9, 2, 0xf9, 2, 2, 3, 112 }, /* 720k */
|
||||
{ 1, 2, 0, 1, 1, 80, 15, 2, 0xf9, 1, 2, 7, 224 }, /* 1.2M */
|
||||
{ 1, 2, 0, 1, 1, 77, 8, 3, 0xfe, 1, 2, 2, 192 }, /* 1.25M */
|
||||
{ 1, 2, 0, 1, 0, 80, 18, 2, 0xf0, 1, 2, 9, 224 }, /* 1.44M */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 2, 2, 5, 16 }, /* DMF cluster 1024 */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 4, 2, 3, 16 }, /* DMF cluster 2048 */
|
||||
{ 2, 2, 3, 1, 0, 80, 36, 2, 0xf0, 2, 2, 9, 240 }, /* 2.88M */
|
||||
{ 0, 64, 0, 0, 0, 96, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 100 */
|
||||
{ 0, 64, 0, 0, 0, 239, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 250 */
|
||||
// { 0, 8, 0, 0, 0, 963, 32, 2, 0, 0, 0, 0, 0 }, /* LS-120 */
|
||||
// { 0, 32, 0, 0, 0, 262, 56, 2, 0, 0, 0, 0, 0 } /* LS-240 */
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /*DISK_SIZES_H*/
|
||||
@@ -28,6 +28,7 @@
|
||||
* least 7 devices, with each device being \
|
||||
* able to support 8 units, but hey... */
|
||||
|
||||
/* Controller types. */
|
||||
#define HDC_NONE 0
|
||||
#define HDC_INTERNAL 1
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@
|
||||
#include <86box/chipset.h>
|
||||
#include <86box/port_6x.h>
|
||||
|
||||
extern const device_t vendex_xt_rtc_onboard_device;
|
||||
|
||||
static void
|
||||
machine_xt_common_init(const machine_t *model)
|
||||
{
|
||||
@@ -483,6 +485,7 @@ machine_xt_vendex_init(const machine_t *model)
|
||||
return ret;
|
||||
|
||||
machine_xt_clone_init(model);
|
||||
device_add(&vendex_xt_rtc_onboard_device);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -832,14 +832,14 @@ const machine_t machines[] = {
|
||||
.min_voltage = 0,
|
||||
.max_voltage = 0,
|
||||
.min_multi = 0,
|
||||
.max_multi = 0,
|
||||
.max_multi = 0
|
||||
},
|
||||
.bus_flags = MACHINE_PC,
|
||||
.flags = MACHINE_FLAGS_NONE,
|
||||
.ram = {
|
||||
.min = 128,
|
||||
.max = 640,
|
||||
.step = 64,
|
||||
.step = 64
|
||||
},
|
||||
.nvrmask = 0,
|
||||
.kbc = KBC_IBM_PC_XT,
|
||||
@@ -1231,7 +1231,7 @@ const machine_t machines[] = {
|
||||
.max_multi = 0
|
||||
},
|
||||
.bus_flags = MACHINE_PC,
|
||||
MACHINE_FLAGS_NONE,
|
||||
.flags = MACHINE_FLAGS_NONE,
|
||||
.ram = {
|
||||
.min = 256,
|
||||
.max = 640,
|
||||
@@ -9585,7 +9585,7 @@ const machine_t machines[] = {
|
||||
.min_voltage = 2800,
|
||||
.max_voltage = 3520,
|
||||
.min_multi = 1.5,
|
||||
.max_multi = 5.5,
|
||||
.max_multi = 5.5
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_PCI,
|
||||
.flags = MACHINE_IDE_DUAL,
|
||||
@@ -11903,7 +11903,7 @@ const machine_t machines[] = {
|
||||
.min_voltage = 1300,
|
||||
.max_voltage = 3500,
|
||||
.min_multi = MACHINE_MULTIPLIER_FIXED,
|
||||
.max_multi = MACHINE_MULTIPLIER_FIXED,
|
||||
.max_multi = MACHINE_MULTIPLIER_FIXED
|
||||
},
|
||||
.bus_flags = MACHINE_PS2_A97,
|
||||
.flags = MACHINE_IDE_DUAL | MACHINE_AG,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# Copyright 2020,2021 David Hrdlička.
|
||||
#
|
||||
|
||||
add_library(net OBJECT network.c net_pcap.c net_slirp.c net_dp8390.c net_3c501.c
|
||||
add_library(net OBJECT network.c net_pcap.c net_slirp.c net_dp8390.c net_3c501.c
|
||||
net_3c503.c net_ne2000.c net_pcnet.c net_wd8003.c net_plip.c net_event.c)
|
||||
|
||||
option(SLIRP_EXTERNAL "Link against the system-provided libslirp library" OFF)
|
||||
|
||||
@@ -1486,7 +1486,7 @@ pcnetAsyncTransmit(nic_t *dev)
|
||||
*/
|
||||
if (tmd.tmd1.stp && tmd.tmd1.enp) {
|
||||
const int cb = 4096 - tmd.tmd1.bcnt;
|
||||
pcnet_log("%s: pcnetAsyncTransmit: stp&enp: cb=%d xmtrc=%#x\n", dev->name, cb, CSR_XMTRC(dev));
|
||||
pcnet_log(3, "%s: pcnetAsyncTransmit: stp&enp: cb=%d xmtrc=%#x\n", dev->name, cb, CSR_XMTRC(dev));
|
||||
|
||||
if ((pcnetIsLinkUp(dev) || fLoopback)) {
|
||||
|
||||
|
||||
@@ -13,9 +13,12 @@
|
||||
# Copyright 2020,2021 David Hrdlička.
|
||||
#
|
||||
|
||||
add_library(slirp STATIC arp_table.c bootp.c cksum.c dnssearch.c if.c ip_icmp.c
|
||||
ip_input.c ip_output.c mbuf.c misc.c sbuf.c slirp.c socket.c tcp_input.c
|
||||
tcp_output.c tcp_subr.c tcp_timer.c udp.c util.c version.c)
|
||||
add_library(slirp STATIC arp_table.c bootp.c cksum.c dnssearch.c if.c
|
||||
ip_icmp.c ip_input.c ip_output.c
|
||||
mbuf.c misc.c sbuf.c slirp.c socket.c
|
||||
tcp_input.c tcp_output.c tcp_subr.c tcp_timer.c
|
||||
udp.c
|
||||
util.c version.c)
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(slirp wsock32 iphlpapi)
|
||||
|
||||
@@ -60,21 +60,29 @@ struct disk_size_t {
|
||||
};
|
||||
|
||||
static const disk_size_t disk_sizes[14] = {
|
||||
{0, 1, 2, 1, 0, 40, 8, 2, 0xfe, 2, 2, 1, 64 }, /* 160k */
|
||||
{ 0, 1, 2, 1, 0, 40, 9, 2, 0xfc, 2, 2, 1, 64 }, /* 180k */
|
||||
{ 0, 2, 2, 1, 0, 40, 8, 2, 0xff, 2, 2, 1, 112}, /* 320k */
|
||||
{ 0, 2, 2, 1, 0, 40, 9, 2, 0xfd, 2, 2, 2, 112}, /* 360k */
|
||||
{ 0, 2, 2, 1, 0, 80, 8, 2, 0xfb, 2, 2, 2, 112}, /* 640k */
|
||||
{ 0, 2, 2, 1, 0, 80, 9, 2, 0xf9, 2, 2, 3, 112}, /* 720k */
|
||||
{ 1, 2, 0, 1, 1, 80, 15, 2, 0xf9, 1, 2, 7, 224}, /* 1.2M */
|
||||
{ 1, 2, 0, 1, 1, 77, 8, 3, 0xfe, 1, 2, 2, 192}, /* 1.25M */
|
||||
{ 1, 2, 0, 1, 0, 80, 18, 2, 0xf0, 1, 2, 9, 224}, /* 1.44M */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 2, 2, 5, 16 }, /* DMF cluster 1024 */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 4, 2, 3, 16 }, /* DMF cluster 2048 */
|
||||
{ 2, 2, 3, 1, 0, 80, 36, 2, 0xf0, 2, 2, 9, 240}, /* 2.88M */
|
||||
{ 0, 64, 0, 0, 0, 96, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 100 */
|
||||
{ 0, 64, 0, 0, 0, 239, 32, 2, 0, 0, 0, 0, 0 }
|
||||
}; /* ZIP 250 */
|
||||
// clang-format off
|
||||
// { 1, 1, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 250k 8" */
|
||||
// { 1, 2, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 500k 8" */
|
||||
// { 1, 1, 2, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 616k 8" */
|
||||
// { 1, 2, 0, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 1232k 8" */
|
||||
{ 0, 1, 2, 1, 0, 40, 8, 2, 0xfe, 2, 2, 1, 64 }, /* 160k */
|
||||
{ 0, 1, 2, 1, 0, 40, 9, 2, 0xfc, 2, 2, 1, 64 }, /* 180k */
|
||||
{ 0, 2, 2, 1, 0, 40, 8, 2, 0xff, 2, 2, 1, 112 }, /* 320k */
|
||||
{ 0, 2, 2, 1, 0, 40, 9, 2, 0xfd, 2, 2, 2, 112 }, /* 360k */
|
||||
{ 0, 2, 2, 1, 0, 80, 8, 2, 0xfb, 2, 2, 2, 112 }, /* 640k */
|
||||
{ 0, 2, 2, 1, 0, 80, 9, 2, 0xf9, 2, 2, 3, 112 }, /* 720k */
|
||||
{ 1, 2, 0, 1, 1, 80, 15, 2, 0xf9, 1, 2, 7, 224 }, /* 1.2M */
|
||||
{ 1, 2, 0, 1, 1, 77, 8, 3, 0xfe, 1, 2, 2, 192 }, /* 1.25M */
|
||||
{ 1, 2, 0, 1, 0, 80, 18, 2, 0xf0, 1, 2, 9, 224 }, /* 1.44M */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 2, 2, 5, 16 }, /* DMF cluster 1024 */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 4, 2, 3, 16 }, /* DMF cluster 2048 */
|
||||
{ 2, 2, 3, 1, 0, 80, 36, 2, 0xf0, 2, 2, 9, 240 }, /* 2.88M */
|
||||
{ 0, 64, 0, 0, 0, 96, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 100 */
|
||||
{ 0, 64, 0, 0, 0, 239, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 250 */
|
||||
// { 0, 8, 0, 0, 0, 963, 32, 2, 0, 0, 0, 0, 0 }, /* LS-120 */
|
||||
// { 0, 32, 0, 0, 0, 262, 56, 2, 0, 0, 0, 0, 0 } /* LS-240 */
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
static const QStringList rpmModes = {
|
||||
"Perfect RPM",
|
||||
@@ -548,7 +556,7 @@ NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_size_t
|
||||
empty[0x5003] = empty[0x1D003] = 0xFF;
|
||||
|
||||
/* Root directory = 0x35000
|
||||
Data = 0x39000 */
|
||||
Data = 0x39000 */
|
||||
} else {
|
||||
/* ZIP 250 */
|
||||
/* MBR */
|
||||
@@ -570,7 +578,7 @@ NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_size_t
|
||||
memset(&(empty[0x0200]), 0x48, 0x3E00);
|
||||
|
||||
/* The second sector begins with some strange data
|
||||
in my reference image. */
|
||||
in my reference image. */
|
||||
*(uint64_t *) &(empty[0x0200]) = 0x3831393230334409LL;
|
||||
*(uint64_t *) &(empty[0x0208]) = 0x6A57766964483130LL;
|
||||
*(uint64_t *) &(empty[0x0210]) = 0x3C3A34676063653FLL;
|
||||
@@ -619,7 +627,7 @@ NewFloppyDialog::createZipSectorImage(const QString &filename, const disk_size_t
|
||||
empty[0x4203] = empty[0x22003] = 0xFF;
|
||||
|
||||
/* Root directory = 0x3FE00
|
||||
Data = 0x38200 */
|
||||
Data = 0x38200 */
|
||||
}
|
||||
|
||||
pbar.setMaximum(pbar_max);
|
||||
|
||||
@@ -41,9 +41,6 @@
|
||||
#include <86box/scsi_ncr53c8xx.h>
|
||||
#include <86box/scsi_pcscsi.h>
|
||||
#include <86box/scsi_spock.h>
|
||||
#ifdef WALTJE
|
||||
# include "scsi_wd33c93.h"
|
||||
#endif
|
||||
|
||||
int scsi_card_current[SCSI_BUS_MAX] = { 0, 0 };
|
||||
|
||||
@@ -85,9 +82,6 @@ static SCSI_CARD scsi_cards[] = {
|
||||
{ &scsi_rt1000mc_device, },
|
||||
{ &scsi_t128_device, },
|
||||
{ &scsi_t130b_device, },
|
||||
#ifdef WALTJE
|
||||
{ &scsi_wd33c93_device, },
|
||||
#endif
|
||||
{ &aha1640_device, },
|
||||
{ &buslogic_640a_device, },
|
||||
{ &ncr53c90_mca_device, },
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
# Authors: Cacodemon345
|
||||
# David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
#
|
||||
# Copyright 2021 Cacodemon345.
|
||||
# Copyright 2021 David Hrdlička.
|
||||
# Copyright 2021 Cacodemon345.
|
||||
# Copyright 2021 David Hrdlička.
|
||||
#
|
||||
|
||||
add_library(plat OBJECT unix.c)
|
||||
|
||||
@@ -1567,7 +1567,7 @@ banshee_reg_writel(uint32_t addr, uint32_t val, void *p)
|
||||
break;
|
||||
|
||||
case 0x0600000:
|
||||
case 0x0700000: /*Texture download*/
|
||||
case 0x0700000: /*TMU0 Texture download*/
|
||||
voodoo->tex_count++;
|
||||
voodoo_queue_command(voodoo, (addr & 0x1ffffc) | FIFO_WRITEL_TEX, val);
|
||||
break;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# Authors: David Hrdlička, <hrdlickadavid@outlook.com>
|
||||
#
|
||||
# Copyright 2020,2021 David Hrdlička.
|
||||
# Copyright 2020-2021 David Hrdlička.
|
||||
#
|
||||
|
||||
enable_language(RC)
|
||||
|
||||
@@ -605,7 +605,7 @@ SIOOBJ := sio_acc3221.o sio_ali5123.o \
|
||||
sio_um8669f.o \
|
||||
sio_vt82c686.o
|
||||
|
||||
FDDOBJ := fdd.o fdc.o fdc_magitronic.o fdc_pii15xb.o \
|
||||
FDDOBJ := fdd.o fdc.o fdc_magitronic.o fdc_monster.o fdc_pii15xb.o \
|
||||
fdi2raw.o \
|
||||
fdd_common.o fdd_86f.o \
|
||||
fdd_fdi.o fdd_imd.o fdd_img.o fdd_json.o \
|
||||
@@ -644,12 +644,17 @@ SCSIOBJ := scsi.o scsi_device.o \
|
||||
scsi_ncr5380.o scsi_ncr53c8xx.o \
|
||||
scsi_pcscsi.o scsi_spock.o
|
||||
|
||||
SLIRPOBJ := arp_table.o bootp.o cksum.o dnssearch.o if.o \
|
||||
ip_icmp.o ip_input.o ip_output.o \
|
||||
mbuf.o misc.o sbuf.o slirp.o socket.o \
|
||||
tcp_input.o tcp_output.o tcp_subr.o tcp_timer.o \
|
||||
udp.o \
|
||||
util.o version.o \
|
||||
|
||||
NETOBJ := network.o \
|
||||
net_pcap.o \
|
||||
net_slirp.o tinyglib.o \
|
||||
arp_table.o bootp.o cksum.o dnssearch.o if.o ip_icmp.o ip_input.o \
|
||||
ip_output.o mbuf.o misc.o sbuf.o slirp.o socket.o tcp_input.o \
|
||||
tcp_output.o tcp_subr.o tcp_timer.o udp.o util.o version.o \
|
||||
${SLIRPOBJ} \
|
||||
net_dp8390.o net_3c501.o \
|
||||
net_3c503.o net_ne2000.o \
|
||||
net_pcnet.o net_wd8003.o \
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
#include <86box/86box.h>
|
||||
#include <86box/disksizes.h>
|
||||
#include <86box/plat.h>
|
||||
#include <86box/random.h>
|
||||
#include <86box/ui.h>
|
||||
@@ -34,43 +35,6 @@
|
||||
#include <86box/zip.h>
|
||||
#include <86box/win.h>
|
||||
|
||||
typedef struct {
|
||||
int hole;
|
||||
int sides;
|
||||
int data_rate;
|
||||
int encoding;
|
||||
int rpm;
|
||||
int tracks;
|
||||
int sectors; /* For IMG and Japanese FDI only. */
|
||||
int sector_len; /* For IMG and Japanese FDI only. */
|
||||
int media_desc;
|
||||
int spc;
|
||||
int num_fats;
|
||||
int spfat;
|
||||
int root_dir_entries;
|
||||
} disk_size_t;
|
||||
|
||||
static const disk_size_t disk_sizes[14] = {
|
||||
// { 1, 1, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 250k 8" */
|
||||
// { 1, 2, 2, 1, 1, 77, 26, 0, 0, 4, 2, 6, 68 }, /* 500k 8" */
|
||||
// { 1, 1, 2, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 616k 8" */
|
||||
// { 1, 2, 0, 1, 1, 77, 8, 3, 0, 1, 2, 2, 192 }, /* 1232k 8" */
|
||||
{0, 1, 2, 1, 0, 40, 8, 2, 0xfe, 1, 2, 1, 64 }, /* 160k */
|
||||
{ 0, 1, 2, 1, 0, 40, 9, 2, 0xfc, 1, 2, 2, 64 }, /* 180k */
|
||||
{ 0, 2, 2, 1, 0, 40, 8, 2, 0xff, 2, 2, 1, 112}, /* 320k */
|
||||
{ 0, 2, 2, 1, 0, 40, 9, 2, 0xfd, 2, 2, 2, 112}, /* 360k */
|
||||
{ 0, 2, 2, 1, 0, 80, 8, 2, 0xfb, 2, 2, 2, 112}, /* 640k */
|
||||
{ 0, 2, 2, 1, 0, 80, 9, 2, 0xf9, 2, 2, 3, 112}, /* 720k */
|
||||
{ 1, 2, 0, 1, 1, 80, 15, 2, 0xf9, 1, 2, 7, 224}, /* 1.2M */
|
||||
{ 1, 2, 0, 1, 1, 77, 8, 3, 0xfe, 1, 2, 2, 192}, /* 1.25M */
|
||||
{ 1, 2, 0, 1, 0, 80, 18, 2, 0xf0, 1, 2, 9, 224}, /* 1.44M */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 2, 2, 5, 16 }, /* DMF cluster 1024 */
|
||||
{ 1, 2, 0, 1, 0, 80, 21, 2, 0xf0, 4, 2, 3, 16 }, /* DMF cluster 2048 */
|
||||
{ 2, 2, 3, 1, 0, 80, 36, 2, 0xf0, 2, 2, 9, 240}, /* 2.88M */
|
||||
{ 0, 64, 0, 0, 0, 96, 32, 2, 0, 0, 0, 0, 0 }, /* ZIP 100 */
|
||||
{ 0, 64, 0, 0, 0, 239, 32, 2, 0, 0, 0, 0, 0 }
|
||||
}; /* ZIP 250 */
|
||||
|
||||
static unsigned char *empty;
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user