2017-05-30 03:38:38 +02:00
/*
* 86 Box 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 86 Box distribution .
*
* Handling of the emulated machines .
*
2017-06-16 16:00:44 -04:00
* Version : @ ( # ) model . c 1.0 .2 2017 / 06 / 17
2017-05-30 03:38:38 +02:00
*
2017-06-04 02:11:19 -04:00
* Authors : Sarah Walker , < http : //pcem-emulator.co.uk/>
2017-05-30 03:38:38 +02:00
* Miran Grca , < mgrca8 @ gmail . com >
* Copyright 2008 - 2017 Sarah Walker .
* Copyright 2016 - 2017 Miran Grca .
*/
2017-01-16 01:49:19 +01:00
# include <stdint.h>
# include <stdio.h>
2017-06-04 02:11:19 -04:00
2016-06-26 00:34:39 +02:00
# include "ibm.h"
2017-05-06 17:48:33 +02:00
# include "cpu/cpu.h"
# include "io.h"
2016-09-14 23:18:14 +02:00
# include "mem.h"
2017-05-06 17:48:33 +02:00
# include "rom.h"
2017-06-04 02:11:19 -04:00
# include "device.h"
2016-06-26 00:34:39 +02:00
# include "model.h"
2016-12-23 03:16:24 +01:00
# include "mouse.h"
2017-05-05 01:49:42 +02:00
# include "mouse_ps2.h"
2017-05-06 17:48:33 +02:00
# include "cdrom.h"
2016-06-26 00:34:39 +02:00
2016-11-11 03:16:41 +01:00
# include "disc.h"
2016-06-26 00:34:39 +02:00
# include "dma.h"
# include "fdc.h"
# include "fdc37c665.h"
2017-05-05 01:49:42 +02:00
# include "fdc37c669.h"
2016-06-26 00:34:39 +02:00
# include "fdc37c932fr.h"
# include "gameport.h"
2017-02-19 01:58:21 +01:00
# include "i82335.h"
2016-06-26 00:34:39 +02:00
# include "ide.h"
# include "intel.h"
# include "intel_flash.h"
# include "keyboard_amstrad.h"
# include "keyboard_at.h"
# include "keyboard_olim24.h"
# include "keyboard_pcjr.h"
# include "keyboard_xt.h"
# include "lpt.h"
2017-05-05 01:49:42 +02:00
# include "mem.h"
2016-06-26 00:34:39 +02:00
# include "memregs.h"
# include "nmi.h"
# include "nvr.h"
# include "pc87306.h"
# include "pci.h"
# include "pic.h"
# include "piix.h"
# include "pit.h"
2017-05-05 01:49:42 +02:00
# include "ps2_mca.h"
2016-06-26 00:34:39 +02:00
# include "serial.h"
# include "sis85c471.h"
# include "sio.h"
2017-05-06 17:48:33 +02:00
# include "sound/snd_ps1.h"
# include "sound/snd_pssj.h"
# include "sound/snd_sn76489.h"
2017-06-16 03:18:59 +02:00
#if 0
# include "superio_detect.h"
# endif
2016-06-26 00:34:39 +02:00
# include "tandy_eeprom.h"
# include "tandy_rom.h"
2017-06-08 00:01:10 +02:00
#if 0
2016-06-26 00:34:39 +02:00
# include "um8669f.h"
2017-06-08 00:01:10 +02:00
# endif
2017-05-06 17:48:33 +02:00
# include "video/vid_pcjr.h"
# include "video/vid_tandy.h"
2016-06-26 00:34:39 +02:00
# include "w83877f.h"
# include "wd76c10.h"
2017-03-15 19:32:54 +01:00
# include "xtide.h"
2017-05-05 01:49:42 +02:00
# include "bugger.h"
2017-06-04 02:11:19 -04:00
extern void xt_init ( void ) ;
extern void pcjr_init ( void ) ;
extern void tandy1k_init ( void ) ;
extern void tandy1ksl2_init ( void ) ;
extern void ams_init ( void ) ;
extern void europc_init ( void ) ;
extern void olim24_init ( void ) ;
extern void at_init ( void ) ;
extern void ibm_at_init ( void ) ;
extern void at_ide_init ( void ) ;
extern void deskpro386_init ( void ) ;
extern void ps1_m2011_init ( void ) ;
extern void ps1_m2121_init ( void ) ;
extern void ps1_m2133_init ( void ) ;
extern void ps2_m30_286_init ( void ) ;
extern void ps2_model_50_init ( void ) ;
extern void ps2_model_55sx_init ( void ) ;
extern void ps2_model_80_init ( void ) ;
extern void at_neat_init ( void ) ;
extern void at_scat_init ( void ) ;
extern void at_wd76c10_init ( void ) ;
extern void at_ali1429_init ( void ) ;
extern void at_headland_init ( void ) ;
extern void at_opti495_init ( void ) ;
extern void at_batman_init ( void ) ;
2017-06-16 03:18:59 +02:00
#if 0
extern void at_586mc1_init ( void ) ;
# endif
2017-06-04 02:11:19 -04:00
extern void at_endeavor_init ( void ) ;
extern void at_dtk486_init ( void ) ;
extern void at_r418_init ( void ) ;
extern void at_plato_init ( void ) ;
extern void at_mb500n_init ( void ) ;
2017-06-16 03:18:59 +02:00
extern void at_president_init ( void ) ;
2017-06-04 02:11:19 -04:00
extern void at_p54tp4xe_init ( void ) ;
extern void at_ap53_init ( void ) ;
extern void at_p55t2s_init ( void ) ;
extern void at_acerm3a_init ( void ) ;
2017-06-15 19:35:48 +02:00
extern void at_acerv35n_init ( void ) ;
2017-06-04 02:11:19 -04:00
extern void at_p55t2p4_init ( void ) ;
extern void at_p55tvp4_init ( void ) ;
extern void at_p55va_init ( void ) ;
extern void at_i440fx_init ( void ) ;
extern void at_s1668_init ( void ) ;
2016-06-26 00:34:39 +02:00
2017-06-04 02:11:19 -04:00
extern void xt_laserxt_init ( void ) ;
2017-06-03 16:34:40 +02:00
2016-06-26 00:34:39 +02:00
int model ;
int AMSTRAD , AT , PCI , TANDY ;
2017-01-31 20:39:36 +01:00
PCI_RESET pci_reset_handler ;
2017-05-05 01:49:42 +02:00
int serial_enabled [ 2 ] = { 0 , 0 } ;
int lpt_enabled = 0 , bugger_enabled = 0 ;
2017-05-29 01:18:32 +02:00
int romset ;
2016-06-26 00:34:39 +02:00
MODEL models [ ] =
{
2017-06-16 06:44:11 +02:00
{ " IBM PC " , ROM_IBMPC , " ibmpc " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 640 , 64 , 0 , xt_init , NULL } ,
{ " IBM XT " , ROM_IBMXT , " ibmxt " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 640 , 64 , 0 , xt_init , NULL } ,
{ " Compaq Portable " , ROM_PORTABLE , " portable " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 128 , 640 , 128 , 0 , xt_init , NULL } ,
{ " IBM PCjr " , ROM_IBMPCJR , " ibmpcjr " , { { " " , cpus_pcjr } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , 0 , 128 , 640 , 128 , 0 , pcjr_init , & pcjr_device } ,
{ " Generic XT clone " , ROM_GENXT , " genxt " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 640 , 64 , 0 , xt_init , NULL } ,
{ " AMI XT clone " , ROM_AMIXT , " amixt " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 640 , 64 , 0 , xt_init , NULL } ,
{ " DTK XT clone " , ROM_DTKXT , " dtk " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 640 , 64 , 0 , xt_init , NULL } ,
{ " VTech Laser Turbo XT " , ROM_LTXT , " ltxt " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 1152 , 64 , 0 , xt_laserxt_init , NULL } ,
{ " VTech Laser XT3 " , ROM_LXT3 , " lxt3 " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 1152 , 64 , 0 , xt_laserxt_init , NULL } ,
{ " Phoenix XT clone " , ROM_PXXT , " pxxt " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 640 , 64 , 0 , xt_init , NULL } ,
{ " Juko XT clone " , ROM_JUKOPC , " jukopc " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 64 , 640 , 64 , 0 , xt_init , NULL } ,
{ " Tandy 1000 " , ROM_TANDY , " tandy " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , 0 , 128 , 640 , 128 , 0 , tandy1k_init , & tandy1000_device } ,
{ " Tandy 1000 HX " , ROM_TANDY1000HX , " tandy1000hx " , { { " " , cpus_8088 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , 0 , 256 , 640 , 128 , 0 , tandy1k_init , & tandy1000hx_device } ,
{ " Tandy 1000 SL/2 " , ROM_TANDY1000SL2 , " tandy1000sl2 " , { { " " , cpus_8086 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , 0 , 512 , 768 , 128 , 0 , tandy1ksl2_init , NULL } ,
{ " Amstrad PC1512 " , ROM_PC1512 , " pc1512 " , { { " " , cpus_pc1512 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AMSTRAD , 512 , 640 , 128 , 63 , ams_init , NULL } ,
{ " Sinclair PC200 " , ROM_PC200 , " pc200 " , { { " " , cpus_8086 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AMSTRAD , 512 , 640 , 128 , 63 , ams_init , NULL } ,
{ " Schneider EuroPC " , ROM_EUROPC , " europc " , { { " " , cpus_europc } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , 0 , 512 , 640 , 128 , 0 , europc_init , NULL } ,
{ " Olivetti M24 " , ROM_OLIM24 , " olivetti_m24 " , { { " " , cpus_8086 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_OLIM24 , 128 , 640 , 128 , 0 , olim24_init , NULL } ,
{ " Amstrad PC1640 " , ROM_PC1640 , " pc1640 " , { { " " , cpus_8086 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AMSTRAD , 640 , 640 , 0 , 63 , ams_init , NULL } ,
{ " Amstrad PC2086 " , ROM_PC2086 , " pc2086 " , { { " " , cpus_8086 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AMSTRAD , 640 , 640 , 0 , 63 , ams_init , NULL } ,
{ " Amstrad PC3086 " , ROM_PC3086 , " pc3086 " , { { " " , cpus_8086 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AMSTRAD , 640 , 640 , 0 , 63 , ams_init , NULL } ,
{ " IBM AT " , ROM_IBMAT , " ibmat " , { { " " , cpus_ibmat } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT , 1 , 16 , 1 , 63 , ibm_at_init , NULL } ,
{ " Compaq Portable II " , ROM_PORTABLEII , " portableii " , { { " " , cpus_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT , 1 , 15 , 1 , 63 , at_init , NULL } ,
{ " Compaq Portable III " , ROM_PORTABLEIII , " portableiii " , { { " " , cpus_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT , 1 , 15 , 1 , 63 , at_init , NULL } ,
{ " Commodore PC 30 III " , ROM_CMDPC30 , " cmdpc30 " , { { " " , cpus_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , at_ide_init , NULL } ,
{ " AMI 286 clone " , ROM_AMI286 , " ami286 " , { { " " , cpus_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , at_neat_init , NULL } ,
{ " Award 286 clone " , ROM_AWARD286 , " award286 " , { { " " , cpus_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , at_scat_init , NULL } ,
{ " Hyundai Super-286TR " , ROM_SUPER286TR , " super286tr " , { { " " , cpus_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT , 1 , 16 , 1 , 127 , at_scat_init , NULL } ,
{ " Samsung SPC-4200P " , ROM_SPC4200P , " spc4200p " , { { " " , cpus_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT , 1 , 16 , 1 , 127 , at_scat_init , NULL } ,
{ " IBM PS/1 model 2011 " , ROM_IBMPS1_2011 , " ibmps1es " , { { " " , cpus_ps1_m2011 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD , 1 , 16 , 1 , 127 , ps1_m2011_init , NULL } ,
{ " IBM PS/2 Model 30-286 " , ROM_IBMPS2_M30_286 , " ibmps2_m30_286 " , { { " " , cpus_ps2_m30_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD , 1 , 16 , 1 , 127 , ps2_m30_286_init , NULL } ,
{ " IBM PS/2 Model 50 " , ROM_IBMPS2_M50 , " ibmps2_m50 " , { { " " , cpus_ps2_m30_286 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA , 1 , 16 , 1 , 63 , ps2_model_50_init , NULL } ,
{ " IBM PS/1 model 2121 " , ROM_IBMPS1_2121 , " ibmps1_2121 " , { { " Intel " , cpus_i386SX } , { " AMD " , cpus_Am386SX } , { " Cyrix " , cpus_486SLC } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , ps1_m2121_init , NULL } ,
{ " IBM PS/1 m.2121 + ISA " , ROM_IBMPS1_2121_ISA , " ibmps1_2121_isa " , { { " Intel " , cpus_i386SX } , { " AMD " , cpus_Am386SX } , { " Cyrix " , cpus_486SLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , ps1_m2121_init , NULL } ,
{ " IBM PS/2 Model 55SX " , ROM_IBMPS2_M55SX , " ibmps2_m55sx " , { { " Intel " , cpus_i386SX } , { " AMD " , cpus_Am386SX } , { " Cyrix " , cpus_486SLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA , 1 , 8 , 1 , 63 , ps2_model_55sx_init , NULL } ,
{ " DTK 386SX clone " , ROM_DTK386 , " dtk386 " , { { " Intel " , cpus_i386SX } , { " AMD " , cpus_Am386SX } , { " Cyrix " , cpus_486SLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , at_neat_init , NULL } ,
{ " Amstrad MegaPC " , ROM_MEGAPC , " megapc " , { { " Intel " , cpus_i386SX } , { " AMD " , cpus_Am386SX } , { " Cyrix " , cpus_486SLC } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , at_wd76c10_init , NULL } ,
{ " AMI 386SX clone " , ROM_AMI386SX , " ami386 " , { { " Intel " , cpus_i386SX } , { " AMD " , cpus_Am386SX } , { " Cyrix " , cpus_486SLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 64 , 1 , 127 , at_headland_init , NULL } ,
{ " Compaq Deskpro 386 " , ROM_DESKPRO_386 , " dekspro386 " , { { " Intel " , cpus_i386DX } , { " AMD " , cpus_Am386DX } , { " Cyrix " , cpus_486DLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT , 1 , 15 , 1 , 63 , deskpro386_init , NULL } ,
{ " Compaq Portable III 386 " , ROM_PORTABLEIII386 , " portableiii386 " , { { " Intel " , cpus_i386DX } , { " AMD " , cpus_Am386DX } , { " Cyrix " , cpus_486DLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT , 1 , 15 , 1 , 63 , at_init , NULL } ,
{ " IBM PS/2 Model 80 " , ROM_IBMPS2_M80 , " ibmps2_m80 " , { { " Intel " , cpus_i386DX } , { " AMD " , cpus_Am386DX } , { " Cyrix " , cpus_486DLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_PS2_HDD | MODEL_MCA , 1 , 12 , 1 , 63 , ps2_model_80_init , NULL } ,
{ " Amstrad MegaPC 386DX " , ROM_MEGAPCDX , " megapcdx " , { { " Intel " , cpus_i386DX } , { " AMD " , cpus_Am386DX } , { " Cyrix " , cpus_486DLC } , { " " , NULL } , { " " , NULL } } , 1 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE , 1 , 16 , 1 , 127 , at_wd76c10_init , NULL } ,
{ " MR 386DX clone " , ROM_MR386DX_OPTI495 , " mr386dx " , { { " Intel " , cpus_i386DX } , { " AMD " , cpus_Am386DX } , { " Cyrix " , cpus_486DLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 64 , 1 , 127 , at_opti495_init , NULL } ,
{ " AMI 386DX clone " , ROM_AMI386DX_OPTI495 , " ami386dx " , { { " Intel " , cpus_i386DX } , { " AMD " , cpus_Am386DX } , { " Cyrix " , cpus_486DLC } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 64 , 1 , 127 , at_opti495_init , NULL } ,
{ " IBM PS/1 model 2133 " , ROM_IBMPS1_2133 , " ibmps1_2133 " , { { " Intel " , cpus_i486 } , { " AMD " , cpus_Am486 } , { " Cyrix " , cpus_Cx486 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE , 1 , 64 , 1 , 127 , ps1_m2133_init , NULL } ,
{ " AMI 486 clone " , ROM_AMI486 , " ami486 " , { { " Intel " , cpus_i486 } , { " AMD " , cpus_Am486 } , { " Cyrix " , cpus_Cx486 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 64 , 1 , 127 , at_ali1429_init , NULL } ,
{ " AMI WinBIOS 486 " , ROM_WIN486 , " win486 " , { { " Intel " , cpus_i486 } , { " AMD " , cpus_Am486 } , { " Cyrix " , cpus_Cx486 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 64 , 1 , 127 , at_ali1429_init , NULL } ,
{ " DTK PKM-0038S E-2 " , ROM_DTK486 , " dtk486 " , { { " Intel " , cpus_i486 } , { " AMD " , cpus_Am486 } , { " Cyrix " , cpus_Cx486 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE , 1 , 64 , 1 , 127 , at_dtk486_init , NULL } ,
{ " Rise Computer R418 " , ROM_R418 , " r418 " , { { " Intel " , cpus_i486 } , { " AMD " , cpus_Am486 } , { " Cyrix " , cpus_Cx486 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE | MODEL_PCI , 1 , 64 , 1 , 127 , at_r418_init , NULL } ,
{ " Intel Premiere/PCI " , ROM_REVENGE , " revenge " , { { " Intel " , cpus_Pentium5V } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 128 , 1 , 127 , at_batman_init , NULL } ,
2017-06-16 03:18:59 +02:00
#if 0
2017-06-16 06:44:11 +02:00
{ " Micro Star 586MC1 " , ROM_586MC1 , " 586mc1 " , { { " Intel " , cpus_Pentium5V50 } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 128 , 1 , 127 , at_586mc1_init , NULL } ,
2017-06-16 03:18:59 +02:00
# endif
2017-06-16 06:44:11 +02:00
{ " Intel Premiere/PCI II " , ROM_PLATO , " plato " , { { " Intel " , cpus_PentiumS5 } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K5 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 128 , 1 , 127 , at_plato_init , NULL } ,
{ " Intel Advanced/EV " , ROM_ENDEAVOR , " endeavor " , { { " Intel " , cpus_PentiumS5 } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K5 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 128 , 1 , 127 , at_endeavor_init , NULL } ,
{ " Intel Advanced/ZP " , ROM_ZAPPA , " zappa " , { { " Intel " , cpus_PentiumS5 } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K5 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 128 , 1 , 127 , at_endeavor_init , NULL } ,
{ " PC Partner MB500N " , ROM_MB500N , " mb500n " , { { " Intel " , cpus_PentiumS5 } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K5 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 128 , 1 , 127 , at_mb500n_init , NULL } ,
{ " President Award 430FX PCI " , ROM_PRESIDENT , " president " , { { " Intel " , cpus_PentiumS5 } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K5 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_HAS_IDE | MODEL_PCI , 1 , 128 , 1 , 127 , at_president_init , NULL } ,
{ " ASUS P/I-P54TP4XE " , ROM_P54TP4XE , " p54tp4xe " , { { " Intel " , cpus_PentiumS5 } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K5 } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_p54tp4xe_init , NULL } ,
{ " Intel Advanced/ATX " , ROM_THOR , " thor " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_endeavor_init , NULL } ,
{ " MR Intel Advanced/ATX " , ROM_MRTHOR , " mrthor " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_endeavor_init , NULL } ,
{ " AOpen AP53 " , ROM_AP53 , " ap53 " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_ap53_init , NULL } ,
{ " ASUS P/I-P55T2S " , ROM_P55T2S , " p55t2s " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_p55t2s_init , NULL } ,
{ " Acer M3a " , ROM_ACERM3A , " acerm3a " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_acerm3a_init , NULL } ,
{ " Acer V35n " , ROM_ACERV35N , " acerv35n " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_acerv35n_init , NULL } ,
{ " ASUS P/I-P55T2P4 " , ROM_P55T2P4 , " p55r2p4 " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_p55t2p4_init , NULL } ,
{ " Epox P55-VA " , ROM_P55VA , " p55va " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_p55va_init , NULL } ,
{ " ASUS P/I-P55TVP4 " , ROM_P55TVP4 , " p55tvp4 " , { { " Intel " , cpus_Pentium } , { " IDT " , cpus_WinChip } , { " AMD " , cpus_K56 } , { " Cyrix " , cpus_6x86 } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_p55tvp4_init , NULL } ,
{ " Tyan Titan-Pro AT " , ROM_440FX , " 440fx " , { { " Intel " , cpus_PentiumPro } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_i440fx_init , NULL } ,
{ " Tyan Titan-Pro ATX " , ROM_S1668 , " tpatx " , { { " Intel " , cpus_PentiumPro } , { " " , NULL } , { " " , NULL } , { " " , NULL } , { " " , NULL } } , 0 , MODEL_AT | MODEL_PS2 | MODEL_HAS_IDE | MODEL_PCI , 1 , 256 , 1 , 127 , at_s1668_init , NULL } ,
{ " " , - 1 , " " , { { " " , 0 } , { " " , 0 } , { " " , 0 } } , 0 , 0 , 0 , 0 , 0 }
2016-06-26 00:34:39 +02:00
} ;
2017-06-04 02:11:19 -04:00
int model_count ( void )
2016-06-26 00:34:39 +02:00
{
return ( sizeof ( models ) / sizeof ( MODEL ) ) - 1 ;
}
2017-06-04 02:11:19 -04:00
int model_getromset ( void )
2016-06-26 00:34:39 +02:00
{
return models [ model ] . id ;
}
2017-05-05 01:49:42 +02:00
int model_getromset_ex ( int m )
{
return models [ m ] . id ;
}
2016-06-26 00:34:39 +02:00
int model_getmodel ( int romset )
{
int c = 0 ;
while ( models [ c ] . id ! = - 1 )
{
if ( models [ c ] . id = = romset )
return c ;
c + + ;
}
return 0 ;
}
char * model_getname ( )
{
return models [ model ] . name ;
}
2016-12-23 03:16:24 +01:00
device_t * model_getdevice ( int model )
{
return models [ model ] . device ;
}
2017-06-04 02:11:19 -04:00
char * model_get_internal_name ( void )
2017-02-25 20:18:45 +01:00
{
return models [ model ] . internal_name ;
}
2017-06-08 00:58:47 +02:00
char * model_get_internal_name_ex ( int m )
{
return models [ m ] . internal_name ;
}
int model_get_nvrmask ( int m )
{
return models [ m ] . nvrmask ;
}
2017-02-25 20:18:45 +01:00
int model_get_model_from_internal_name ( char * s )
{
int c = 0 ;
while ( models [ c ] . id ! = - 1 )
{
if ( ! strcmp ( models [ c ] . internal_name , s ) )
return c ;
c + + ;
}
return 0 ;
}
2017-06-04 02:11:19 -04:00
void common_init ( void )
2016-06-26 00:34:39 +02:00
{
dma_init ( ) ;
fdc_add ( ) ;
2017-05-05 01:49:42 +02:00
if ( lpt_enabled )
{
lpt_init ( ) ;
}
2016-06-26 00:34:39 +02:00
pic_init ( ) ;
pit_init ( ) ;
2017-05-05 01:49:42 +02:00
if ( serial_enabled [ 0 ] )
{
2017-05-07 02:14:44 -04:00
serial_setup ( 1 , SERIAL1_ADDR , SERIAL1_IRQ ) ;
2017-05-05 01:49:42 +02:00
}
if ( serial_enabled [ 1 ] )
{
2017-05-07 02:14:44 -04:00
serial_setup ( 2 , SERIAL2_ADDR , SERIAL2_IRQ ) ;
2017-05-05 01:49:42 +02:00
}
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void xt_init ( void )
2016-06-26 00:34:39 +02:00
{
common_init ( ) ;
mem_add_bios ( ) ;
2017-05-05 01:49:42 +02:00
pit_set_out_func ( & pit , 1 , pit_refresh_timer_xt ) ;
2016-06-26 00:34:39 +02:00
keyboard_xt_init ( ) ;
nmi_init ( ) ;
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_device ) ;
2017-05-05 01:49:42 +02:00
if ( bugger_enabled )
{
bugger_init ( ) ;
}
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void pcjr_init ( void )
2016-06-26 00:34:39 +02:00
{
mem_add_bios ( ) ;
fdc_add_pcjr ( ) ;
pic_init ( ) ;
pit_init ( ) ;
2017-05-05 01:49:42 +02:00
pit_set_out_func ( & pit , 0 , pit_irq0_timer_pcjr ) ;
if ( serial_enabled [ 0 ] )
{
2017-05-07 02:14:44 -04:00
serial_setup ( 1 , 0x2f8 , 3 ) ;
2017-05-05 01:49:42 +02:00
}
2016-06-26 00:34:39 +02:00
keyboard_pcjr_init ( ) ;
device_add ( & sn76489_device ) ;
nmi_mask = 0x80 ;
}
2017-06-04 02:11:19 -04:00
void tandy1k_init ( void )
2016-06-26 00:34:39 +02:00
{
TANDY = 1 ;
common_init ( ) ;
mem_add_bios ( ) ;
keyboard_tandy_init ( ) ;
if ( romset = = ROM_TANDY )
device_add ( & sn76489_device ) ;
else
device_add ( & ncr8496_device ) ;
nmi_init ( ) ;
if ( romset ! = ROM_TANDY )
device_add ( & tandy_eeprom_device ) ;
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_device ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void tandy1ksl2_init ( void )
2016-06-26 00:34:39 +02:00
{
common_init ( ) ;
mem_add_bios ( ) ;
keyboard_tandy_init ( ) ;
device_add ( & pssj_device ) ;
nmi_init ( ) ;
device_add ( & tandy_rom_device ) ;
device_add ( & tandy_eeprom_device ) ;
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_device ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void ams_init ( void )
2016-06-26 00:34:39 +02:00
{
AMSTRAD = 1 ;
common_init ( ) ;
mem_add_bios ( ) ;
amstrad_init ( ) ;
keyboard_amstrad_init ( ) ;
nvr_init ( ) ;
nmi_init ( ) ;
fdc_set_dskchg_activelow ( ) ;
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_device ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void europc_init ( void )
2016-06-26 00:34:39 +02:00
{
common_init ( ) ;
mem_add_bios ( ) ;
jim_init ( ) ;
keyboard_xt_init ( ) ;
nmi_init ( ) ;
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_device ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void olim24_init ( void )
2016-06-26 00:34:39 +02:00
{
common_init ( ) ;
mem_add_bios ( ) ;
keyboard_olim24_init ( ) ;
nvr_init ( ) ;
olivetti_m24_init ( ) ;
nmi_init ( ) ;
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_device ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void xt_laserxt_init ( void )
2017-06-03 16:34:40 +02:00
{
xt_init ( ) ;
laserxt_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void at_init ( void )
2016-06-26 00:34:39 +02:00
{
AT = 1 ;
common_init ( ) ;
2017-05-05 01:49:42 +02:00
if ( lpt_enabled )
{
lpt2_remove ( ) ;
}
2016-06-26 00:34:39 +02:00
mem_add_bios ( ) ;
2017-05-05 01:49:42 +02:00
pit_set_out_func ( & pit , 1 , pit_refresh_timer_at ) ;
2016-06-26 00:34:39 +02:00
dma16_init ( ) ;
keyboard_at_init ( ) ;
nvr_init ( ) ;
pic2_init ( ) ;
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_device ) ;
2017-05-05 01:49:42 +02:00
if ( bugger_enabled )
{
bugger_init ( ) ;
}
}
2017-06-04 02:11:19 -04:00
void ibm_at_init ( void )
2017-05-05 01:49:42 +02:00
{
at_init ( ) ;
mem_remap_top_384k ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void at_ide_init ( void )
2017-03-15 01:37:09 +01:00
{
at_init ( ) ;
ide_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void deskpro386_init ( void )
2016-06-26 00:34:39 +02:00
{
at_init ( ) ;
compaq_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void ps1_common_init ( void )
2016-06-26 00:34:39 +02:00
{
AT = 1 ;
common_init ( ) ;
mem_add_bios ( ) ;
2017-05-05 01:49:42 +02:00
pit_set_out_func ( & pit , 1 , pit_refresh_timer_at ) ;
2016-06-26 00:34:39 +02:00
dma16_init ( ) ;
2017-05-05 01:49:42 +02:00
if ( romset ! = ROM_IBMPS1_2011 )
{
ide_init ( ) ;
}
2016-06-26 00:34:39 +02:00
keyboard_at_init ( ) ;
nvr_init ( ) ;
pic2_init ( ) ;
2017-05-29 01:29:45 +02:00
if ( romset ! = ROM_IBMPS1_2133 )
{
fdc_set_dskchg_activelow ( ) ;
2017-05-29 02:47:27 +02:00
device_add ( & ps1_audio_device ) ;
2017-05-29 01:29:45 +02:00
}
2016-06-26 00:34:39 +02:00
/*PS/1 audio uses ports 200h and 202-207h, so only initialise gameport on 201h*/
2016-09-16 02:46:25 +02:00
if ( joystick_type ! = 7 ) device_add ( & gameport_201_device ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void ps1_m2011_init ( void )
2016-06-26 00:34:39 +02:00
{
ps1_common_init ( ) ;
ps1mb_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void ps1_m2121_init ( void )
2016-06-26 00:34:39 +02:00
{
ps1_common_init ( ) ;
ps1mb_m2121_init ( ) ;
2017-03-05 19:42:56 +01:00
fdc_set_ps1 ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void ps1_m2133_init ( void )
2017-05-29 01:18:32 +02:00
{
ps1_common_init ( ) ;
ps1mb_m2133_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void ps2_m30_286_init ( void )
2017-02-20 00:16:42 +01:00
{
AT = 1 ;
common_init ( ) ;
mem_add_bios ( ) ;
2017-05-05 01:49:42 +02:00
pit_set_out_func ( & pit , 1 , pit_refresh_timer_at ) ;
2017-02-20 00:16:42 +01:00
dma16_init ( ) ;
keyboard_at_init ( ) ;
nvr_init ( ) ;
pic2_init ( ) ;
ps2board_init ( ) ;
fdc_set_dskchg_activelow ( ) ;
2017-03-01 23:23:52 +01:00
fdc_set_ps1 ( ) ;
2017-02-20 00:16:42 +01:00
}
2017-06-04 02:11:19 -04:00
static void ps2_common_init ( void )
2017-05-05 01:49:42 +02:00
{
AT = 1 ;
common_init ( ) ;
mem_add_bios ( ) ;
dma16_init ( ) ;
ps2_dma_init ( ) ;
ide_init ( ) ;
keyboard_at_init ( ) ;
keyboard_at_init_ps2 ( ) ;
mouse_ps2_init ( ) ;
nvr_init ( ) ;
pic2_init ( ) ;
pit_ps2_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void ps2_model_50_init ( void )
2017-05-05 01:49:42 +02:00
{
ps2_common_init ( ) ;
ps2_mca_board_model_50_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void ps2_model_55sx_init ( void )
2017-05-05 01:49:42 +02:00
{
ps2_common_init ( ) ;
ps2_mca_board_model_55sx_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void ps2_model_80_init ( void )
2017-05-05 01:49:42 +02:00
{
ps2_common_init ( ) ;
ps2_mca_board_model_80_type2_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void at_neat_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
neat_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void at_scat_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
scat_init ( ) ;
}
2017-06-04 02:11:19 -04:00
/* void at_acer386sx_init(void)
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
acer386sx_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void at_82335_init ( void )
2017-02-19 01:58:21 +01:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2017-02-19 01:58:21 +01:00
i82335_init ( ) ;
2017-02-23 19:52:14 +01:00
} */
2017-02-19 01:58:21 +01:00
2017-06-04 02:11:19 -04:00
void at_wd76c10_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
wd76c10_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void at_headland_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
headland_init ( ) ;
2016-12-23 03:16:24 +01:00
}
2017-06-04 02:11:19 -04:00
void at_opti495_init ( void )
2016-12-23 03:16:24 +01:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-12-23 03:16:24 +01:00
opti495_init ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void secondary_ide_check ( void )
2017-01-16 01:49:19 +01:00
{
int i = 0 ;
int secondary_cdroms = 0 ;
for ( i = 0 ; i < CDROM_NUM ; i + + )
{
2017-05-27 03:53:32 +02:00
if ( ( cdrom_drives [ i ] . ide_channel > = 2 ) & & ( cdrom_drives [ i ] . ide_channel < = 3 ) & & ( ( cdrom_drives [ i ] . bus_type = = CDROM_BUS_ATAPI_PIO_ONLY ) | | ( cdrom_drives [ i ] . bus_type = = CDROM_BUS_ATAPI_PIO_AND_DMA ) ) )
2017-01-16 01:49:19 +01:00
{
secondary_cdroms + + ;
}
}
2017-05-27 03:53:32 +02:00
if ( ! secondary_cdroms ) ide_sec_disable ( ) ;
2017-01-16 01:49:19 +01:00
}
2017-06-04 02:11:19 -04:00
void at_ali1429_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-05-27 03:53:32 +02:00
ali1429_reset ( ) ;
2017-01-16 01:49:19 +01:00
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
ali1429_init ( ) ;
2017-01-16 01:49:19 +01:00
secondary_ide_check ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
/* void at_um8881f_init(void)
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
pci_init ( PCI_CONFIG_TYPE_1 , 0 , 31 ) ;
um8881f_init ( ) ;
} */
2017-06-04 02:11:19 -04:00
void at_dtk486_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
memregs_init ( ) ;
sis85c471_init ( ) ;
2017-01-16 01:49:19 +01:00
secondary_ide_check ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void at_sis496_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
pci_slot ( 0xb ) ;
pci_slot ( 0xd ) ;
pci_slot ( 0xf ) ;
2017-05-21 19:16:23 +02:00
sis496_init ( ) ;
trc_init ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void at_r418_init ( void )
2016-06-26 00:34:39 +02:00
{
2016-12-23 03:16:24 +01:00
at_sis496_init ( ) ;
2016-06-26 00:34:39 +02:00
fdc37c665_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void at_premiere_common_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-12-23 03:16:24 +01:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_2 ) ;
pci_slot ( 0xc ) ;
pci_slot ( 0xe ) ;
pci_slot ( 0x6 ) ;
2017-06-16 03:18:59 +02:00
sio_init ( 1 , 0xc , 0xe , 0x6 , 0 ) ;
2016-06-26 00:34:39 +02:00
fdc37c665_init ( ) ;
intel_batman_init ( ) ;
2016-07-05 19:29:31 +02:00
device_add ( & intel_flash_bxt_ami_device ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void at_batman_init ( void )
2016-12-23 03:16:24 +01:00
{
at_premiere_common_init ( ) ;
i430lx_init ( ) ;
}
2017-06-04 02:14:27 +02:00
#if 0
2017-06-04 02:11:19 -04:00
void at_586mc1_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-06-26 00:34:39 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_2 ) ;
2016-06-26 00:34:39 +02:00
i430lx_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_slot ( 0xc ) ;
pci_slot ( 0xe ) ;
pci_slot ( 0x6 ) ;
2017-06-16 03:18:59 +02:00
sio_init ( 1 , 0xc , 0xe , 0x6 , 0 ) ;
2016-06-26 00:34:39 +02:00
device_add ( & intel_flash_bxt_device ) ;
2017-01-16 01:49:19 +01:00
secondary_ide_check ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:14:27 +02:00
# endif
2016-06-26 00:34:39 +02:00
2017-06-04 02:11:19 -04:00
void at_plato_init ( void )
2016-06-26 00:34:39 +02:00
{
2016-12-23 03:16:24 +01:00
at_premiere_common_init ( ) ;
2016-06-26 00:34:39 +02:00
i430nx_init ( ) ;
}
2017-06-04 02:11:19 -04:00
void at_advanced_common_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-12-23 03:16:24 +01:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
pci_slot ( 0xd ) ;
pci_slot ( 0xe ) ;
pci_slot ( 0xf ) ;
pci_slot ( 0x10 ) ;
2016-06-26 00:34:39 +02:00
i430fx_init ( ) ;
2017-06-02 01:38:25 +02:00
piix_init ( 7 , 0xd , 0xe , 0xf , 0x10 ) ;
2016-12-23 03:16:24 +01:00
pc87306_init ( ) ;
2016-06-26 00:34:39 +02:00
}
2017-06-04 02:11:19 -04:00
void at_endeavor_init ( void )
2016-09-14 23:18:14 +02:00
{
at_advanced_common_init ( ) ;
device_add ( & intel_flash_bxt_ami_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_mb500n_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 0x11 ) ;
pci_slot ( 0x12 ) ;
pci_slot ( 0x13 ) ;
pci_slot ( 0x14 ) ;
2016-12-23 03:16:24 +01:00
i430fx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix_init ( 7 , 0x14 , 0x13 , 0x12 , 0x11 ) ;
2016-12-23 03:16:24 +01:00
fdc37c665_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
2017-02-02 02:55:08 +01:00
}
2016-12-23 03:16:24 +01:00
2017-06-16 03:18:59 +02:00
void at_president_init ( void )
{
at_ide_init ( ) ;
memregs_init ( ) ;
pci_init ( PCI_CONFIG_TYPE_1 ) ;
pci_slot ( 8 ) ;
pci_slot ( 9 ) ;
pci_slot ( 10 ) ;
pci_slot ( 11 ) ;
i430fx_init ( ) ;
piix_init ( 7 , 8 , 9 , 10 , 11 ) ;
#if 0
superio_detect_init ( ) ;
# endif
w83877f_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_p54tp4xe_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-07-19 02:44:32 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 9 ) ;
pci_slot ( 10 ) ;
pci_slot ( 11 ) ;
pci_slot ( 12 ) ;
2016-06-26 00:34:39 +02:00
i430fx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix_init ( 7 , 12 , 11 , 10 , 9 ) ;
2016-06-26 00:34:39 +02:00
fdc37c665_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_ap53_init ( void )
2017-05-05 01:49:42 +02:00
{
at_ide_init ( ) ;
memregs_init ( ) ;
powermate_memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 0x11 ) ;
pci_slot ( 0x12 ) ;
pci_slot ( 0x13 ) ;
pci_slot ( 0x14 ) ;
2017-05-05 01:49:42 +02:00
i430hx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix_init ( 7 , 0x11 , 0x12 , 0x13 , 0x14 ) ;
2017-05-05 01:49:42 +02:00
fdc37c669_init ( ) ;
acerm3a_io_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_p55t2s_init ( void )
2017-05-05 01:49:42 +02:00
{
at_ide_init ( ) ;
memregs_init ( ) ;
powermate_memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 0x11 ) ;
pci_slot ( 0x12 ) ;
pci_slot ( 0x13 ) ;
pci_slot ( 0x14 ) ;
2017-05-05 01:49:42 +02:00
i430hx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix_init ( 7 , 0x12 , 0x13 , 0x14 , 0x11 ) ;
2017-05-05 01:49:42 +02:00
pc87306_init ( ) ;
acerm3a_io_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_acerm3a_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-09-14 23:18:14 +02:00
memregs_init ( ) ;
2017-02-01 17:55:11 +01:00
powermate_memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 0xc ) ;
2017-06-02 01:38:25 +02:00
pci_slot ( 0xd ) ;
pci_slot ( 0xe ) ;
pci_slot ( 0xf ) ;
2016-06-26 00:34:39 +02:00
i430hx_init ( ) ;
2017-06-15 19:35:48 +02:00
piix3_init ( 7 , 0xc , 0xd , 0xe , 0xf ) ;
2016-06-26 00:34:39 +02:00
fdc37c932fr_init ( ) ;
acerm3a_io_init ( ) ;
device_add ( & intel_flash_bxb_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_acerv35n_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-09-14 23:18:14 +02:00
memregs_init ( ) ;
2017-02-01 17:55:11 +01:00
powermate_memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-15 19:35:48 +02:00
pci_slot ( 0x11 ) ;
pci_slot ( 0x12 ) ;
pci_slot ( 0x13 ) ;
pci_slot ( 0x14 ) ;
2016-06-26 00:34:39 +02:00
i430hx_init ( ) ;
2017-06-15 19:35:48 +02:00
piix3_init ( 7 , 0x11 , 0x12 , 0x13 , 0x14 ) ;
2016-06-26 00:34:39 +02:00
fdc37c932fr_init ( ) ;
acerm3a_io_init ( ) ;
device_add ( & intel_flash_bxb_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_p55t2p4_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-07-19 02:44:32 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 9 ) ;
pci_slot ( 10 ) ;
pci_slot ( 11 ) ;
pci_slot ( 12 ) ;
2016-06-26 00:34:39 +02:00
i430hx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix3_init ( 7 , 12 , 11 , 10 , 9 ) ;
2016-06-26 00:34:39 +02:00
w83877f_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-08 00:01:10 +02:00
#if 0
2017-06-04 02:11:19 -04:00
void at_i430vx_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-09-14 23:18:14 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
pci_slot ( 0x11 ) ;
pci_slot ( 0x12 ) ;
pci_slot ( 0x13 ) ;
pci_slot ( 0x14 ) ;
2016-06-26 00:34:39 +02:00
i430vx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix3_init ( 7 , 17 , 18 , 20 , 19 ) ;
2016-06-26 00:34:39 +02:00
um8669f_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-08 00:01:10 +02:00
# endif
2016-06-26 00:34:39 +02:00
2017-06-04 02:11:19 -04:00
void at_p55tvp4_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-07-19 02:44:32 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 9 ) ;
pci_slot ( 10 ) ;
pci_slot ( 11 ) ;
pci_slot ( 12 ) ;
2016-06-26 00:34:39 +02:00
i430vx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix3_init ( 7 , 12 , 11 , 10 , 9 ) ;
2016-06-26 00:34:39 +02:00
w83877f_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_p55va_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-09-14 23:18:14 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 8 ) ;
pci_slot ( 9 ) ;
pci_slot ( 10 ) ;
pci_slot ( 11 ) ;
2016-06-26 00:34:39 +02:00
i430vx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix3_init ( 7 , 8 , 9 , 10 , 11 ) ;
2016-06-26 00:34:39 +02:00
fdc37c932fr_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_i440fx_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-03-15 01:37:09 +01:00
at_ide_init ( ) ;
2016-09-14 23:18:14 +02:00
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 0xb ) ;
pci_slot ( 0xc ) ;
pci_slot ( 0xd ) ;
pci_slot ( 0xe ) ;
2017-06-02 01:38:25 +02:00
i430vx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix3_init ( 7 , 0xe , 0xd , 0xc , 0xb ) ;
2016-06-26 00:34:39 +02:00
fdc37c665_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void at_s1668_init ( void )
2017-05-05 01:49:42 +02:00
{
at_ide_init ( ) ;
memregs_init ( ) ;
2017-06-02 01:38:25 +02:00
pci_init ( PCI_CONFIG_TYPE_1 ) ;
2017-06-03 16:03:27 +02:00
pci_slot ( 0xb ) ;
pci_slot ( 0xc ) ;
2017-06-02 01:38:25 +02:00
pci_slot ( 0xd ) ;
pci_slot ( 0xe ) ;
2017-05-05 01:49:42 +02:00
i440fx_init ( ) ;
2017-06-03 16:03:27 +02:00
piix3_init ( 7 , 0xe , 0xd , 0xc , 0xb ) ;
2017-05-05 01:49:42 +02:00
fdc37c665_init ( ) ;
device_add ( & intel_flash_bxt_device ) ;
}
2017-06-04 02:11:19 -04:00
void model_init ( void )
2016-06-26 00:34:39 +02:00
{
2017-05-05 01:49:42 +02:00
pclog ( " Initializing as %s \n " , model_getname ( ) ) ;
2016-06-26 00:34:39 +02:00
AMSTRAD = AT = PCI = TANDY = 0 ;
io_init ( ) ;
2017-01-31 20:39:36 +01:00
pci_reset_handler . pci_master_reset = NULL ;
pci_reset_handler . pci_set_reset = NULL ;
pci_reset_handler . super_io_reset = NULL ;
2016-06-26 00:34:39 +02:00
fdc_update_is_nsc ( 0 ) ;
models [ model ] . init ( ) ;
2016-12-23 03:16:24 +01:00
if ( models [ model ] . device )
device_add ( models [ model ] . device ) ;
2016-06-26 00:34:39 +02:00
}